Bläddra i källkod

figured it out

Christian Sheridan 6 år sedan
förälder
incheckning
bd49b31d10

+ 9
- 0
.idea/ORM-SimpleAccount.iml Visa fil

@@ -0,0 +1,9 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module type="JAVA_MODULE" version="4">
3
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+    <exclude-output />
5
+    <content url="file://$MODULE_DIR$" />
6
+    <orderEntry type="inheritedJdk" />
7
+    <orderEntry type="sourceFolder" forTests="false" />
8
+  </component>
9
+</module>

+ 15
- 0
.idea/dataSources.local.xml Visa fil

@@ -0,0 +1,15 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="dataSourceStorageLocal">
4
+    <data-source name="@localhost" uuid="d4c88920-cdaa-4159-a559-d6d01018e730">
5
+      <database-info product="MySQL" version="8.0.12" jdbc-version="4.0" driver-name="MySQL Connector Java" driver-version="mysql-connector-java-5.1.46 ( Revision: 9cc87a48e75c2d2e87c1a293b2862ce651cb256e )" family="MYSQL" exact-version="8.0.12">
6
+        <extra-name-characters>#@</extra-name-characters>
7
+        <identifier-quote-string>`</identifier-quote-string>
8
+      </database-info>
9
+      <case-sensitivity plain-identifiers="mixed" quoted-identifiers="upper" />
10
+      <secret-storage>master_key</secret-storage>
11
+      <user-name>root</user-name>
12
+      <introspection-schemas>*:@</introspection-schemas>
13
+    </data-source>
14
+  </component>
15
+</project>

+ 19
- 0
.idea/dataSources.xml Visa fil

@@ -0,0 +1,19 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
4
+    <data-source source="LOCAL" name="@localhost" uuid="d4c88920-cdaa-4159-a559-d6d01018e730">
5
+      <driver-ref>mysql</driver-ref>
6
+      <synchronize>true</synchronize>
7
+      <jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
8
+      <jdbc-url>jdbc:mysql://localhost:3306/orm_lab</jdbc-url>
9
+      <driver-properties>
10
+        <property name="autoReconnect" value="true" />
11
+        <property name="zeroDateTimeBehavior" value="convertToNull" />
12
+        <property name="tinyInt1isBit" value="false" />
13
+        <property name="characterEncoding" value="utf8" />
14
+        <property name="characterSetResults" value="utf8" />
15
+        <property name="yearIsDateType" value="false" />
16
+      </driver-properties>
17
+    </data-source>
18
+  </component>
19
+</project>

+ 4149
- 0
.idea/dataSources/3c04e774-e8be-4ac9-8511-15c308d78fb6.xml
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1157
- 0
.idea/dataSources/d4c88920-cdaa-4159-a559-d6d01018e730.xml
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 7
- 0
.idea/misc.xml Visa fil

@@ -0,0 +1,7 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="JavaScriptSettings">
4
+    <option name="languageLevel" value="ES6" />
5
+  </component>
6
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
7
+</project>

+ 8
- 0
.idea/modules.xml Visa fil

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ProjectModuleManager">
4
+    <modules>
5
+      <module fileurl="file://$PROJECT_DIR$/.idea/ORM-SimpleAccount.iml" filepath="$PROJECT_DIR$/.idea/ORM-SimpleAccount.iml" />
6
+    </modules>
7
+  </component>
8
+</project>

+ 6
- 0
.idea/vcs.xml Visa fil

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="VcsDirectoryMappings">
4
+    <mapping directory="" vcs="Git" />
5
+  </component>
6
+</project>

+ 370
- 0
.idea/workspace.xml Visa fil

@@ -0,0 +1,370 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="15280c3f-35fd-4f9f-a783-315791bc1383" name="Default Changelist" comment="">
5
+      <change afterPath="$PROJECT_DIR$/.idea/dataSources.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
7
+    </list>
8
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
9
+    <option name="SHOW_DIALOG" value="false" />
10
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
11
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
12
+    <option name="LAST_RESOLUTION" value="IGNORE" />
13
+  </component>
14
+  <component name="DatabaseView">
15
+    <option name="SHOW_INTERMEDIATE" value="true" />
16
+    <option name="GROUP_DATA_SOURCES" value="true" />
17
+    <option name="GROUP_SCHEMA" value="true" />
18
+    <option name="GROUP_CONTENTS" value="false" />
19
+    <option name="SORT_POSITIONED" value="false" />
20
+    <option name="SHOW_EMPTY_GROUPS" value="false" />
21
+    <option name="AUTO_SCROLL_FROM_SOURCE" value="false" />
22
+    <option name="HIDDEN_KINDS">
23
+      <set />
24
+    </option>
25
+    <expand>
26
+      <path>
27
+        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
28
+        <item name="@localhost" type="feb32156:DbDataSourceImpl" />
29
+      </path>
30
+      <path>
31
+        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
32
+        <item name="@localhost" type="feb32156:DbDataSourceImpl" />
33
+        <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
34
+      </path>
35
+      <path>
36
+        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
37
+        <item name="@localhost" type="feb32156:DbDataSourceImpl" />
38
+        <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
39
+        <item name="orm_lab: schema" type="c314c289:MysqlImplModel$Schema" />
40
+      </path>
41
+    </expand>
42
+    <select />
43
+  </component>
44
+  <component name="FUSProjectUsageTrigger">
45
+    <session id="-895632474">
46
+      <usages-collector id="statistics.lifecycle.project">
47
+        <counts>
48
+          <entry key="project.closed" value="2" />
49
+          <entry key="project.open.time.0" value="2" />
50
+          <entry key="project.opened" value="2" />
51
+        </counts>
52
+      </usages-collector>
53
+      <usages-collector id="statistics.file.extensions.open">
54
+        <counts>
55
+          <entry key="account" value="1" />
56
+          <entry key="sql" value="2" />
57
+          <entry key="xml" value="1" />
58
+        </counts>
59
+      </usages-collector>
60
+      <usages-collector id="statistics.file.types.open">
61
+        <counts>
62
+          <entry key="Database Element" value="1" />
63
+          <entry key="Scratch" value="2" />
64
+          <entry key="XML" value="1" />
65
+        </counts>
66
+      </usages-collector>
67
+      <usages-collector id="statistics.file.extensions.edit">
68
+        <counts>
69
+          <entry key="sql" value="146" />
70
+          <entry key="txt" value="7" />
71
+          <entry key="xml" value="5" />
72
+        </counts>
73
+      </usages-collector>
74
+      <usages-collector id="statistics.file.types.edit">
75
+        <counts>
76
+          <entry key="PLAIN_TEXT" value="7" />
77
+          <entry key="SQL" value="79" />
78
+          <entry key="Scratch" value="67" />
79
+          <entry key="XML" value="5" />
80
+        </counts>
81
+      </usages-collector>
82
+    </session>
83
+  </component>
84
+  <component name="FileEditorManager">
85
+    <leaf>
86
+      <file pinned="false" current-in-tab="false">
87
+        <entry file="file://$PROJECT_DIR$/pom.xml">
88
+          <provider selected="true" editor-type-id="text-editor">
89
+            <state relative-caret-position="765">
90
+              <caret line="51" column="17" selection-start-line="51" selection-start-column="17" selection-end-line="51" selection-end-column="17" />
91
+            </state>
92
+          </provider>
93
+        </entry>
94
+      </file>
95
+      <file pinned="false" current-in-tab="true">
96
+        <entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/d4c88920-cdaa-4159-a559-d6d01018e730/console.sql">
97
+          <provider selected="true" editor-type-id="text-editor" />
98
+        </entry>
99
+      </file>
100
+    </leaf>
101
+  </component>
102
+  <component name="Git.Settings">
103
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
104
+  </component>
105
+  <component name="IdeDocumentHistory">
106
+    <option name="CHANGED_PATHS">
107
+      <list>
108
+        <option value="$PROJECT_DIR$/pom.xml" />
109
+        <option value="$APPLICATION_CONFIG_DIR$/consoles/db/3c04e774-e8be-4ac9-8511-15c308d78fb6/console.sql" />
110
+      </list>
111
+    </option>
112
+  </component>
113
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
114
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
115
+  <component name="JsGulpfileManager">
116
+    <detection-done>true</detection-done>
117
+    <sorting>DEFINITION_ORDER</sorting>
118
+  </component>
119
+  <component name="ProjectFrameBounds">
120
+    <option name="x" value="71" />
121
+    <option name="y" value="-1039" />
122
+    <option name="width" value="1849" />
123
+    <option name="height" value="1040" />
124
+  </component>
125
+  <component name="ProjectView">
126
+    <navigator proportions="" version="1">
127
+      <foldersAlwaysOnTop value="true" />
128
+    </navigator>
129
+    <panes>
130
+      <pane id="ProjectPane">
131
+        <subPane>
132
+          <expand>
133
+            <path>
134
+              <item name="ORM-SimpleAccount" type="b2602c69:ProjectViewProjectNode" />
135
+              <item name="ORM-SimpleAccount" type="462c0819:PsiDirectoryNode" />
136
+            </path>
137
+            <path>
138
+              <item name="ORM-SimpleAccount" type="b2602c69:ProjectViewProjectNode" />
139
+              <item name="ORM-SimpleAccount" type="462c0819:PsiDirectoryNode" />
140
+              <item name=".idea" type="462c0819:PsiDirectoryNode" />
141
+            </path>
142
+            <path>
143
+              <item name="ORM-SimpleAccount" type="b2602c69:ProjectViewProjectNode" />
144
+              <item name="Scratches and Consoles" type="1a2a3e82:ScratchProjectViewPane$MyProjectNode" />
145
+            </path>
146
+            <path>
147
+              <item name="ORM-SimpleAccount" type="b2602c69:ProjectViewProjectNode" />
148
+              <item name="Scratches and Consoles" type="1a2a3e82:ScratchProjectViewPane$MyProjectNode" />
149
+              <item name="Extensions" type="d62648e6:ScratchProjectViewPane$MyRootNode" />
150
+            </path>
151
+            <path>
152
+              <item name="ORM-SimpleAccount" type="b2602c69:ProjectViewProjectNode" />
153
+              <item name="Scratches and Consoles" type="1a2a3e82:ScratchProjectViewPane$MyProjectNode" />
154
+              <item name="Extensions" type="d62648e6:ScratchProjectViewPane$MyRootNode" />
155
+              <item name="com.intellij.database" type="1e004dc1:ScratchProjectViewPane$MyRootNode$1$1" />
156
+            </path>
157
+            <path>
158
+              <item name="ORM-SimpleAccount" type="b2602c69:ProjectViewProjectNode" />
159
+              <item name="Scratches and Consoles" type="1a2a3e82:ScratchProjectViewPane$MyProjectNode" />
160
+              <item name="Extensions" type="d62648e6:ScratchProjectViewPane$MyRootNode" />
161
+              <item name="com.intellij.database" type="1e004dc1:ScratchProjectViewPane$MyRootNode$1$1" />
162
+              <item name="data" type="1e004dc1:ScratchProjectViewPane$MyRootNode$1$1" />
163
+            </path>
164
+            <path>
165
+              <item name="ORM-SimpleAccount" type="b2602c69:ProjectViewProjectNode" />
166
+              <item name="Scratches and Consoles" type="1a2a3e82:ScratchProjectViewPane$MyProjectNode" />
167
+              <item name="Extensions" type="d62648e6:ScratchProjectViewPane$MyRootNode" />
168
+              <item name="com.intellij.database" type="1e004dc1:ScratchProjectViewPane$MyRootNode$1$1" />
169
+              <item name="data" type="1e004dc1:ScratchProjectViewPane$MyRootNode$1$1" />
170
+              <item name="extractors" type="1e004dc1:ScratchProjectViewPane$MyRootNode$1$1" />
171
+            </path>
172
+            <path>
173
+              <item name="ORM-SimpleAccount" type="b2602c69:ProjectViewProjectNode" />
174
+              <item name="Scratches and Consoles" type="1a2a3e82:ScratchProjectViewPane$MyProjectNode" />
175
+              <item name="Extensions" type="d62648e6:ScratchProjectViewPane$MyRootNode" />
176
+              <item name="com.intellij.database" type="1e004dc1:ScratchProjectViewPane$MyRootNode$1$1" />
177
+              <item name="schema" type="1e004dc1:ScratchProjectViewPane$MyRootNode$1$1" />
178
+            </path>
179
+          </expand>
180
+          <select />
181
+        </subPane>
182
+      </pane>
183
+      <pane id="PackagesPane" />
184
+      <pane id="Scope" />
185
+    </panes>
186
+  </component>
187
+  <component name="PropertiesComponent">
188
+    <property name="DatabaseDriversLRU" value="mysql" />
189
+    <property name="WebServerToolWindowFactoryState" value="false" />
190
+    <property name="aspect.path.notification.shown" value="true" />
191
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1543275876071" />
192
+    <property name="database.console.LAST_STATE" value="true" />
193
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
194
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
195
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
196
+    <property name="project.structure.last.edited" value="Project" />
197
+    <property name="project.structure.proportion" value="0.0" />
198
+    <property name="project.structure.side.proportion" value="0.0" />
199
+  </component>
200
+  <component name="RunDashboard">
201
+    <option name="ruleStates">
202
+      <list>
203
+        <RuleState>
204
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
205
+        </RuleState>
206
+        <RuleState>
207
+          <option name="name" value="StatusDashboardGroupingRule" />
208
+        </RuleState>
209
+      </list>
210
+    </option>
211
+  </component>
212
+  <component name="SvnConfiguration">
213
+    <configuration />
214
+  </component>
215
+  <component name="TaskManager">
216
+    <task active="true" id="Default" summary="Default task">
217
+      <changelist id="15280c3f-35fd-4f9f-a783-315791bc1383" name="Default Changelist" comment="" />
218
+      <created>1543268432459</created>
219
+      <option name="number" value="Default" />
220
+      <option name="presentableId" value="Default" />
221
+      <updated>1543268432459</updated>
222
+      <workItem from="1543268433797" duration="476000" />
223
+      <workItem from="1543269082687" duration="3221000" />
224
+    </task>
225
+    <servers />
226
+  </component>
227
+  <component name="TimeTrackingManager">
228
+    <option name="totallyTimeSpent" value="3697000" />
229
+  </component>
230
+  <component name="ToolWindowManager">
231
+    <frame x="71" y="-1039" width="1849" height="1040" extended-state="0" />
232
+    <layout>
233
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.24958494" />
234
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
235
+      <window_info id="Image Layers" order="2" />
236
+      <window_info id="Designer" order="3" />
237
+      <window_info id="UI Designer" order="4" />
238
+      <window_info id="Capture Tool" order="5" />
239
+      <window_info id="Favorites" order="6" side_tool="true" />
240
+      <window_info anchor="bottom" id="Database Console" visible="true" weight="0.32911393" />
241
+      <window_info anchor="bottom" id="Message" order="0" />
242
+      <window_info anchor="bottom" id="Find" order="1" />
243
+      <window_info anchor="bottom" id="Run" order="2" />
244
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
245
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
246
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
247
+      <window_info anchor="bottom" id="TODO" order="6" />
248
+      <window_info anchor="bottom" id="Database Changes" order="7" />
249
+      <window_info anchor="bottom" id="Terminal" order="8" weight="0.32911393" />
250
+      <window_info anchor="bottom" id="Event Log" order="9" side_tool="true" />
251
+      <window_info anchor="bottom" id="Version Control" order="10" />
252
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
253
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
254
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
255
+      <window_info anchor="right" id="Palette" order="3" />
256
+      <window_info anchor="right" id="Capture Analysis" order="4" />
257
+      <window_info anchor="right" id="Theme Preview" order="5" />
258
+      <window_info anchor="right" id="Palette&#9;" order="6" />
259
+      <window_info active="true" anchor="right" id="Database" order="7" visible="true" weight="0.32982844" />
260
+      <window_info anchor="right" id="Maven Projects" order="8" />
261
+    </layout>
262
+  </component>
263
+  <component name="TypeScriptGeneratedFilesManager">
264
+    <option name="version" value="1" />
265
+  </component>
266
+  <component name="VcsContentAnnotationSettings">
267
+    <option name="myLimit" value="2678400000" />
268
+  </component>
269
+  <component name="editorHistoryManager">
270
+    <entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/3c04e774-e8be-4ac9-8511-15c308d78fb6/console.sql">
271
+      <provider selected="true" editor-type-id="text-editor">
272
+        <state relative-caret-position="60">
273
+          <caret line="4" column="1" selection-start-line="4" selection-start-column="1" selection-end-line="4" selection-end-column="1" />
274
+        </state>
275
+      </provider>
276
+    </entry>
277
+    <entry file="file://$PROJECT_DIR$/pom.xml">
278
+      <provider selected="true" editor-type-id="text-editor">
279
+        <state relative-caret-position="765">
280
+          <caret line="51" column="17" selection-start-line="51" selection-start-column="17" selection-end-line="51" selection-end-column="17" />
281
+        </state>
282
+      </provider>
283
+    </entry>
284
+    <entry file="das://d4c88920-cdaa-4159-a559-d6d01018e730/schema/orm_lab/table/account">
285
+      <provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
286
+        <state>
287
+          <filtering enabled="true" />
288
+        </state>
289
+      </provider>
290
+    </entry>
291
+    <entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/d4c88920-cdaa-4159-a559-d6d01018e730/console.sql">
292
+      <provider selected="true" editor-type-id="text-editor" />
293
+    </entry>
294
+  </component>
295
+  <component name="masterDetails">
296
+    <states>
297
+      <state key="ArtifactsStructureConfigurable.UI">
298
+        <settings>
299
+          <artifact-editor />
300
+          <splitter-proportions>
301
+            <option name="proportions">
302
+              <list>
303
+                <option value="0.2" />
304
+              </list>
305
+            </option>
306
+          </splitter-proportions>
307
+        </settings>
308
+      </state>
309
+      <state key="FacetStructureConfigurable.UI">
310
+        <settings>
311
+          <last-edited>No facets are configured</last-edited>
312
+          <splitter-proportions>
313
+            <option name="proportions">
314
+              <list>
315
+                <option value="0.2" />
316
+              </list>
317
+            </option>
318
+          </splitter-proportions>
319
+        </settings>
320
+      </state>
321
+      <state key="GlobalLibrariesConfigurable.UI">
322
+        <settings>
323
+          <splitter-proportions>
324
+            <option name="proportions">
325
+              <list>
326
+                <option value="0.2" />
327
+              </list>
328
+            </option>
329
+          </splitter-proportions>
330
+        </settings>
331
+      </state>
332
+      <state key="JdkListConfigurable.UI">
333
+        <settings>
334
+          <last-edited>1.8</last-edited>
335
+          <splitter-proportions>
336
+            <option name="proportions">
337
+              <list>
338
+                <option value="0.2" />
339
+              </list>
340
+            </option>
341
+          </splitter-proportions>
342
+        </settings>
343
+      </state>
344
+      <state key="ModuleStructureConfigurable.UI">
345
+        <settings>
346
+          <last-edited>ORM-SimpleAccount</last-edited>
347
+          <splitter-proportions>
348
+            <option name="proportions">
349
+              <list>
350
+                <option value="0.2" />
351
+                <option value="0.6" />
352
+              </list>
353
+            </option>
354
+          </splitter-proportions>
355
+        </settings>
356
+      </state>
357
+      <state key="ProjectLibrariesConfigurable.UI">
358
+        <settings>
359
+          <splitter-proportions>
360
+            <option name="proportions">
361
+              <list>
362
+                <option value="0.2" />
363
+              </list>
364
+            </option>
365
+          </splitter-proportions>
366
+        </settings>
367
+      </state>
368
+    </states>
369
+  </component>
370
+</project>

+ 13
- 0
orm_lab/.idea/compiler.xml Visa fil

@@ -0,0 +1,13 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="CompilerConfiguration">
4
+    <annotationProcessing>
5
+      <profile name="Maven default annotation processors profile" enabled="true">
6
+        <sourceOutputDir name="target/generated-sources/annotations" />
7
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
8
+        <outputRelativeToContentRoot value="true" />
9
+        <module name="orm_lab" />
10
+      </profile>
11
+    </annotationProcessing>
12
+  </component>
13
+</project>

+ 15
- 0
orm_lab/.idea/dataSources.local.xml Visa fil

@@ -0,0 +1,15 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="dataSourceStorageLocal">
4
+    <data-source name="@localhost" uuid="e0c69ad7-4578-404f-b68c-e009b66a1b6a">
5
+      <database-info product="MySQL" version="8.0.12" jdbc-version="4.0" driver-name="MySQL Connector Java" driver-version="mysql-connector-java-5.1.46 ( Revision: 9cc87a48e75c2d2e87c1a293b2862ce651cb256e )" family="MYSQL" exact-version="8.0.12">
6
+        <extra-name-characters>#@</extra-name-characters>
7
+        <identifier-quote-string>`</identifier-quote-string>
8
+      </database-info>
9
+      <case-sensitivity plain-identifiers="mixed" quoted-identifiers="upper" />
10
+      <secret-storage>master_key</secret-storage>
11
+      <user-name>root</user-name>
12
+      <introspection-schemas>*:@</introspection-schemas>
13
+    </data-source>
14
+  </component>
15
+</project>

+ 19
- 0
orm_lab/.idea/dataSources.xml Visa fil

@@ -0,0 +1,19 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
4
+    <data-source source="LOCAL" name="@localhost" uuid="e0c69ad7-4578-404f-b68c-e009b66a1b6a">
5
+      <driver-ref>mysql</driver-ref>
6
+      <synchronize>true</synchronize>
7
+      <jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
8
+      <jdbc-url>jdbc:mysql://localhost:3306/orm_lab</jdbc-url>
9
+      <driver-properties>
10
+        <property name="autoReconnect" value="true" />
11
+        <property name="zeroDateTimeBehavior" value="convertToNull" />
12
+        <property name="tinyInt1isBit" value="false" />
13
+        <property name="characterEncoding" value="utf8" />
14
+        <property name="characterSetResults" value="utf8" />
15
+        <property name="yearIsDateType" value="false" />
16
+      </driver-properties>
17
+    </data-source>
18
+  </component>
19
+</project>

+ 1157
- 0
orm_lab/.idea/dataSources/e0c69ad7-4578-404f-b68c-e009b66a1b6a.xml
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 14
- 0
orm_lab/.idea/misc.xml Visa fil

@@ -0,0 +1,14 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
4
+  <component name="MavenProjectsManager">
5
+    <option name="originalFiles">
6
+      <list>
7
+        <option value="$PROJECT_DIR$/pom.xml" />
8
+      </list>
9
+    </option>
10
+  </component>
11
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
12
+    <output url="file://$PROJECT_DIR$/out" />
13
+  </component>
14
+</project>

+ 458
- 0
orm_lab/.idea/workspace.xml Visa fil

@@ -0,0 +1,458 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="de313bdb-1ad2-4316-890a-fe1ef62d7414" name="Default Changelist" comment="" />
5
+    <ignored path="$PROJECT_DIR$/out/" />
6
+    <ignored path="$PROJECT_DIR$/target/" />
7
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
8
+    <option name="SHOW_DIALOG" value="false" />
9
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
11
+    <option name="LAST_RESOLUTION" value="IGNORE" />
12
+  </component>
13
+  <component name="DatabaseView">
14
+    <option name="SHOW_INTERMEDIATE" value="true" />
15
+    <option name="GROUP_DATA_SOURCES" value="true" />
16
+    <option name="GROUP_SCHEMA" value="true" />
17
+    <option name="GROUP_CONTENTS" value="false" />
18
+    <option name="SORT_POSITIONED" value="false" />
19
+    <option name="SHOW_EMPTY_GROUPS" value="false" />
20
+    <option name="AUTO_SCROLL_FROM_SOURCE" value="false" />
21
+    <option name="HIDDEN_KINDS">
22
+      <set />
23
+    </option>
24
+    <expand>
25
+      <path>
26
+        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
27
+        <item name="@localhost" type="feb32156:DbDataSourceImpl" />
28
+      </path>
29
+      <path>
30
+        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
31
+        <item name="@localhost" type="feb32156:DbDataSourceImpl" />
32
+        <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
33
+      </path>
34
+      <path>
35
+        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
36
+        <item name="@localhost" type="feb32156:DbDataSourceImpl" />
37
+        <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
38
+        <item name="orm_lab: schema" type="c314c289:MysqlImplModel$Schema" />
39
+      </path>
40
+      <path>
41
+        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
42
+        <item name="@localhost" type="feb32156:DbDataSourceImpl" />
43
+        <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
44
+        <item name="orm_lab: schema" type="c314c289:MysqlImplModel$Schema" />
45
+        <item name="account: table" type="98d5ac3d:MysqlImplModel$Table" />
46
+      </path>
47
+    </expand>
48
+    <select />
49
+  </component>
50
+  <component name="FUSProjectUsageTrigger">
51
+    <session id="-1997901637">
52
+      <usages-collector id="statistics.lifecycle.project">
53
+        <counts>
54
+          <entry key="project.closed" value="1" />
55
+          <entry key="project.open.time.1" value="1" />
56
+          <entry key="project.opened" value="1" />
57
+        </counts>
58
+      </usages-collector>
59
+      <usages-collector id="statistics.file.extensions.edit">
60
+        <counts>
61
+          <entry key="java" value="35" />
62
+          <entry key="txt" value="7" />
63
+          <entry key="xml" value="28" />
64
+        </counts>
65
+      </usages-collector>
66
+      <usages-collector id="statistics.file.types.edit">
67
+        <counts>
68
+          <entry key="JAVA" value="35" />
69
+          <entry key="PLAIN_TEXT" value="7" />
70
+          <entry key="XML" value="28" />
71
+        </counts>
72
+      </usages-collector>
73
+      <usages-collector id="statistics.file.extensions.open">
74
+        <counts>
75
+          <entry key="account" value="1" />
76
+          <entry key="java" value="2" />
77
+          <entry key="sql" value="1" />
78
+        </counts>
79
+      </usages-collector>
80
+      <usages-collector id="statistics.file.types.open">
81
+        <counts>
82
+          <entry key="Database Element" value="1" />
83
+          <entry key="JAVA" value="2" />
84
+          <entry key="Scratch" value="1" />
85
+        </counts>
86
+      </usages-collector>
87
+    </session>
88
+  </component>
89
+  <component name="FileEditorManager">
90
+    <leaf>
91
+      <file pinned="false" current-in-tab="false">
92
+        <entry file="file://$PROJECT_DIR$/pom.xml">
93
+          <provider selected="true" editor-type-id="text-editor">
94
+            <state relative-caret-position="480">
95
+              <caret line="32" column="19" selection-start-line="32" selection-start-column="19" selection-end-line="32" selection-end-column="19" />
96
+            </state>
97
+          </provider>
98
+        </entry>
99
+      </file>
100
+      <file pinned="false" current-in-tab="false">
101
+        <entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/e0c69ad7-4578-404f-b68c-e009b66a1b6a/console.sql">
102
+          <provider selected="true" editor-type-id="text-editor" />
103
+        </entry>
104
+      </file>
105
+      <file pinned="false" current-in-tab="false">
106
+        <entry file="file://$PROJECT_DIR$/src/main/java/Account.java">
107
+          <provider selected="true" editor-type-id="text-editor">
108
+            <state relative-caret-position="484">
109
+              <caret line="64" column="5" selection-start-line="64" selection-start-column="5" selection-end-line="64" selection-end-column="5" />
110
+              <folding>
111
+                <element signature="imports" expanded="true" />
112
+                <element signature="e#751#752#0" expanded="true" />
113
+                <element signature="e#791#792#0" expanded="true" />
114
+                <element signature="e#955#956#0" expanded="true" />
115
+                <element signature="e#988#989#0" expanded="true" />
116
+                <element signature="e#1023#1024#0" expanded="true" />
117
+                <element signature="e#1058#1059#0" expanded="true" />
118
+                <element signature="e#1102#1103#0" expanded="true" />
119
+                <element signature="e#1142#1143#0" expanded="true" />
120
+                <element signature="e#1181#1182#0" expanded="true" />
121
+                <element signature="e#1220#1221#0" expanded="true" />
122
+                <element signature="e#1272#1273#0" expanded="true" />
123
+                <element signature="e#1320#1321#0" expanded="true" />
124
+                <element signature="e#1371#1372#0" expanded="true" />
125
+                <element signature="e#1417#1418#0" expanded="true" />
126
+              </folding>
127
+            </state>
128
+          </provider>
129
+        </entry>
130
+      </file>
131
+      <file pinned="false" current-in-tab="true">
132
+        <entry file="file://$PROJECT_DIR$/src/main/java/AccountApp.java">
133
+          <provider selected="true" editor-type-id="text-editor">
134
+            <state relative-caret-position="94">
135
+              <caret line="10" column="14" selection-start-line="10" selection-start-column="14" selection-end-line="10" selection-end-column="14" />
136
+              <folding>
137
+                <element signature="imports" expanded="true" />
138
+              </folding>
139
+            </state>
140
+          </provider>
141
+        </entry>
142
+      </file>
143
+      <file pinned="false" current-in-tab="false">
144
+        <entry file="das://e0c69ad7-4578-404f-b68c-e009b66a1b6a/schema/orm_lab/table/account">
145
+          <provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
146
+            <state>
147
+              <filtering enabled="true" />
148
+            </state>
149
+          </provider>
150
+        </entry>
151
+      </file>
152
+    </leaf>
153
+  </component>
154
+  <component name="FileTemplateManagerImpl">
155
+    <option name="RECENT_TEMPLATES">
156
+      <list>
157
+        <option value="Class" />
158
+      </list>
159
+    </option>
160
+  </component>
161
+  <component name="IdeDocumentHistory">
162
+    <option name="CHANGED_PATHS">
163
+      <list>
164
+        <option value="$PROJECT_DIR$/src/main/java/Account.java" />
165
+        <option value="$PROJECT_DIR$/src/main/java/AccountApp.java" />
166
+        <option value="$PROJECT_DIR$/pom.xml" />
167
+      </list>
168
+    </option>
169
+  </component>
170
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
171
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
172
+  <component name="JsGulpfileManager">
173
+    <detection-done>true</detection-done>
174
+    <sorting>DEFINITION_ORDER</sorting>
175
+  </component>
176
+  <component name="MavenImportPreferences">
177
+    <option name="importingSettings">
178
+      <MavenImportingSettings>
179
+        <option name="importAutomatically" value="true" />
180
+      </MavenImportingSettings>
181
+    </option>
182
+  </component>
183
+  <component name="ProjectFrameBounds">
184
+    <option name="x" value="71" />
185
+    <option name="y" value="-1040" />
186
+    <option name="width" value="1849" />
187
+    <option name="height" value="1040" />
188
+  </component>
189
+  <component name="ProjectView">
190
+    <navigator proportions="" version="1">
191
+      <foldersAlwaysOnTop value="true" />
192
+    </navigator>
193
+    <panes>
194
+      <pane id="Scope" />
195
+      <pane id="PackagesPane" />
196
+      <pane id="ProjectPane">
197
+        <subPane>
198
+          <expand>
199
+            <path>
200
+              <item name="orm_lab" type="b2602c69:ProjectViewProjectNode" />
201
+              <item name="orm_lab" type="462c0819:PsiDirectoryNode" />
202
+            </path>
203
+            <path>
204
+              <item name="orm_lab" type="b2602c69:ProjectViewProjectNode" />
205
+              <item name="orm_lab" type="462c0819:PsiDirectoryNode" />
206
+              <item name="src" type="462c0819:PsiDirectoryNode" />
207
+            </path>
208
+            <path>
209
+              <item name="orm_lab" type="b2602c69:ProjectViewProjectNode" />
210
+              <item name="orm_lab" type="462c0819:PsiDirectoryNode" />
211
+              <item name="src" type="462c0819:PsiDirectoryNode" />
212
+              <item name="main" type="462c0819:PsiDirectoryNode" />
213
+            </path>
214
+            <path>
215
+              <item name="orm_lab" type="b2602c69:ProjectViewProjectNode" />
216
+              <item name="orm_lab" type="462c0819:PsiDirectoryNode" />
217
+              <item name="src" type="462c0819:PsiDirectoryNode" />
218
+              <item name="main" type="462c0819:PsiDirectoryNode" />
219
+              <item name="java" type="462c0819:PsiDirectoryNode" />
220
+            </path>
221
+            <path>
222
+              <item name="orm_lab" type="b2602c69:ProjectViewProjectNode" />
223
+              <item name="orm_lab" type="462c0819:PsiDirectoryNode" />
224
+              <item name="src" type="462c0819:PsiDirectoryNode" />
225
+              <item name="test" type="462c0819:PsiDirectoryNode" />
226
+            </path>
227
+          </expand>
228
+          <select />
229
+        </subPane>
230
+      </pane>
231
+    </panes>
232
+  </component>
233
+  <component name="PropertiesComponent">
234
+    <property name="DatabaseDriversLRU" value="mysql" />
235
+    <property name="WebServerToolWindowFactoryState" value="false" />
236
+    <property name="aspect.path.notification.shown" value="true" />
237
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1543275876083" />
238
+    <property name="database.console.LAST_STATE" value="false" />
239
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
240
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
241
+    <property name="project.structure.last.edited" value="Project" />
242
+    <property name="project.structure.proportion" value="0.15" />
243
+    <property name="project.structure.side.proportion" value="0.0" />
244
+    <property name="settings.editor.selected.configurable" value="project.propCompiler" />
245
+  </component>
246
+  <component name="RunDashboard">
247
+    <option name="ruleStates">
248
+      <list>
249
+        <RuleState>
250
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
251
+        </RuleState>
252
+        <RuleState>
253
+          <option name="name" value="StatusDashboardGroupingRule" />
254
+        </RuleState>
255
+      </list>
256
+    </option>
257
+  </component>
258
+  <component name="RunManager">
259
+    <configuration name="AccountApp" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
260
+      <option name="MAIN_CLASS_NAME" value="AccountApp" />
261
+      <module name="orm_lab" />
262
+      <method v="2">
263
+        <option name="Make" enabled="true" />
264
+      </method>
265
+    </configuration>
266
+    <recent_temporary>
267
+      <list>
268
+        <item itemvalue="Application.AccountApp" />
269
+      </list>
270
+    </recent_temporary>
271
+  </component>
272
+  <component name="SvnConfiguration">
273
+    <configuration />
274
+  </component>
275
+  <component name="TaskManager">
276
+    <task active="true" id="Default" summary="Default task">
277
+      <changelist id="de313bdb-1ad2-4316-890a-fe1ef62d7414" name="Default Changelist" comment="" />
278
+      <created>1543274500457</created>
279
+      <option name="number" value="Default" />
280
+      <option name="presentableId" value="Default" />
281
+      <updated>1543274500457</updated>
282
+      <workItem from="1543274501842" duration="1458000" />
283
+    </task>
284
+    <servers />
285
+  </component>
286
+  <component name="TimeTrackingManager">
287
+    <option name="totallyTimeSpent" value="1458000" />
288
+  </component>
289
+  <component name="ToolWindowManager">
290
+    <frame x="71" y="-1040" width="1849" height="1040" extended-state="0" />
291
+    <layout>
292
+      <window_info id="Image Layers" />
293
+      <window_info id="Designer" />
294
+      <window_info id="UI Designer" />
295
+      <window_info id="Capture Tool" />
296
+      <window_info id="Favorites" side_tool="true" />
297
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.24958494" />
298
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
299
+      <window_info anchor="bottom" id="Messages" weight="0.32911393" />
300
+      <window_info anchor="bottom" id="Database Changes" weight="0.32911393" />
301
+      <window_info anchor="bottom" id="Version Control" show_stripe_button="false" />
302
+      <window_info anchor="bottom" id="Database Console" weight="0.32911393" />
303
+      <window_info active="true" anchor="bottom" id="Terminal" visible="true" weight="0.32911393" />
304
+      <window_info anchor="bottom" id="Event Log" side_tool="true" />
305
+      <window_info anchor="bottom" id="Message" order="0" />
306
+      <window_info anchor="bottom" id="Find" order="1" />
307
+      <window_info anchor="bottom" id="Run" order="2" weight="0.32911393" />
308
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
309
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
310
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
311
+      <window_info anchor="bottom" id="TODO" order="6" />
312
+      <window_info anchor="right" id="Palette" />
313
+      <window_info anchor="right" id="Theme Preview" />
314
+      <window_info anchor="right" id="Capture Analysis" />
315
+      <window_info anchor="right" id="Palette&#9;" />
316
+      <window_info anchor="right" id="Database" visible="true" weight="0.32982844" />
317
+      <window_info anchor="right" id="Maven Projects" />
318
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
319
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
320
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
321
+    </layout>
322
+  </component>
323
+  <component name="TypeScriptGeneratedFilesManager">
324
+    <option name="version" value="1" />
325
+  </component>
326
+  <component name="VcsContentAnnotationSettings">
327
+    <option name="myLimit" value="2678400000" />
328
+  </component>
329
+  <component name="editorHistoryManager">
330
+    <entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/e0c69ad7-4578-404f-b68c-e009b66a1b6a/console.sql">
331
+      <provider selected="true" editor-type-id="text-editor" />
332
+    </entry>
333
+    <entry file="file://$PROJECT_DIR$/pom.xml">
334
+      <provider selected="true" editor-type-id="text-editor">
335
+        <state relative-caret-position="480">
336
+          <caret line="32" column="19" selection-start-line="32" selection-start-column="19" selection-end-line="32" selection-end-column="19" />
337
+        </state>
338
+      </provider>
339
+    </entry>
340
+    <entry file="das://e0c69ad7-4578-404f-b68c-e009b66a1b6a/schema/orm_lab/table/account">
341
+      <provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
342
+        <state>
343
+          <filtering enabled="true" />
344
+        </state>
345
+      </provider>
346
+    </entry>
347
+    <entry file="file://$PROJECT_DIR$/src/main/java/Account.java">
348
+      <provider selected="true" editor-type-id="text-editor">
349
+        <state relative-caret-position="484">
350
+          <caret line="64" column="5" selection-start-line="64" selection-start-column="5" selection-end-line="64" selection-end-column="5" />
351
+          <folding>
352
+            <element signature="imports" expanded="true" />
353
+            <element signature="e#751#752#0" expanded="true" />
354
+            <element signature="e#791#792#0" expanded="true" />
355
+            <element signature="e#955#956#0" expanded="true" />
356
+            <element signature="e#988#989#0" expanded="true" />
357
+            <element signature="e#1023#1024#0" expanded="true" />
358
+            <element signature="e#1058#1059#0" expanded="true" />
359
+            <element signature="e#1102#1103#0" expanded="true" />
360
+            <element signature="e#1142#1143#0" expanded="true" />
361
+            <element signature="e#1181#1182#0" expanded="true" />
362
+            <element signature="e#1220#1221#0" expanded="true" />
363
+            <element signature="e#1272#1273#0" expanded="true" />
364
+            <element signature="e#1320#1321#0" expanded="true" />
365
+            <element signature="e#1371#1372#0" expanded="true" />
366
+            <element signature="e#1417#1418#0" expanded="true" />
367
+          </folding>
368
+        </state>
369
+      </provider>
370
+    </entry>
371
+    <entry file="file://$PROJECT_DIR$/src/main/java/AccountApp.java">
372
+      <provider selected="true" editor-type-id="text-editor">
373
+        <state relative-caret-position="94">
374
+          <caret line="10" column="14" selection-start-line="10" selection-start-column="14" selection-end-line="10" selection-end-column="14" />
375
+          <folding>
376
+            <element signature="imports" expanded="true" />
377
+          </folding>
378
+        </state>
379
+      </provider>
380
+    </entry>
381
+  </component>
382
+  <component name="masterDetails">
383
+    <states>
384
+      <state key="ArtifactsStructureConfigurable.UI">
385
+        <settings>
386
+          <artifact-editor />
387
+          <splitter-proportions>
388
+            <option name="proportions">
389
+              <list>
390
+                <option value="0.2" />
391
+              </list>
392
+            </option>
393
+          </splitter-proportions>
394
+        </settings>
395
+      </state>
396
+      <state key="FacetStructureConfigurable.UI">
397
+        <settings>
398
+          <last-edited>No facets are configured</last-edited>
399
+          <splitter-proportions>
400
+            <option name="proportions">
401
+              <list>
402
+                <option value="0.2" />
403
+              </list>
404
+            </option>
405
+          </splitter-proportions>
406
+        </settings>
407
+      </state>
408
+      <state key="GlobalLibrariesConfigurable.UI">
409
+        <settings>
410
+          <splitter-proportions>
411
+            <option name="proportions">
412
+              <list>
413
+                <option value="0.2" />
414
+              </list>
415
+            </option>
416
+          </splitter-proportions>
417
+        </settings>
418
+      </state>
419
+      <state key="JdkListConfigurable.UI">
420
+        <settings>
421
+          <last-edited>1.8</last-edited>
422
+          <splitter-proportions>
423
+            <option name="proportions">
424
+              <list>
425
+                <option value="0.2" />
426
+              </list>
427
+            </option>
428
+          </splitter-proportions>
429
+        </settings>
430
+      </state>
431
+      <state key="ModuleStructureConfigurable.UI">
432
+        <settings>
433
+          <last-edited>orm_lab</last-edited>
434
+          <splitter-proportions>
435
+            <option name="proportions">
436
+              <list>
437
+                <option value="0.2" />
438
+                <option value="0.6" />
439
+              </list>
440
+            </option>
441
+          </splitter-proportions>
442
+        </settings>
443
+      </state>
444
+      <state key="ProjectLibrariesConfigurable.UI">
445
+        <settings>
446
+          <last-edited>Maven: com.j256.ormlite:ormlite-core:4.48</last-edited>
447
+          <splitter-proportions>
448
+            <option name="proportions">
449
+              <list>
450
+                <option value="0.2" />
451
+              </list>
452
+            </option>
453
+          </splitter-proportions>
454
+        </settings>
455
+      </state>
456
+    </states>
457
+  </component>
458
+</project>

+ 2
- 0
orm_lab/orm_lab.iml Visa fil

@@ -0,0 +1,2 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module type="JAVA_MODULE" version="4" />

+ 36
- 0
orm_lab/pom.xml Visa fil

@@ -0,0 +1,36 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0"
3
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
+    <modelVersion>4.0.0</modelVersion>
6
+
7
+    <groupId>orm_lab</groupId>
8
+    <artifactId>1</artifactId>
9
+    <version>1.0-SNAPSHOT</version>
10
+
11
+    <dependencies>
12
+        <!-- https://mvnrepository.com/artifact/com.j256.ormlite/ormlite-core -->
13
+        <dependency>
14
+            <groupId>com.j256.ormlite</groupId>
15
+            <artifactId>ormlite-core</artifactId>
16
+            <version>4.48</version>
17
+        </dependency>
18
+
19
+        <!-- https://mvnrepository.com/artifact/com.j256.ormlite/ormlite-jdbc -->
20
+        <dependency>
21
+            <groupId>com.j256.ormlite</groupId>
22
+            <artifactId>ormlite-jdbc</artifactId>
23
+            <version>4.48</version>
24
+        </dependency>
25
+
26
+        <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
27
+        <dependency>
28
+            <groupId>mysql</groupId>
29
+            <artifactId>mysql-connector-java</artifactId>
30
+            <version>8.0.12</version>
31
+        </dependency>
32
+
33
+    </dependencies>
34
+
35
+
36
+</project>

+ 65
- 0
orm_lab/src/main/java/Account.java Visa fil

@@ -0,0 +1,65 @@
1
+
2
+import com.j256.ormlite.field.DatabaseField;
3
+import com.j256.ormlite.table.DatabaseTable;
4
+
5
+    @DatabaseTable(tableName = "account")
6
+    public class Account {
7
+
8
+        public static final String NAME_FIELD_NAME = "name";
9
+        public static final String PASSWORD_FIELD_NAME = "password";
10
+
11
+        @DatabaseField(columnName = "id", generatedId = true)
12
+        private int id;
13
+
14
+        @DatabaseField(columnName = "name", canBeNull = false)
15
+        private String name;
16
+
17
+        @DatabaseField(columnName = "password")
18
+        private String password;
19
+
20
+        Account() {
21
+            // all persisted classes must define a no-arg constructor with at least package visibility
22
+        }
23
+
24
+        public Account(String name) {
25
+            this.name = name;
26
+        }
27
+
28
+        public Account(String name, String password) {
29
+            this.name = name;
30
+            this.password = password;
31
+        }
32
+
33
+        public int getId() {
34
+            return id;
35
+        }
36
+
37
+        public String getName() {
38
+            return name;
39
+        }
40
+
41
+        public void setName(String name) {
42
+            this.name = name;
43
+        }
44
+
45
+        public String getPassword() {
46
+            return password;
47
+        }
48
+
49
+        public void setPassword(String password) {
50
+            this.password = password;
51
+        }
52
+
53
+        @Override
54
+        public int hashCode() {
55
+            return name.hashCode();
56
+        }
57
+
58
+        @Override
59
+        public boolean equals(Object other) {
60
+            if (other == null || other.getClass() != getClass()) {
61
+                return false;
62
+            }
63
+            return name.equals(((Account) other).name);
64
+        }
65
+    }

+ 67
- 0
orm_lab/src/main/java/AccountApp.java Visa fil

@@ -0,0 +1,67 @@
1
+import com.j256.ormlite.dao.Dao;
2
+import com.j256.ormlite.dao.DaoManager;
3
+import com.j256.ormlite.jdbc.JdbcConnectionSource;
4
+import com.j256.ormlite.support.ConnectionSource;
5
+
6
+public class AccountApp {
7
+
8
+    // we are using a MySQl database
9
+    private final static String DATABASE_URL = "jdbc:mysql://localhost:3306/orm_lab?useUnicode=true";
10
+    private final static String YOURUSERNAME = "root";
11
+    private final static String YOURPASSWORD = "";
12
+
13
+    private Dao<Account, Integer> accountDao;
14
+
15
+    public static void main(String[] args) throws Exception {
16
+        // turn our static method into an instance of Main
17
+        new AccountApp().doMain(args);
18
+    }
19
+
20
+    private void doMain(String[] args) throws Exception {
21
+        ConnectionSource connectionSource = null;
22
+        try {
23
+            // create our data-source for the database
24
+            connectionSource = new JdbcConnectionSource(DATABASE_URL, YOURUSERNAME, YOURPASSWORD);
25
+            // setup our  DAOs
26
+            setupDao(connectionSource);
27
+            // read, write and delete some data
28
+            processData();
29
+
30
+            System.out.println("\n\nIt seems to have worked\n\n");
31
+        } finally {
32
+            // destroy the data source which should close underlying connections
33
+            if (connectionSource != null) {
34
+                connectionSource.close();
35
+            }
36
+        }
37
+    }
38
+
39
+    /**
40
+     * Read and write some example data.
41
+     */
42
+    private void processData() throws Exception {
43
+        // create an instance of Account
44
+        String name = "Jim Coakley";
45
+        Account account = new Account(name);
46
+
47
+        // persist the account object to the database
48
+        accountDao.create(account);
49
+        int id = account.getId();
50
+        System.out.println(id);
51
+        // assign a password
52
+        account.setPassword("_secret");
53
+        // update the database after changing the object
54
+        accountDao.update(account);
55
+        // delete the account
56
+        //accountDao.deleteById(id);
57
+    }
58
+
59
+    /**
60
+     * Setup our  DAOs
61
+     */
62
+    private void setupDao(ConnectionSource connectionSource) throws Exception {
63
+
64
+        accountDao = DaoManager.createDao(connectionSource, Account.class);
65
+
66
+    }
67
+}

Binär
orm_lab/target/classes/Account.class Visa fil


Binär
orm_lab/target/classes/AccountApp.class Visa fil


+ 54
- 0
pom.xml Visa fil

@@ -0,0 +1,54 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0"
3
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
+    <modelVersion>4.0.0</modelVersion>
6
+
7
+    <groupId>zcw</groupId>
8
+    <artifactId>generics</artifactId>
9
+    <version>1.0-SNAPSHOT</version>
10
+    <build>
11
+        <plugins>
12
+            <plugin>
13
+                <groupId>org.apache.maven.plugins</groupId>
14
+                <artifactId>maven-compiler-plugin</artifactId>
15
+                <configuration>
16
+                    <source>1.7</source>
17
+                    <target>1.7</target>
18
+                </configuration>
19
+            </plugin>
20
+        </plugins>
21
+    </build>
22
+    <dependencies>
23
+
24
+
25
+        <dependency>
26
+            <groupId>junit</groupId>
27
+            <artifactId>junit</artifactId>
28
+            <version>RELEASE</version>
29
+        </dependency>
30
+
31
+        <!-- https://mvnrepository.com/artifact/com.j256.ormlite/ormlite-core -->
32
+        <dependency>
33
+            <groupId>com.j256.ormlite</groupId>
34
+            <artifactId>ormlite-core</artifactId>
35
+            <version>4.48</version>
36
+        </dependency>
37
+
38
+        <!-- https://mvnrepository.com/artifact/com.j256.ormlite/ormlite-jdbc -->
39
+        <dependency>
40
+            <groupId>com.j256.ormlite</groupId>
41
+            <artifactId>ormlite-jdbc</artifactId>
42
+            <version>4.48</version>
43
+        </dependency>
44
+
45
+        <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
46
+        <dependency>
47
+            <groupId>mysql</groupId>
48
+            <artifactId>mysql-connector-java</artifactId>
49
+            <version>5.1.6</version>
50
+        </dependency>
51
+
52
+    </dependencies>
53
+
54
+</project>