Kate Moore il y a 6 ans
Parent
révision
b519c34b27

BIN
.DS_Store Voir le fichier


BIN
ormsimpleaccount/.DS_Store Voir le fichier


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

+ 15
- 0
ormsimpleaccount/.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="orm_lab@localhost" uuid="e6c90a86-d2e3-448d-8a83-f0533350dd45">
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
ormsimpleaccount/.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="orm_lab@localhost" uuid="e6c90a86-d2e3-448d-8a83-f0533350dd45">
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>

+ 1137
- 0
ormsimpleaccount/.idea/dataSources/e6c90a86-d2e3-448d-8a83-f0533350dd45.xml
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 14
- 0
ormsimpleaccount/.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>

+ 602
- 0
ormsimpleaccount/.idea/workspace.xml Voir le fichier

@@ -0,0 +1,602 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="09c9288b-6242-4d0c-9460-0304ebb7dfd3" 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="orm_lab@localhost" type="feb32156:DbDataSourceImpl" />
28
+      </path>
29
+      <path>
30
+        <item name="Database" type="3277223f:DatabaseStructure$DbRootGroup" />
31
+        <item name="orm_lab@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="orm_lab@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="orm_lab@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="-1161496106">
52
+      <usages-collector id="statistics.lifecycle.project">
53
+        <counts>
54
+          <entry key="project.closed" value="3" />
55
+          <entry key="project.open.time.1" value="1" />
56
+          <entry key="project.open.time.2" value="1" />
57
+          <entry key="project.open.time.7" value="1" />
58
+          <entry key="project.opened" value="3" />
59
+        </counts>
60
+      </usages-collector>
61
+      <usages-collector id="statistics.file.extensions.edit">
62
+        <counts>
63
+          <entry key="java" value="6851" />
64
+          <entry key="txt" value="7" />
65
+          <entry key="xml" value="18" />
66
+        </counts>
67
+      </usages-collector>
68
+      <usages-collector id="statistics.file.types.edit">
69
+        <counts>
70
+          <entry key="JAVA" value="6851" />
71
+          <entry key="PLAIN_TEXT" value="7" />
72
+          <entry key="XML" value="18" />
73
+        </counts>
74
+      </usages-collector>
75
+      <usages-collector id="statistics.file.extensions.open">
76
+        <counts>
77
+          <entry key="account" value="2" />
78
+          <entry key="class" value="4" />
79
+          <entry key="java" value="6" />
80
+          <entry key="sql" value="4" />
81
+        </counts>
82
+      </usages-collector>
83
+      <usages-collector id="statistics.file.types.open">
84
+        <counts>
85
+          <entry key="CLASS" value="4" />
86
+          <entry key="Database Element" value="2" />
87
+          <entry key="JAVA" value="6" />
88
+          <entry key="Scratch" value="4" />
89
+        </counts>
90
+      </usages-collector>
91
+    </session>
92
+  </component>
93
+  <component name="FileEditorManager">
94
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
95
+      <file pinned="false" current-in-tab="false">
96
+        <entry file="file://$PROJECT_DIR$/src/main/java/Account.java">
97
+          <provider selected="true" editor-type-id="text-editor">
98
+            <state relative-caret-position="-146">
99
+              <caret line="5" column="13" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
100
+              <folding>
101
+                <element signature="imports" expanded="true" />
102
+                <element signature="e#669#670#0" expanded="true" />
103
+                <element signature="e#701#702#0" expanded="true" />
104
+                <element signature="e#845#846#0" expanded="true" />
105
+                <element signature="e#870#871#0" expanded="true" />
106
+                <element signature="e#901#902#0" expanded="true" />
107
+                <element signature="e#928#929#0" expanded="true" />
108
+                <element signature="e#968#969#0" expanded="true" />
109
+                <element signature="e#1000#1001#0" expanded="true" />
110
+                <element signature="e#1035#1036#0" expanded="true" />
111
+                <element signature="e#1066#1067#0" expanded="true" />
112
+                <element signature="e#1114#1115#0" expanded="true" />
113
+                <element signature="e#1154#1155#0" expanded="true" />
114
+                <element signature="e#1197#1198#0" expanded="true" />
115
+                <element signature="e#1235#1236#0" expanded="true" />
116
+              </folding>
117
+            </state>
118
+          </provider>
119
+        </entry>
120
+      </file>
121
+      <file pinned="false" current-in-tab="true">
122
+        <entry file="file://$PROJECT_DIR$/src/main/java/AccountServices.java">
123
+          <provider selected="true" editor-type-id="text-editor">
124
+            <state relative-caret-position="105">
125
+              <caret line="7" lean-forward="true" selection-start-line="7" selection-end-line="7" />
126
+              <folding>
127
+                <element signature="imports" expanded="true" />
128
+              </folding>
129
+            </state>
130
+          </provider>
131
+        </entry>
132
+      </file>
133
+      <file pinned="false" current-in-tab="false">
134
+        <entry file="file://$PROJECT_DIR$/src/main/java/MockDao.java">
135
+          <provider selected="true" editor-type-id="text-editor">
136
+            <state relative-caret-position="204">
137
+              <caret line="94" column="49" selection-start-line="94" selection-start-column="49" selection-end-line="94" selection-end-column="49" />
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="file://$PROJECT_DIR$/src/main/java/AccountApp.java">
147
+          <provider selected="true" editor-type-id="text-editor">
148
+            <state relative-caret-position="210">
149
+              <caret line="54" column="53" selection-start-line="54" selection-start-column="53" selection-end-line="54" selection-end-column="53" />
150
+              <folding>
151
+                <element signature="imports" expanded="true" />
152
+              </folding>
153
+            </state>
154
+          </provider>
155
+        </entry>
156
+      </file>
157
+      <file pinned="false" current-in-tab="false">
158
+        <entry file="file://$PROJECT_DIR$/src/test/java/AccountServicesTest.java">
159
+          <provider selected="true" editor-type-id="text-editor">
160
+            <state relative-caret-position="150">
161
+              <caret line="23" column="52" selection-start-line="23" selection-start-column="52" selection-end-line="23" selection-end-column="52" />
162
+              <folding>
163
+                <element signature="imports" expanded="true" />
164
+              </folding>
165
+            </state>
166
+          </provider>
167
+        </entry>
168
+      </file>
169
+      <file pinned="false" current-in-tab="false">
170
+        <entry file="file://$PROJECT_DIR$/src/main/java/Console.java">
171
+          <provider selected="true" editor-type-id="text-editor">
172
+            <state relative-caret-position="245">
173
+              <caret line="42" column="65" lean-forward="true" selection-start-line="42" selection-start-column="65" selection-end-line="42" selection-end-column="65" />
174
+            </state>
175
+          </provider>
176
+        </entry>
177
+      </file>
178
+      <file pinned="false" current-in-tab="false">
179
+        <entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/e6c90a86-d2e3-448d-8a83-f0533350dd45/console.sql">
180
+          <provider selected="true" editor-type-id="text-editor" />
181
+        </entry>
182
+      </file>
183
+    </leaf>
184
+  </component>
185
+  <component name="FileTemplateManagerImpl">
186
+    <option name="RECENT_TEMPLATES">
187
+      <list>
188
+        <option value="Class" />
189
+      </list>
190
+    </option>
191
+  </component>
192
+  <component name="IdeDocumentHistory">
193
+    <option name="CHANGED_PATHS">
194
+      <list>
195
+        <option value="$PROJECT_DIR$/src/main/java/Account.java" />
196
+        <option value="$PROJECT_DIR$/pom.xml" />
197
+        <option value="$PROJECT_DIR$/src/main/java/AccoutServices.java" />
198
+        <option value="$PROJECT_DIR$/src/main/java/Console.java" />
199
+        <option value="$PROJECT_DIR$/src/main/java/MockDao.java" />
200
+        <option value="$PROJECT_DIR$/src/test/java/AccountServicesTest.java" />
201
+        <option value="$PROJECT_DIR$/src/main/java/AccountApp.java" />
202
+        <option value="$PROJECT_DIR$/src/main/java/AccountServices.java" />
203
+      </list>
204
+    </option>
205
+  </component>
206
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
207
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
208
+  <component name="JsGulpfileManager">
209
+    <detection-done>true</detection-done>
210
+    <sorting>DEFINITION_ORDER</sorting>
211
+  </component>
212
+  <component name="MavenImportPreferences">
213
+    <option name="importingSettings">
214
+      <MavenImportingSettings>
215
+        <option name="importAutomatically" value="true" />
216
+      </MavenImportingSettings>
217
+    </option>
218
+  </component>
219
+  <component name="ProjectFrameBounds">
220
+    <option name="x" value="15" />
221
+    <option name="y" value="31" />
222
+    <option name="width" value="1205" />
223
+    <option name="height" value="709" />
224
+  </component>
225
+  <component name="ProjectView">
226
+    <navigator proportions="" version="1">
227
+      <foldersAlwaysOnTop value="true" />
228
+    </navigator>
229
+    <panes />
230
+  </component>
231
+  <component name="PropertiesComponent">
232
+    <property name="DatabaseDriversLRU" value="mysql" />
233
+    <property name="WebServerToolWindowFactoryState" value="false" />
234
+    <property name="aspect.path.notification.shown" value="true" />
235
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1542576026967" />
236
+    <property name="database.console.LAST_STATE" value="false" />
237
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
238
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
239
+    <property name="project.structure.last.edited" value="Modules" />
240
+    <property name="project.structure.proportion" value="0.15" />
241
+    <property name="project.structure.side.proportion" value="0.1150748" />
242
+  </component>
243
+  <component name="RunDashboard">
244
+    <option name="ruleStates">
245
+      <list>
246
+        <RuleState>
247
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
248
+        </RuleState>
249
+        <RuleState>
250
+          <option name="name" value="StatusDashboardGroupingRule" />
251
+        </RuleState>
252
+      </list>
253
+    </option>
254
+  </component>
255
+  <component name="RunManager" selected="Application.AccountApp">
256
+    <configuration name="AccountApp" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
257
+      <option name="MAIN_CLASS_NAME" value="AccountApp" />
258
+      <module name="ormsimpleaccount" />
259
+      <method v="2">
260
+        <option name="Make" enabled="true" />
261
+      </method>
262
+    </configuration>
263
+    <configuration name="AccountServicesTest.testCreate" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
264
+      <module name="ormsimpleaccount" />
265
+      <option name="PACKAGE_NAME" value="" />
266
+      <option name="MAIN_CLASS_NAME" value="AccountServicesTest" />
267
+      <option name="METHOD_NAME" value="testCreate" />
268
+      <option name="TEST_OBJECT" value="method" />
269
+      <method v="2">
270
+        <option name="Make" enabled="true" />
271
+      </method>
272
+    </configuration>
273
+    <configuration name="AccountServicesTest.testDelete" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
274
+      <module name="ormsimpleaccount" />
275
+      <option name="PACKAGE_NAME" value="" />
276
+      <option name="MAIN_CLASS_NAME" value="AccountServicesTest" />
277
+      <option name="METHOD_NAME" value="testDelete" />
278
+      <option name="TEST_OBJECT" value="method" />
279
+      <method v="2">
280
+        <option name="Make" enabled="true" />
281
+      </method>
282
+    </configuration>
283
+    <list>
284
+      <item itemvalue="Application.AccountApp" />
285
+      <item itemvalue="JUnit.AccountServicesTest.testCreate" />
286
+      <item itemvalue="JUnit.AccountServicesTest.testDelete" />
287
+    </list>
288
+    <recent_temporary>
289
+      <list>
290
+        <item itemvalue="Application.AccountApp" />
291
+        <item itemvalue="JUnit.AccountServicesTest.testCreate" />
292
+        <item itemvalue="JUnit.AccountServicesTest.testDelete" />
293
+      </list>
294
+    </recent_temporary>
295
+  </component>
296
+  <component name="SvnConfiguration">
297
+    <configuration />
298
+  </component>
299
+  <component name="TaskManager">
300
+    <task active="true" id="Default" summary="Default task">
301
+      <changelist id="09c9288b-6242-4d0c-9460-0304ebb7dfd3" name="Default Changelist" comment="" />
302
+      <created>1542404180795</created>
303
+      <option name="number" value="Default" />
304
+      <option name="presentableId" value="Default" />
305
+      <updated>1542404180795</updated>
306
+      <workItem from="1542404188315" duration="2050000" />
307
+      <workItem from="1542472193278" duration="24894000" />
308
+      <workItem from="1542572425224" duration="3037000" />
309
+    </task>
310
+    <servers />
311
+  </component>
312
+  <component name="TestHistory">
313
+    <history-entry file="AccountServicesTest_testDelete - 2018.11.17 at 23h 17m 26s.xml">
314
+      <configuration name="AccountServicesTest.testDelete" configurationId="JUnit" />
315
+    </history-entry>
316
+    <history-entry file="AccountServicesTest_testCreate - 2018.11.18 at 09h 31m 01s.xml">
317
+      <configuration name="AccountServicesTest.testCreate" configurationId="JUnit" />
318
+    </history-entry>
319
+    <history-entry file="AccountServicesTest_testCreate - 2018.11.18 at 09h 32m 18s.xml">
320
+      <configuration name="AccountServicesTest.testCreate" configurationId="JUnit" />
321
+    </history-entry>
322
+    <history-entry file="AccountServicesTest_testCreate - 2018.11.18 at 09h 36m 37s.xml">
323
+      <configuration name="AccountServicesTest.testCreate" configurationId="JUnit" />
324
+    </history-entry>
325
+    <history-entry file="AccountServicesTest_testCreate - 2018.11.18 at 09h 36m 48s.xml">
326
+      <configuration name="AccountServicesTest.testCreate" configurationId="JUnit" />
327
+    </history-entry>
328
+    <history-entry file="AccountServicesTest_testCreate - 2018.11.18 at 09h 39m 38s.xml">
329
+      <configuration name="AccountServicesTest.testCreate" configurationId="JUnit" />
330
+    </history-entry>
331
+    <history-entry file="AccountServicesTest_testCreate - 2018.11.18 at 09h 39m 51s.xml">
332
+      <configuration name="AccountServicesTest.testCreate" configurationId="JUnit" />
333
+    </history-entry>
334
+    <history-entry file="AccountServicesTest_testCreate - 2018.11.18 at 09h 39m 57s.xml">
335
+      <configuration name="AccountServicesTest.testCreate" configurationId="JUnit" />
336
+    </history-entry>
337
+    <history-entry file="AccountServicesTest_testCreate - 2018.11.18 at 09h 40m 05s.xml">
338
+      <configuration name="AccountServicesTest.testCreate" configurationId="JUnit" />
339
+    </history-entry>
340
+    <history-entry file="AccountServicesTest_testCreate - 2018.11.18 at 09h 40m 12s.xml">
341
+      <configuration name="AccountServicesTest.testCreate" configurationId="JUnit" />
342
+    </history-entry>
343
+  </component>
344
+  <component name="TimeTrackingManager">
345
+    <option name="totallyTimeSpent" value="29981000" />
346
+  </component>
347
+  <component name="ToolWindowManager">
348
+    <frame x="15" y="31" width="1205" height="709" extended-state="0" />
349
+    <editor active="true" />
350
+    <layout>
351
+      <window_info content_ui="combo" id="Project" order="0" weight="0.2092084" />
352
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
353
+      <window_info id="Image Layers" order="2" />
354
+      <window_info id="Designer" order="3" />
355
+      <window_info id="UI Designer" order="4" />
356
+      <window_info id="Capture Tool" order="5" />
357
+      <window_info id="Favorites" order="6" side_tool="true" />
358
+      <window_info anchor="bottom" id="Message" order="0" />
359
+      <window_info anchor="bottom" id="Find" order="1" />
360
+      <window_info anchor="bottom" id="Run" order="2" weight="0.60615885" />
361
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
362
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
363
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
364
+      <window_info anchor="bottom" id="TODO" order="6" />
365
+      <window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" />
366
+      <window_info anchor="bottom" id="Database Changes" order="8" weight="0.32901135" />
367
+      <window_info anchor="bottom" id="Terminal" order="9" />
368
+      <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
369
+      <window_info anchor="bottom" id="Messages" order="11" weight="0.3241491" />
370
+      <window_info anchor="bottom" id="Database Console" order="12" weight="0.3273906" />
371
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
372
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
373
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
374
+      <window_info anchor="right" id="Palette" order="3" />
375
+      <window_info anchor="right" id="Capture Analysis" order="4" />
376
+      <window_info anchor="right" id="Database" order="5" weight="0.09127625" />
377
+      <window_info anchor="right" id="Theme Preview" order="6" />
378
+      <window_info anchor="right" id="Palette&#9;" order="7" />
379
+      <window_info anchor="right" id="Maven Projects" order="8" />
380
+    </layout>
381
+  </component>
382
+  <component name="TypeScriptGeneratedFilesManager">
383
+    <option name="version" value="1" />
384
+  </component>
385
+  <component name="VcsContentAnnotationSettings">
386
+    <option name="myLimit" value="2678400000" />
387
+  </component>
388
+  <component name="editorHistoryManager">
389
+    <entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/45168bef-dcde-473f-a348-b9e4294c77b1/console.sql">
390
+      <provider selected="true" editor-type-id="text-editor" />
391
+    </entry>
392
+    <entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/d2dbc632-0e56-4b50-9eeb-511c008ea6c6/console.sql">
393
+      <provider selected="true" editor-type-id="text-editor" />
394
+    </entry>
395
+    <entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/88dc00a4-4508-4d97-a9a2-9cf4437aff43/console.sql">
396
+      <provider selected="true" editor-type-id="text-editor" />
397
+    </entry>
398
+    <entry file="jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6.jar!/com/mysql/jdbc/Util.class">
399
+      <provider selected="true" editor-type-id="text-editor">
400
+        <state relative-caret-position="194">
401
+          <caret line="233" selection-start-line="233" selection-end-line="233" />
402
+        </state>
403
+      </provider>
404
+    </entry>
405
+    <entry file="file://$PROJECT_DIR$/pom.xml">
406
+      <provider selected="true" editor-type-id="text-editor">
407
+        <state relative-caret-position="465">
408
+          <caret line="31" selection-start-line="31" selection-end-line="31" />
409
+        </state>
410
+      </provider>
411
+    </entry>
412
+    <entry file="das://e6c90a86-d2e3-448d-8a83-f0533350dd45/schema/orm_lab/table/account">
413
+      <provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
414
+        <state>
415
+          <filtering enabled="true" />
416
+        </state>
417
+      </provider>
418
+    </entry>
419
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/runners/BlockJUnit4ClassRunner.class">
420
+      <provider selected="true" editor-type-id="text-editor">
421
+        <state relative-caret-position="315">
422
+          <caret line="49" selection-start-line="49" selection-end-line="49" />
423
+        </state>
424
+      </provider>
425
+    </entry>
426
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/runners/ParentRunner.class">
427
+      <provider selected="true" editor-type-id="text-editor">
428
+        <state relative-caret-position="137">
429
+          <caret line="203" selection-start-line="203" selection-end-line="203" />
430
+        </state>
431
+      </provider>
432
+    </entry>
433
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/org/junit/internal/runners/model/ReflectiveCallable.class">
434
+      <provider selected="true" editor-type-id="text-editor">
435
+        <state relative-caret-position="210">
436
+          <caret line="17" selection-start-line="17" selection-end-line="17" />
437
+        </state>
438
+      </provider>
439
+    </entry>
440
+    <entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/e6c90a86-d2e3-448d-8a83-f0533350dd45/console.sql">
441
+      <provider selected="true" editor-type-id="text-editor" />
442
+    </entry>
443
+    <entry file="file://$PROJECT_DIR$/src/main/java/MockDao.java">
444
+      <provider selected="true" editor-type-id="text-editor">
445
+        <state relative-caret-position="204">
446
+          <caret line="94" column="49" selection-start-line="94" selection-start-column="49" selection-end-line="94" selection-end-column="49" />
447
+          <folding>
448
+            <element signature="imports" expanded="true" />
449
+          </folding>
450
+        </state>
451
+      </provider>
452
+    </entry>
453
+    <entry file="file://$PROJECT_DIR$/src/main/java/Console.java">
454
+      <provider selected="true" editor-type-id="text-editor">
455
+        <state relative-caret-position="245">
456
+          <caret line="42" column="65" lean-forward="true" selection-start-line="42" selection-start-column="65" selection-end-line="42" selection-end-column="65" />
457
+        </state>
458
+      </provider>
459
+    </entry>
460
+    <entry file="file://$PROJECT_DIR$/src/main/java/Account.java">
461
+      <provider selected="true" editor-type-id="text-editor">
462
+        <state relative-caret-position="-146">
463
+          <caret line="5" column="13" selection-start-line="5" selection-start-column="13" selection-end-line="5" selection-end-column="13" />
464
+          <folding>
465
+            <element signature="imports" expanded="true" />
466
+            <element signature="e#669#670#0" expanded="true" />
467
+            <element signature="e#701#702#0" expanded="true" />
468
+            <element signature="e#845#846#0" expanded="true" />
469
+            <element signature="e#870#871#0" expanded="true" />
470
+            <element signature="e#901#902#0" expanded="true" />
471
+            <element signature="e#928#929#0" expanded="true" />
472
+            <element signature="e#968#969#0" expanded="true" />
473
+            <element signature="e#1000#1001#0" expanded="true" />
474
+            <element signature="e#1035#1036#0" expanded="true" />
475
+            <element signature="e#1066#1067#0" expanded="true" />
476
+            <element signature="e#1114#1115#0" expanded="true" />
477
+            <element signature="e#1154#1155#0" expanded="true" />
478
+            <element signature="e#1197#1198#0" expanded="true" />
479
+            <element signature="e#1235#1236#0" expanded="true" />
480
+          </folding>
481
+        </state>
482
+      </provider>
483
+    </entry>
484
+    <entry file="file://$PROJECT_DIR$/src/main/java/AccountApp.java">
485
+      <provider selected="true" editor-type-id="text-editor">
486
+        <state relative-caret-position="210">
487
+          <caret line="54" column="53" selection-start-line="54" selection-start-column="53" selection-end-line="54" selection-end-column="53" />
488
+          <folding>
489
+            <element signature="imports" expanded="true" />
490
+          </folding>
491
+        </state>
492
+      </provider>
493
+    </entry>
494
+    <entry file="file://$PROJECT_DIR$/src/test/java/AccountServicesTest.java">
495
+      <provider selected="true" editor-type-id="text-editor">
496
+        <state relative-caret-position="150">
497
+          <caret line="23" column="52" selection-start-line="23" selection-start-column="52" selection-end-line="23" selection-end-column="52" />
498
+          <folding>
499
+            <element signature="imports" expanded="true" />
500
+          </folding>
501
+        </state>
502
+      </provider>
503
+    </entry>
504
+    <entry file="file://$PROJECT_DIR$/src/main/java/AccountServices.java">
505
+      <provider selected="true" editor-type-id="text-editor">
506
+        <state relative-caret-position="105">
507
+          <caret line="7" lean-forward="true" selection-start-line="7" selection-end-line="7" />
508
+          <folding>
509
+            <element signature="imports" expanded="true" />
510
+          </folding>
511
+        </state>
512
+      </provider>
513
+    </entry>
514
+  </component>
515
+  <component name="masterDetails">
516
+    <states>
517
+      <state key="ArtifactsStructureConfigurable.UI">
518
+        <settings>
519
+          <artifact-editor />
520
+          <splitter-proportions>
521
+            <option name="proportions">
522
+              <list>
523
+                <option value="0.2" />
524
+              </list>
525
+            </option>
526
+          </splitter-proportions>
527
+        </settings>
528
+      </state>
529
+      <state key="FacetStructureConfigurable.UI">
530
+        <settings>
531
+          <last-edited>No facets are configured</last-edited>
532
+          <splitter-proportions>
533
+            <option name="proportions">
534
+              <list>
535
+                <option value="0.2" />
536
+              </list>
537
+            </option>
538
+          </splitter-proportions>
539
+        </settings>
540
+      </state>
541
+      <state key="GlobalLibrariesConfigurable.UI">
542
+        <settings>
543
+          <splitter-proportions>
544
+            <option name="proportions">
545
+              <list>
546
+                <option value="0.2" />
547
+              </list>
548
+            </option>
549
+          </splitter-proportions>
550
+        </settings>
551
+      </state>
552
+      <state key="JdkListConfigurable.UI">
553
+        <settings>
554
+          <last-edited>1.8</last-edited>
555
+          <splitter-proportions>
556
+            <option name="proportions">
557
+              <list>
558
+                <option value="0.2" />
559
+              </list>
560
+            </option>
561
+          </splitter-proportions>
562
+        </settings>
563
+      </state>
564
+      <state key="ModuleStructureConfigurable.UI">
565
+        <settings>
566
+          <last-edited>ormsimpleaccount</last-edited>
567
+          <splitter-proportions>
568
+            <option name="proportions">
569
+              <list>
570
+                <option value="0.1150748" />
571
+                <option value="0.6" />
572
+              </list>
573
+            </option>
574
+          </splitter-proportions>
575
+        </settings>
576
+      </state>
577
+      <state key="ProjectJDKs.UI">
578
+        <settings>
579
+          <last-edited>1.8</last-edited>
580
+          <splitter-proportions>
581
+            <option name="proportions">
582
+              <list>
583
+                <option value="0.2" />
584
+              </list>
585
+            </option>
586
+          </splitter-proportions>
587
+        </settings>
588
+      </state>
589
+      <state key="ProjectLibrariesConfigurable.UI">
590
+        <settings>
591
+          <splitter-proportions>
592
+            <option name="proportions">
593
+              <list>
594
+                <option value="0.2" />
595
+              </list>
596
+            </option>
597
+          </splitter-proportions>
598
+        </settings>
599
+      </state>
600
+    </states>
601
+  </component>
602
+</project>

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

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

+ 40
- 0
ormsimpleaccount/pom.xml Voir le fichier

@@ -0,0 +1,40 @@
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 simple account</groupId>
8
+    <artifactId>orm simple account</artifactId>
9
+    <version>1.0-SNAPSHOT</version>
10
+    <dependencies>
11
+        <!-- https://mvnrepository.com/artifact/com.j256.ormlite/ormlite-core -->
12
+        <dependency>
13
+            <groupId>com.j256.ormlite</groupId>
14
+            <artifactId>ormlite-core</artifactId>
15
+            <version>4.48</version>
16
+        </dependency>
17
+
18
+        <!-- https://mvnrepository.com/artifact/com.j256.ormlite/ormlite-jdbc -->
19
+        <dependency>
20
+            <groupId>com.j256.ormlite</groupId>
21
+            <artifactId>ormlite-jdbc</artifactId>
22
+            <version>4.48</version>
23
+        </dependency>
24
+        <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
25
+        <dependency>
26
+            <groupId>mysql</groupId>
27
+            <artifactId>mysql-connector-java</artifactId>
28
+            <version>8.0.13</version>
29
+        </dependency>
30
+        <dependency>
31
+            <groupId>junit</groupId>
32
+            <artifactId>junit</artifactId>
33
+            <version>RELEASE</version>
34
+            <scope>test</scope>
35
+        </dependency>
36
+    </dependencies>
37
+
38
+
39
+</project>
40
+

BIN
ormsimpleaccount/src/.DS_Store Voir le fichier


BIN
ormsimpleaccount/src/main/.DS_Store Voir le fichier


+ 65
- 0
ormsimpleaccount/src/main/java/Account.java Voir le fichier

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

+ 73
- 0
ormsimpleaccount/src/main/java/AccountApp.java Voir le fichier

@@ -0,0 +1,73 @@
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
+
11
+    private Dao<Account, Integer> accountDao;
12
+    private Console c = new Console();
13
+
14
+    public static void main(String[] args) throws Exception {
15
+        // turn our static method into an instance of Main
16
+        new AccountApp().doMain(args);
17
+    }
18
+
19
+    private void doMain(String[] args) throws Exception {
20
+        ConnectionSource connectionSource = null;
21
+        try {
22
+            // create our data-source for the database
23
+            connectionSource = new JdbcConnectionSource(DATABASE_URL, "root", "");
24
+            // setup our  DAOs
25
+            setupDao(connectionSource);
26
+            // read, write and delete some data
27
+            processData();
28
+        } finally {
29
+            // destroy the data source which should close underlying connections
30
+            if (connectionSource != null) {
31
+                connectionSource.close();
32
+            }
33
+        }
34
+    }
35
+
36
+    /**
37
+     * Read and write some example data.
38
+     */
39
+    private void processData() throws Exception {
40
+
41
+        AccountServices acctService = new AccountServices(accountDao);
42
+        boolean contMenu = true;
43
+
44
+
45
+
46
+        while (contMenu) {
47
+            c.printMenu();
48
+            int input = c.inputNumber("Choose number to select: ");
49
+
50
+            if(input == 1) {
51
+                acctService.create(new Account(c.getUserName(), c.getUserPassword()));
52
+            } else if(input == 2) {
53
+                acctService.readAllAccounts(acctService.read());
54
+            } else if(input == 3) {
55
+                acctService.updateInput(c.getUserID(), accountDao.queryForId(c.getUserID()));
56
+            } else if(input == 4) {
57
+                acctService.delete(c.getUserID());
58
+            } else if(input == 5) {
59
+                contMenu = false;
60
+            }
61
+
62
+        }
63
+    }
64
+
65
+    /**
66
+     * Setup our  DAOs
67
+     */
68
+    private void setupDao(ConnectionSource connectionSource) throws Exception {
69
+
70
+        accountDao = DaoManager.createDao(connectionSource, Account.class);
71
+
72
+    }
73
+}

+ 58
- 0
ormsimpleaccount/src/main/java/AccountServices.java Voir le fichier

@@ -0,0 +1,58 @@
1
+import com.j256.ormlite.dao.Dao;
2
+
3
+import java.sql.SQLException;
4
+import java.util.List;
5
+
6
+public class AccountServices {
7
+
8
+
9
+    private Dao<Account, Integer> dao;
10
+    Console c = new Console();
11
+
12
+
13
+    public AccountServices(Dao<Account, Integer> dao) {
14
+        this.dao = dao;
15
+    }
16
+
17
+
18
+    public int create(Account account) throws Exception{
19
+         return dao.create(account);
20
+    }
21
+
22
+    public List<Account> read() throws Exception{
23
+        return dao.queryForAll();
24
+    }
25
+
26
+    public void readAllAccounts(List<Account> acc){
27
+        c.header();
28
+        for(Account a : acc ) {
29
+            c.printFormat(a.getId(), a.getName(), a.getPassword());
30
+        }
31
+    }
32
+
33
+
34
+    public int delete(Integer id) throws SQLException {
35
+        return dao.deleteById(id);
36
+    }
37
+
38
+    public int updateInput(Integer in, Account account) throws Exception{
39
+        int input = c.inputNumber("(1) Update Name"
40
+                    + "(2) Update Password"
41
+                    + "(3) Main Menu");
42
+
43
+        if(input == 1) {
44
+            c.getUserName();
45
+        } else if(input == 2) {
46
+            c.getUserPassword();
47
+        }
48
+
49
+      return dao.updateId(account, in);
50
+
51
+
52
+    }
53
+
54
+
55
+    public int updateAccount(Account account, Integer id) throws Exception {
56
+        return dao.updateId(account, id);
57
+    }
58
+}

+ 73
- 0
ormsimpleaccount/src/main/java/Console.java Voir le fichier

@@ -0,0 +1,73 @@
1
+import java.util.Scanner;
2
+
3
+public class Console {
4
+
5
+
6
+    Scanner in;
7
+
8
+    public Console(Scanner input) {
9
+        this.in = input;
10
+    }
11
+
12
+    public Console() {
13
+        in = new Scanner(System.in);
14
+    }
15
+
16
+    public void printMenu() {
17
+        System.out.println("_____________________\n"
18
+                + "Menu Options: \n"
19
+                + "(1) Create a new account \n"
20
+                + "(2) Read all accounts \n"
21
+                + "(3) Update an existing account \n"
22
+                + "(4) Delete an existing account \n"
23
+                + "(5) Quit \n"
24
+                + "____________________\n");
25
+    }
26
+
27
+    public String inputName(String s) {
28
+        System.out.println(s);
29
+        return in.next();
30
+    }
31
+
32
+    public String inputPassword(String s) {
33
+        System.out.println(s);
34
+        return in.next();
35
+    }
36
+
37
+    public int inputNumber(String prompt){
38
+        System.out.println(prompt);
39
+        return in.nextInt();
40
+    }
41
+
42
+    public int getUserID(){
43
+        int inputID = inputNumber("What is your account ID? : ");
44
+        return inputID;
45
+    }
46
+
47
+    public String getUserName(){
48
+        String inputN = inputName("Enter your name : ");
49
+        return inputN;
50
+    }
51
+
52
+    public String getUserPassword(){
53
+        String inputP = inputPassword("Enter your password : ");
54
+        return inputP;
55
+    }
56
+
57
+    public void print(String s){
58
+        System.out.println(s);
59
+    }
60
+
61
+    public void header(){
62
+        System.out.println("Display accounts: \n");
63
+        System.out.println(String.format("|%5s|%15s|%15s|", "ID", "NAME", "PASSWORD"));
64
+        System.out.println("_______________________________________________________");
65
+    }
66
+
67
+
68
+    public void printFormat(int id, String name, String password){
69
+        System.out.println(String.format("%5s %15s %15s", id, name, password));
70
+    }
71
+
72
+
73
+}

+ 307
- 0
ormsimpleaccount/src/main/java/MockDao.java Voir le fichier

@@ -0,0 +1,307 @@
1
+import com.j256.ormlite.dao.*;
2
+import com.j256.ormlite.field.DataType;
3
+import com.j256.ormlite.field.FieldType;
4
+import com.j256.ormlite.stmt.*;
5
+import com.j256.ormlite.support.ConnectionSource;
6
+import com.j256.ormlite.support.DatabaseConnection;
7
+import com.j256.ormlite.support.DatabaseResults;
8
+import com.j256.ormlite.table.ObjectFactory;
9
+
10
+import java.sql.SQLException;
11
+import java.util.Collection;
12
+import java.util.List;
13
+import java.util.Map;
14
+import java.util.concurrent.Callable;
15
+
16
+public class MockDao implements Dao<Account, Integer> {
17
+
18
+
19
+
20
+    public int create(Account account) throws SQLException {
21
+        return 555;
22
+    }
23
+
24
+
25
+    public int delete(Account account) throws SQLException {
26
+        return 0;
27
+    }
28
+
29
+
30
+    public Account queryForId(Integer integer) throws SQLException {
31
+        return null;
32
+    }
33
+
34
+    public Account queryForFirst(PreparedQuery<Account> preparedQuery) throws SQLException {
35
+        return null;
36
+    }
37
+
38
+    public List<Account> queryForAll() throws SQLException {
39
+        return null;
40
+    }
41
+
42
+    public List<Account> queryForEq(String s, Object o) throws SQLException {
43
+        return null;
44
+    }
45
+
46
+    public List<Account> queryForMatching(Account account) throws SQLException {
47
+        return null;
48
+    }
49
+
50
+    public List<Account> queryForMatchingArgs(Account account) throws SQLException {
51
+        return null;
52
+    }
53
+
54
+    public List<Account> queryForFieldValues(Map<String, Object> map) throws SQLException {
55
+        return null;
56
+    }
57
+
58
+    public List<Account> queryForFieldValuesArgs(Map<String, Object> map) throws SQLException {
59
+        return null;
60
+    }
61
+
62
+    public Account queryForSameId(Account account) throws SQLException {
63
+        return null;
64
+    }
65
+
66
+    public QueryBuilder<Account, Integer> queryBuilder() {
67
+        return null;
68
+    }
69
+
70
+    public UpdateBuilder<Account, Integer> updateBuilder() {
71
+        return null;
72
+    }
73
+
74
+    public DeleteBuilder<Account, Integer> deleteBuilder() {
75
+        return null;
76
+    }
77
+
78
+    public List<Account> query(PreparedQuery<Account> preparedQuery) throws SQLException {
79
+        return null;
80
+    }
81
+
82
+
83
+    public Account createIfNotExists(Account account) throws SQLException {
84
+        return null;
85
+    }
86
+
87
+    public CreateOrUpdateStatus createOrUpdate(Account account) throws SQLException {
88
+        return null;
89
+    }
90
+
91
+    public int update(Account account) throws SQLException {
92
+        return 0;
93
+    }
94
+
95
+    public int updateId(Account account, Integer integer) throws SQLException {
96
+        return 0;
97
+    }
98
+
99
+    public int update(PreparedUpdate<Account> preparedUpdate) throws SQLException {
100
+        return 0;
101
+    }
102
+
103
+    public int refresh(Account account) throws SQLException {
104
+        return 0;
105
+    }
106
+
107
+
108
+    public int deleteById(Integer integer) throws SQLException {
109
+        return 0;
110
+    }
111
+
112
+    public int delete(Collection<Account> collection) throws SQLException {
113
+        return 0;
114
+    }
115
+
116
+    public int deleteIds(Collection<Integer> collection) throws SQLException {
117
+        return 0;
118
+    }
119
+
120
+    public int delete(PreparedDelete<Account> preparedDelete) throws SQLException {
121
+        return 0;
122
+    }
123
+
124
+    public CloseableIterator<Account> iterator() {
125
+        return null;
126
+    }
127
+
128
+    public CloseableIterator<Account> iterator(int i) {
129
+        return null;
130
+    }
131
+
132
+    public CloseableIterator<Account> iterator(PreparedQuery<Account> preparedQuery) throws SQLException {
133
+        return null;
134
+    }
135
+
136
+    public CloseableIterator<Account> iterator(PreparedQuery<Account> preparedQuery, int i) throws SQLException {
137
+        return null;
138
+    }
139
+
140
+    public CloseableWrappedIterable<Account> getWrappedIterable() {
141
+        return null;
142
+    }
143
+
144
+    public CloseableWrappedIterable<Account> getWrappedIterable(PreparedQuery<Account> preparedQuery) {
145
+        return null;
146
+    }
147
+
148
+    public void closeLastIterator() throws SQLException {
149
+
150
+    }
151
+
152
+    public GenericRawResults<String[]> queryRaw(String s, String... strings) throws SQLException {
153
+        return null;
154
+    }
155
+
156
+    public <UO> GenericRawResults<UO> queryRaw(String s, RawRowMapper<UO> rawRowMapper, String... strings) throws SQLException {
157
+        return null;
158
+    }
159
+
160
+    public <UO> GenericRawResults<UO> queryRaw(String s, DataType[] dataTypes, RawRowObjectMapper<UO> rawRowObjectMapper, String... strings) throws SQLException {
161
+        return null;
162
+    }
163
+
164
+    public GenericRawResults<Object[]> queryRaw(String s, DataType[] dataTypes, String... strings) throws SQLException {
165
+        return null;
166
+    }
167
+
168
+    public long queryRawValue(String s, String... strings) throws SQLException {
169
+        return 0;
170
+    }
171
+
172
+    public int executeRaw(String s, String... strings) throws SQLException {
173
+        return 0;
174
+    }
175
+
176
+    public int executeRawNoArgs(String s) throws SQLException {
177
+        return 0;
178
+    }
179
+
180
+    public int updateRaw(String s, String... strings) throws SQLException {
181
+        return 0;
182
+    }
183
+
184
+    public <CT> CT callBatchTasks(Callable<CT> callable) throws Exception {
185
+        return null;
186
+    }
187
+
188
+    public String objectToString(Account account) {
189
+        return null;
190
+    }
191
+
192
+    public boolean objectsEqual(Account account, Account t1) throws SQLException {
193
+        return false;
194
+    }
195
+
196
+    public Integer extractId(Account account) throws SQLException {
197
+        return null;
198
+    }
199
+
200
+    public Class<Account> getDataClass() {
201
+        return null;
202
+    }
203
+
204
+    public FieldType findForeignFieldType(Class<?> aClass) {
205
+        return null;
206
+    }
207
+
208
+    public boolean isUpdatable() {
209
+        return false;
210
+    }
211
+
212
+    public boolean isTableExists() throws SQLException {
213
+        return false;
214
+    }
215
+
216
+    public long countOf() throws SQLException {
217
+        return 0;
218
+    }
219
+
220
+    public long countOf(PreparedQuery<Account> preparedQuery) throws SQLException {
221
+        return 0;
222
+    }
223
+
224
+    public void assignEmptyForeignCollection(Account account, String s) throws SQLException {
225
+
226
+    }
227
+
228
+    public <FT> ForeignCollection<FT> getEmptyForeignCollection(String s) throws SQLException {
229
+        return null;
230
+    }
231
+
232
+    public void setObjectCache(boolean b) throws SQLException {
233
+
234
+    }
235
+
236
+    public void setObjectCache(ObjectCache objectCache) throws SQLException {
237
+
238
+    }
239
+
240
+    public ObjectCache getObjectCache() {
241
+        return null;
242
+    }
243
+
244
+    public void clearObjectCache() {
245
+
246
+    }
247
+
248
+    public Account mapSelectStarRow(DatabaseResults databaseResults) throws SQLException {
249
+        return null;
250
+    }
251
+
252
+    public GenericRowMapper<Account> getSelectStarRowMapper() throws SQLException {
253
+        return null;
254
+    }
255
+
256
+    public RawRowMapper<Account> getRawRowMapper() {
257
+        return null;
258
+    }
259
+
260
+    public boolean idExists(Integer integer) throws SQLException {
261
+        return false;
262
+    }
263
+
264
+    public DatabaseConnection startThreadConnection() throws SQLException {
265
+        return null;
266
+    }
267
+
268
+    public void endThreadConnection(DatabaseConnection databaseConnection) throws SQLException {
269
+
270
+    }
271
+
272
+    public void setAutoCommit(boolean b) throws SQLException {
273
+
274
+    }
275
+
276
+    public void setAutoCommit(DatabaseConnection databaseConnection, boolean b) throws SQLException {
277
+
278
+    }
279
+
280
+    public boolean isAutoCommit() throws SQLException {
281
+        return false;
282
+    }
283
+
284
+    public boolean isAutoCommit(DatabaseConnection databaseConnection) throws SQLException {
285
+        return false;
286
+    }
287
+
288
+    public void commit(DatabaseConnection databaseConnection) throws SQLException {
289
+
290
+    }
291
+
292
+    public void rollBack(DatabaseConnection databaseConnection) throws SQLException {
293
+
294
+    }
295
+
296
+    public ConnectionSource getConnectionSource() {
297
+        return null;
298
+    }
299
+
300
+    public void setObjectFactory(ObjectFactory<Account> objectFactory) {
301
+
302
+    }
303
+
304
+    public CloseableIterator<Account> closeableIterator() {
305
+        return null;
306
+    }
307
+}

+ 45
- 0
ormsimpleaccount/src/test/java/AccountServicesTest.java Voir le fichier

@@ -0,0 +1,45 @@
1
+import com.j256.ormlite.dao.Dao;
2
+import org.junit.Assert;
3
+import org.junit.Before;
4
+import org.junit.Test;
5
+
6
+import java.sql.SQLException;
7
+
8
+public class AccountServicesTest {
9
+
10
+    Dao<Account, Integer> dao;
11
+    AccountServices accountServices;
12
+
13
+
14
+    @Before
15
+    public void setup(){
16
+        accountServices = new AccountServices(dao);
17
+        dao = new MockDao();
18
+    }
19
+
20
+    @Test
21
+    public void testCreate() throws Exception {
22
+        Account account = new Account();
23
+        int expected = 100;
24
+        int actual = accountServices.create(account);
25
+        Assert.assertEquals(expected, actual);
26
+    }
27
+    @Test
28
+    public void testRead(){
29
+
30
+    }
31
+    @Test
32
+    public void testUpdate(){
33
+
34
+    }
35
+    @Test
36
+    public void testDelete() throws Exception {
37
+        accountServices.create(new Account("Peggy", "Pearl"));
38
+
39
+        int expected = 0;
40
+       // int actual = account;
41
+       // Assert.assertEquals(expected, actual);
42
+
43
+    }
44
+
45
+}

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


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


BIN
ormsimpleaccount/target/classes/AccountServices.class Voir le fichier


BIN
ormsimpleaccount/target/classes/Console.class Voir le fichier


BIN
ormsimpleaccount/target/classes/MockDao.class Voir le fichier


BIN
ormsimpleaccount/target/test-classes/AccountServicesTest.class Voir le fichier