Simran Bhutani il y a 6 ans
Parent
révision
20110a4e9d

+ 19
- 0
.idea/dataSources.xml Voir le fichier

@@ -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="c34062ac-ee53-4ecc-b19b-f178dd15bef0">
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</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>

+ 13
- 0
ormlite/.idea/compiler.xml Voir le fichier

@@ -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="ormlite" />
10
+      </profile>
11
+    </annotationProcessing>
12
+  </component>
13
+</project>

+ 15
- 0
ormlite/.idea/dataSources.local.xml Voir le fichier

@@ -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="3ecf0965-6508-43f8-9c0c-b1f029189476">
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>*:@,orm_lab</introspection-schemas>
13
+    </data-source>
14
+  </component>
15
+</project>

+ 19
- 0
ormlite/.idea/dataSources.xml Voir le fichier

@@ -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="3ecf0965-6508-43f8-9c0c-b1f029189476">
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</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>

+ 4176
- 0
ormlite/.idea/dataSources/3ecf0965-6508-43f8-9c0c-b1f029189476.xml
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 14
- 0
ormlite/.idea/misc.xml Voir le fichier

@@ -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>

+ 6
- 0
ormlite/.idea/vcs.xml Voir le fichier

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

+ 510
- 0
ormlite/.idea/workspace.xml Voir le fichier

@@ -0,0 +1,510 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="84beed31-9db2-4552-8663-3f94fa8b2eb8" name="Default Changelist" comment="">
5
+      <change afterPath="$PROJECT_DIR$/../.idea/dataSources.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
7
+      <change afterPath="$PROJECT_DIR$/.idea/dataSources.xml" afterDir="false" />
8
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
9
+      <change afterPath="$PROJECT_DIR$/src/main/java/Account.java" afterDir="false" />
10
+      <change afterPath="$PROJECT_DIR$/src/main/java/AccountApp.java" afterDir="false" />
11
+    </list>
12
+    <ignored path="$PROJECT_DIR$/out/" />
13
+    <ignored path="$PROJECT_DIR$/target/" />
14
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
15
+    <option name="SHOW_DIALOG" value="false" />
16
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
17
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
18
+    <option name="LAST_RESOLUTION" value="IGNORE" />
19
+  </component>
20
+  <component name="CoverageDataManager">
21
+    <SUITE FILE_PATH="coverage/ormlite$AccountApp.ic" NAME="AccountApp Coverage Results" MODIFIED="1542332059712" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
22
+  </component>
23
+  <component name="CoverageViewManager">
24
+    <option name="myElementSize" value="121" />
25
+  </component>
26
+  <component name="DatabaseView">
27
+    <option name="SHOW_INTERMEDIATE" value="true" />
28
+    <option name="GROUP_DATA_SOURCES" value="true" />
29
+    <option name="GROUP_SCHEMA" value="true" />
30
+    <option name="GROUP_CONTENTS" value="false" />
31
+    <option name="SORT_POSITIONED" value="false" />
32
+    <option name="SHOW_EMPTY_GROUPS" value="false" />
33
+    <option name="AUTO_SCROLL_FROM_SOURCE" value="false" />
34
+    <option name="HIDDEN_KINDS">
35
+      <set />
36
+    </option>
37
+    <expand>
38
+      <path>
39
+        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
40
+        <item name="@localhost" type="feb32156:DbDataSourceImpl" />
41
+      </path>
42
+      <path>
43
+        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
44
+        <item name="@localhost" type="feb32156:DbDataSourceImpl" />
45
+        <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
46
+      </path>
47
+      <path>
48
+        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
49
+        <item name="@localhost" type="feb32156:DbDataSourceImpl" />
50
+        <item name="schemas" type="d4e8921:DatabaseStructure$FamilyGroup" />
51
+        <item name="orm_lab: schema" type="c314c289:MysqlImplModel$Schema" />
52
+      </path>
53
+    </expand>
54
+    <select />
55
+  </component>
56
+  <component name="FUSProjectUsageTrigger">
57
+    <session id="1025342284">
58
+      <usages-collector id="statistics.lifecycle.project">
59
+        <counts>
60
+          <entry key="project.closed" value="2" />
61
+          <entry key="project.open.time.0" value="1" />
62
+          <entry key="project.open.time.12" value="1" />
63
+          <entry key="project.open.time.3" value="1" />
64
+          <entry key="project.opened" value="3" />
65
+        </counts>
66
+      </usages-collector>
67
+      <usages-collector id="statistics.file.extensions.open">
68
+        <counts>
69
+          <entry key="account" value="1" />
70
+          <entry key="iml" value="1" />
71
+          <entry key="java" value="4" />
72
+          <entry key="sql" value="1" />
73
+          <entry key="xml" value="2" />
74
+        </counts>
75
+      </usages-collector>
76
+      <usages-collector id="statistics.file.types.open">
77
+        <counts>
78
+          <entry key="Database Element" value="1" />
79
+          <entry key="IDEA_MODULE" value="1" />
80
+          <entry key="JAVA" value="4" />
81
+          <entry key="Scratch" value="1" />
82
+          <entry key="XML" value="2" />
83
+        </counts>
84
+      </usages-collector>
85
+      <usages-collector id="statistics.file.extensions.edit">
86
+        <counts>
87
+          <entry key="java" value="1241" />
88
+          <entry key="sql" value="27" />
89
+          <entry key="xml" value="8" />
90
+        </counts>
91
+      </usages-collector>
92
+      <usages-collector id="statistics.file.types.edit">
93
+        <counts>
94
+          <entry key="JAVA" value="1241" />
95
+          <entry key="Scratch" value="27" />
96
+          <entry key="XML" value="8" />
97
+        </counts>
98
+      </usages-collector>
99
+      <usages-collector id="statistics.spring.boot.mvc.usages" />
100
+      <usages-collector id="statistics.vcs.git.usages" />
101
+      <usages-collector id="statistics.spring.boot.run.usages" />
102
+      <usages-collector id="statistics.js.language.service.starts" />
103
+    </session>
104
+  </component>
105
+  <component name="FileEditorManager">
106
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
107
+      <file pinned="false" current-in-tab="false">
108
+        <entry file="file://$PROJECT_DIR$/src/main/java/Account.java">
109
+          <provider selected="true" editor-type-id="text-editor">
110
+            <state relative-caret-position="806">
111
+              <caret line="60" column="9" lean-forward="true" selection-start-line="60" selection-start-column="9" selection-end-line="60" selection-end-column="9" />
112
+              <folding>
113
+                <element signature="imports" expanded="true" />
114
+                <element signature="e#668#669#0" expanded="true" />
115
+                <element signature="e#700#701#0" expanded="true" />
116
+                <element signature="e#844#845#0" expanded="true" />
117
+                <element signature="e#869#870#0" expanded="true" />
118
+                <element signature="e#900#901#0" expanded="true" />
119
+                <element signature="e#927#928#0" expanded="true" />
120
+                <element signature="e#967#968#0" expanded="true" />
121
+                <element signature="e#999#1000#0" expanded="true" />
122
+                <element signature="e#1034#1035#0" expanded="true" />
123
+                <element signature="e#1065#1066#0" expanded="true" />
124
+                <element signature="e#1113#1114#0" expanded="true" />
125
+                <element signature="e#1153#1154#0" expanded="true" />
126
+                <element signature="e#1196#1197#0" expanded="true" />
127
+                <element signature="e#1234#1235#0" expanded="true" />
128
+              </folding>
129
+            </state>
130
+          </provider>
131
+        </entry>
132
+      </file>
133
+      <file pinned="false" current-in-tab="true">
134
+        <entry file="file://$PROJECT_DIR$/src/main/java/AccountApp.java">
135
+          <provider selected="true" editor-type-id="text-editor">
136
+            <state relative-caret-position="119">
137
+              <caret line="98" column="170" selection-start-line="98" selection-start-column="170" selection-end-line="98" selection-end-column="170" />
138
+              <folding>
139
+                <element signature="imports" expanded="true" />
140
+              </folding>
141
+            </state>
142
+          </provider>
143
+        </entry>
144
+      </file>
145
+      <file pinned="false" current-in-tab="false">
146
+        <entry file="das://3ecf0965-6508-43f8-9c0c-b1f029189476/schema/orm_lab/table/account">
147
+          <provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
148
+            <state>
149
+              <filtering enabled="true" />
150
+            </state>
151
+          </provider>
152
+        </entry>
153
+      </file>
154
+    </leaf>
155
+  </component>
156
+  <component name="FileTemplateManagerImpl">
157
+    <option name="RECENT_TEMPLATES">
158
+      <list>
159
+        <option value="Class" />
160
+      </list>
161
+    </option>
162
+  </component>
163
+  <component name="Git.Settings">
164
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
165
+  </component>
166
+  <component name="IdeDocumentHistory">
167
+    <option name="CHANGED_PATHS">
168
+      <list>
169
+        <option value="$PROJECT_DIR$/src/main/java/Account.java" />
170
+        <option value="$PROJECT_DIR$/pom.xml" />
171
+        <option value="$APPLICATION_CONFIG_DIR$/consoles/db/3ecf0965-6508-43f8-9c0c-b1f029189476/console.sql" />
172
+        <option value="$PROJECT_DIR$/src/main/java/MockDao.java" />
173
+        <option value="$PROJECT_DIR$/src/main/java/AccService.java" />
174
+        <option value="$PROJECT_DIR$/src/main/java/AccountApp.java" />
175
+      </list>
176
+    </option>
177
+  </component>
178
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
179
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
180
+  <component name="JsGulpfileManager">
181
+    <detection-done>true</detection-done>
182
+    <sorting>DEFINITION_ORDER</sorting>
183
+  </component>
184
+  <component name="MavenImportPreferences">
185
+    <option name="importingSettings">
186
+      <MavenImportingSettings>
187
+        <option name="importAutomatically" value="true" />
188
+      </MavenImportingSettings>
189
+    </option>
190
+  </component>
191
+  <component name="ProjectFrameBounds" fullScreen="true">
192
+    <option name="width" value="718" />
193
+    <option name="height" value="900" />
194
+  </component>
195
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
196
+  <component name="ProjectView">
197
+    <navigator proportions="" version="1">
198
+      <foldersAlwaysOnTop value="true" />
199
+    </navigator>
200
+    <panes>
201
+      <pane id="ProjectPane">
202
+        <subPane>
203
+          <expand>
204
+            <path>
205
+              <item name="ormlite" type="b2602c69:ProjectViewProjectNode" />
206
+              <item name="ormlite" type="462c0819:PsiDirectoryNode" />
207
+            </path>
208
+            <path>
209
+              <item name="ormlite" type="b2602c69:ProjectViewProjectNode" />
210
+              <item name="ormlite" type="462c0819:PsiDirectoryNode" />
211
+              <item name="src" type="462c0819:PsiDirectoryNode" />
212
+            </path>
213
+            <path>
214
+              <item name="ormlite" type="b2602c69:ProjectViewProjectNode" />
215
+              <item name="ormlite" type="462c0819:PsiDirectoryNode" />
216
+              <item name="src" type="462c0819:PsiDirectoryNode" />
217
+              <item name="main" type="462c0819:PsiDirectoryNode" />
218
+            </path>
219
+            <path>
220
+              <item name="ormlite" type="b2602c69:ProjectViewProjectNode" />
221
+              <item name="ormlite" type="462c0819:PsiDirectoryNode" />
222
+              <item name="src" type="462c0819:PsiDirectoryNode" />
223
+              <item name="main" type="462c0819:PsiDirectoryNode" />
224
+              <item name="java" type="462c0819:PsiDirectoryNode" />
225
+            </path>
226
+            <path>
227
+              <item name="ormlite" type="b2602c69:ProjectViewProjectNode" />
228
+              <item name="ormlite" type="462c0819:PsiDirectoryNode" />
229
+              <item name="src" type="462c0819:PsiDirectoryNode" />
230
+              <item name="test" type="462c0819:PsiDirectoryNode" />
231
+            </path>
232
+            <path>
233
+              <item name="ormlite" type="b2602c69:ProjectViewProjectNode" />
234
+              <item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
235
+            </path>
236
+          </expand>
237
+          <select />
238
+        </subPane>
239
+      </pane>
240
+      <pane id="PackagesPane" />
241
+      <pane id="Scope" />
242
+    </panes>
243
+  </component>
244
+  <component name="PropertiesComponent">
245
+    <property name="DatabaseDriversLRU" value="mysql" />
246
+    <property name="WebServerToolWindowFactoryState" value="false" />
247
+    <property name="aspect.path.notification.shown" value="true" />
248
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1542600244765" />
249
+    <property name="database.console.LAST_STATE" value="false" />
250
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
251
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
252
+    <property name="project.structure.last.edited" value="Modules" />
253
+    <property name="project.structure.proportion" value="0.15" />
254
+    <property name="project.structure.side.proportion" value="0.2" />
255
+    <property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
256
+  </component>
257
+  <component name="RunDashboard">
258
+    <option name="ruleStates">
259
+      <list>
260
+        <RuleState>
261
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
262
+        </RuleState>
263
+        <RuleState>
264
+          <option name="name" value="StatusDashboardGroupingRule" />
265
+        </RuleState>
266
+      </list>
267
+    </option>
268
+  </component>
269
+  <component name="RunManager">
270
+    <configuration name="AccountApp" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
271
+      <option name="MAIN_CLASS_NAME" value="AccountApp" />
272
+      <module name="ormlite" />
273
+      <method v="2">
274
+        <option name="Make" enabled="true" />
275
+      </method>
276
+    </configuration>
277
+    <recent_temporary>
278
+      <list>
279
+        <item itemvalue="Application.AccountApp" />
280
+      </list>
281
+    </recent_temporary>
282
+  </component>
283
+  <component name="SvnConfiguration">
284
+    <configuration />
285
+  </component>
286
+  <component name="TaskManager">
287
+    <task active="true" id="Default" summary="Default task">
288
+      <changelist id="84beed31-9db2-4552-8663-3f94fa8b2eb8" name="Default Changelist" comment="" />
289
+      <created>1542329961086</created>
290
+      <option name="number" value="Default" />
291
+      <option name="presentableId" value="Default" />
292
+      <updated>1542329961086</updated>
293
+      <workItem from="1542329962506" duration="4596000" />
294
+      <workItem from="1542402324710" duration="2652000" />
295
+      <workItem from="1542596685610" duration="3664000" />
296
+    </task>
297
+    <servers />
298
+  </component>
299
+  <component name="TimeTrackingManager">
300
+    <option name="totallyTimeSpent" value="10912000" />
301
+  </component>
302
+  <component name="ToolWindowManager">
303
+    <frame x="0" y="0" width="1440" height="900" extended-state="0" />
304
+    <editor active="true" />
305
+    <layout>
306
+      <window_info id="UI Designer" order="0" />
307
+      <window_info id="Favorites" order="1" side_tool="true" />
308
+      <window_info id="Capture Tool" order="2" />
309
+      <window_info id="Image Layers" order="3" />
310
+      <window_info id="Designer" order="4" />
311
+      <window_info content_ui="combo" id="Project" order="5" visible="true" weight="0.16738197" />
312
+      <window_info id="Structure" order="6" side_tool="true" weight="0.25" />
313
+      <window_info anchor="bottom" id="Terminal" order="0" />
314
+      <window_info anchor="bottom" id="Event Log" order="1" side_tool="true" />
315
+      <window_info anchor="bottom" id="Database Changes" order="2" />
316
+      <window_info anchor="bottom" id="Messages" order="3" weight="0.32891566" />
317
+      <window_info anchor="bottom" id="Version Control" order="4" show_stripe_button="false" />
318
+      <window_info anchor="bottom" id="Database Console" order="5" weight="0.32891566" />
319
+      <window_info anchor="bottom" id="Message" order="6" />
320
+      <window_info anchor="bottom" id="Find" order="7" />
321
+      <window_info anchor="bottom" id="Run" order="8" weight="0.32891566" />
322
+      <window_info anchor="bottom" id="Debug" order="9" weight="0.4" />
323
+      <window_info anchor="bottom" id="Cvs" order="10" weight="0.25" />
324
+      <window_info anchor="bottom" id="Inspection" order="11" weight="0.4" />
325
+      <window_info anchor="bottom" id="TODO" order="12" />
326
+      <window_info anchor="right" id="Capture Analysis" order="0" />
327
+      <window_info anchor="right" id="Maven Projects" order="1" />
328
+      <window_info anchor="right" id="SciView" order="2" />
329
+      <window_info anchor="right" id="Database" order="3" visible="true" weight="0.2539342" />
330
+      <window_info anchor="right" id="Palette&#9;" order="4" />
331
+      <window_info anchor="right" id="Theme Preview" order="5" />
332
+      <window_info anchor="right" id="Coverage" order="6" side_tool="true" weight="0.32967034" />
333
+      <window_info anchor="right" id="Palette" order="7" />
334
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="8" type="SLIDING" weight="0.4" />
335
+      <window_info anchor="right" id="Ant Build" order="9" weight="0.25" />
336
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="10" weight="0.25" />
337
+    </layout>
338
+  </component>
339
+  <component name="TypeScriptGeneratedFilesManager">
340
+    <option name="version" value="1" />
341
+  </component>
342
+  <component name="VcsContentAnnotationSettings">
343
+    <option name="myLimit" value="2678400000" />
344
+  </component>
345
+  <component name="editorHistoryManager">
346
+    <entry file="file://$PROJECT_DIR$/ormlite.iml">
347
+      <provider selected="true" editor-type-id="text-editor" />
348
+    </entry>
349
+    <entry file="file://$PROJECT_DIR$/pom.xml">
350
+      <provider selected="true" editor-type-id="text-editor">
351
+        <state relative-caret-position="465">
352
+          <caret line="31" column="19" selection-start-line="31" selection-start-column="19" selection-end-line="31" selection-end-column="19" />
353
+        </state>
354
+      </provider>
355
+    </entry>
356
+    <entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/3ecf0965-6508-43f8-9c0c-b1f029189476/console.sql">
357
+      <provider selected="true" editor-type-id="text-editor">
358
+        <state relative-caret-position="15">
359
+          <caret line="1" column="21" selection-start-line="1" selection-start-column="21" selection-end-line="1" selection-end-column="21" />
360
+        </state>
361
+      </provider>
362
+    </entry>
363
+    <entry file="file://$PROJECT_DIR$/src/main/java/AccService.java">
364
+      <provider selected="true" editor-type-id="text-editor">
365
+        <state relative-caret-position="90">
366
+          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
367
+          <folding>
368
+            <element signature="imports" expanded="true" />
369
+          </folding>
370
+        </state>
371
+      </provider>
372
+    </entry>
373
+    <entry file="file://$PROJECT_DIR$/src/main/java/MockDao.java">
374
+      <provider selected="true" editor-type-id="text-editor">
375
+        <state relative-caret-position="120">
376
+          <caret line="8" lean-forward="true" selection-start-line="8" selection-end-line="8" />
377
+        </state>
378
+      </provider>
379
+    </entry>
380
+    <entry file="file://$PROJECT_DIR$/src/main/java/Account.java">
381
+      <provider selected="true" editor-type-id="text-editor">
382
+        <state relative-caret-position="806">
383
+          <caret line="60" column="9" lean-forward="true" selection-start-line="60" selection-start-column="9" selection-end-line="60" selection-end-column="9" />
384
+          <folding>
385
+            <element signature="imports" expanded="true" />
386
+            <element signature="e#668#669#0" expanded="true" />
387
+            <element signature="e#700#701#0" expanded="true" />
388
+            <element signature="e#844#845#0" expanded="true" />
389
+            <element signature="e#869#870#0" expanded="true" />
390
+            <element signature="e#900#901#0" expanded="true" />
391
+            <element signature="e#927#928#0" expanded="true" />
392
+            <element signature="e#967#968#0" expanded="true" />
393
+            <element signature="e#999#1000#0" expanded="true" />
394
+            <element signature="e#1034#1035#0" expanded="true" />
395
+            <element signature="e#1065#1066#0" expanded="true" />
396
+            <element signature="e#1113#1114#0" expanded="true" />
397
+            <element signature="e#1153#1154#0" expanded="true" />
398
+            <element signature="e#1196#1197#0" expanded="true" />
399
+            <element signature="e#1234#1235#0" expanded="true" />
400
+          </folding>
401
+        </state>
402
+      </provider>
403
+    </entry>
404
+    <entry file="das://3ecf0965-6508-43f8-9c0c-b1f029189476/schema/orm_lab/table/account">
405
+      <provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
406
+        <state>
407
+          <filtering enabled="true" />
408
+        </state>
409
+      </provider>
410
+    </entry>
411
+    <entry file="file://$PROJECT_DIR$/src/main/java/AccountApp.java">
412
+      <provider selected="true" editor-type-id="text-editor">
413
+        <state relative-caret-position="119">
414
+          <caret line="98" column="170" selection-start-line="98" selection-start-column="170" selection-end-line="98" selection-end-column="170" />
415
+          <folding>
416
+            <element signature="imports" expanded="true" />
417
+          </folding>
418
+        </state>
419
+      </provider>
420
+    </entry>
421
+  </component>
422
+  <component name="masterDetails">
423
+    <states>
424
+      <state key="ArtifactsStructureConfigurable.UI">
425
+        <settings>
426
+          <artifact-editor />
427
+          <splitter-proportions>
428
+            <option name="proportions">
429
+              <list>
430
+                <option value="0.2" />
431
+              </list>
432
+            </option>
433
+          </splitter-proportions>
434
+        </settings>
435
+      </state>
436
+      <state key="FacetStructureConfigurable.UI">
437
+        <settings>
438
+          <last-edited>No facets are configured</last-edited>
439
+          <splitter-proportions>
440
+            <option name="proportions">
441
+              <list>
442
+                <option value="0.2" />
443
+              </list>
444
+            </option>
445
+          </splitter-proportions>
446
+        </settings>
447
+      </state>
448
+      <state key="GlobalLibrariesConfigurable.UI">
449
+        <settings>
450
+          <splitter-proportions>
451
+            <option name="proportions">
452
+              <list>
453
+                <option value="0.2" />
454
+              </list>
455
+            </option>
456
+          </splitter-proportions>
457
+        </settings>
458
+      </state>
459
+      <state key="JdkListConfigurable.UI">
460
+        <settings>
461
+          <last-edited>1.8</last-edited>
462
+          <splitter-proportions>
463
+            <option name="proportions">
464
+              <list>
465
+                <option value="0.2" />
466
+              </list>
467
+            </option>
468
+          </splitter-proportions>
469
+        </settings>
470
+      </state>
471
+      <state key="ModuleStructureConfigurable.UI">
472
+        <settings>
473
+          <last-edited>ormlite</last-edited>
474
+          <splitter-proportions>
475
+            <option name="proportions">
476
+              <list>
477
+                <option value="0.2" />
478
+                <option value="0.6" />
479
+              </list>
480
+            </option>
481
+          </splitter-proportions>
482
+        </settings>
483
+      </state>
484
+      <state key="ProjectJDKs.UI">
485
+        <settings>
486
+          <last-edited>1.8</last-edited>
487
+          <splitter-proportions>
488
+            <option name="proportions">
489
+              <list>
490
+                <option value="0.2" />
491
+              </list>
492
+            </option>
493
+          </splitter-proportions>
494
+        </settings>
495
+      </state>
496
+      <state key="ProjectLibrariesConfigurable.UI">
497
+        <settings>
498
+          <last-edited>Maven: com.j256.ormlite:ormlite-core:4.48</last-edited>
499
+          <splitter-proportions>
500
+            <option name="proportions">
501
+              <list>
502
+                <option value="0.2" />
503
+              </list>
504
+            </option>
505
+          </splitter-proportions>
506
+        </settings>
507
+      </state>
508
+    </states>
509
+  </component>
510
+</project>

+ 2
- 0
ormlite/ormlite.iml Voir le fichier

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

+ 34
- 0
ormlite/pom.xml Voir le fichier

@@ -0,0 +1,34 @@
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>ormlite</groupId>
8
+    <artifactId>ormlite</artifactId>
9
+    <version>1.0-SNAPSHOT</version>
10
+    <dependencies>
11
+
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
+    </dependencies>
33
+
34
+</project>

+ 64
- 0
ormlite/src/main/java/Account.java Voir le fichier

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

+ 148
- 0
ormlite/src/main/java/AccountApp.java Voir le fichier

@@ -0,0 +1,148 @@
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
+
7
+import java.util.Scanner;
8
+
9
+public class AccountApp {
10
+
11
+    // we are using a MySQl database
12
+    private final static String DATABASE_URL = "jdbc:mysql://localhost:3306/orm_lab?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC";
13
+
14
+    private Dao<Account, Integer> accountDao;
15
+
16
+    public static void main(String[] args) throws Exception {
17
+        // turn our static method into an instance of Main
18
+        new AccountApp().doMain(args);
19
+    }
20
+
21
+    private void doMain(String[] args) throws Exception {
22
+        ConnectionSource connectionSource = null;
23
+        try {
24
+            // create our data-source for the database
25
+            connectionSource = new JdbcConnectionSource(DATABASE_URL, "root", "Samsimsam@91");
26
+            // setup our  DAOs
27
+            setupDao(connectionSource);
28
+            boolean run = true;
29
+ while (run) {
30
+     Scanner scanner = new Scanner(System.in);
31
+     System.out.println("Welcome to account services, please select an option: " + "\n");
32
+     System.out.println("Enter 1 to Create " + "\n" + "Enter 2 to Read " + "\n" + "Enter 3 to Update " + "\n" + "Enter 4 to Delete " + "\n" + "Enter 5 to Exit " + "\n");
33
+     int choice = scanner.nextInt();
34
+     switch (choice) {
35
+         case 1:
36
+             createData();
37
+             break;
38
+         case 2:
39
+             readData();
40
+             break;
41
+         case 3:
42
+             updateData();
43
+             break;
44
+         case 4:
45
+             deleteData();
46
+             break;
47
+         case 5:
48
+             run = false;
49
+             break;
50
+     }
51
+ }
52
+
53
+        } finally {
54
+            // destroy the data source which should close underlying connections
55
+            if (connectionSource != null) {
56
+                connectionSource.close();
57
+            }
58
+        }
59
+    }
60
+
61
+    /**
62
+     * Read and write some example data.
63
+     */
64
+    private void processData() throws Exception {
65
+        // create an instance of Account
66
+        String name = "Jim Coakley";
67
+        Account account = new Account(name);
68
+
69
+        // persist the account object to the database
70
+        accountDao.create(account);
71
+        int id = account.getId();
72
+        System.out.println(id);
73
+        // assign a password
74
+        account.setPassword("_secret");
75
+        // update the database after changing the object
76
+        accountDao.update(account);
77
+        // delete the account
78
+        //accountDao.deleteById(id);
79
+    }
80
+
81
+    private void createData() throws Exception {
82
+        // create an instance of Account
83
+
84
+        Scanner scanner= new Scanner(System.in);
85
+        System.out.println("Enter the name: ");
86
+        String name = scanner.nextLine();
87
+        Account account = new Account(name);
88
+        accountDao.create(account);
89
+
90
+    }
91
+
92
+    private void readData() throws Exception {
93
+
94
+
95
+        Scanner scanner= new Scanner(System.in);
96
+        System.out.println("Enter the id for the record you want to read: ");
97
+        int id = scanner.nextInt();
98
+        Account account1 = accountDao.queryForId(id); // returns account object where id is equal to user input
99
+        String resultAccount = account1.getName(); // using getter to get the //everyrow in database is one object in java //always fetch row you want to make changes to.pw
100
+        System.out.println( "The account is :" + resultAccount );
101
+        String resultPassword = account1.getPassword();
102
+        System.out.println( "The password is :" + resultPassword );
103
+
104
+    }
105
+
106
+
107
+    private void updateData() throws Exception {
108
+        Scanner scanner= new Scanner(System.in);
109
+        System.out.println("Enter the id for the record you want to update: ");
110
+        int id = scanner.nextInt();
111
+        Account account1 = accountDao.queryForId(id); // equivalted to database query: select * from account where id = user_input;
112
+        Scanner scanner1= new Scanner(System.in);
113
+
114
+        System.out.println("Enter the updated Name: ");
115
+        String updatedName = scanner1.nextLine();
116
+        account1.setName(updatedName);
117
+
118
+        Scanner scanner2= new Scanner(System.in);
119
+        System.out.println("Enter the updated Password: ");
120
+        String updatedPassword = scanner2.nextLine();
121
+        account1.setPassword(updatedPassword);
122
+        accountDao.update(account1);
123
+        System.out.println("Update successful for id : " + id);
124
+
125
+
126
+    }
127
+
128
+
129
+    private void deleteData() throws Exception {
130
+        Scanner scanner= new Scanner(System.in);
131
+        System.out.println("Enter the id for the record you want to delete: ");
132
+        int id = scanner.nextInt();
133
+        accountDao.deleteById(id);
134
+        System.out.println("Delete successful for id : " + id);
135
+    }
136
+
137
+
138
+
139
+
140
+    /**
141
+     * Setup our  DAOs
142
+     */
143
+    private void setupDao(ConnectionSource connectionSource) throws Exception {
144
+
145
+        accountDao = DaoManager.createDao(connectionSource, Account.class);
146
+
147
+    }
148
+}

BIN
ormlite/target/classes/Account.class Voir le fichier


BIN
ormlite/target/classes/AccountApp.class Voir le fichier