Ahmad Rusdi 6 lat temu
commit
55709e18d7

+ 16
- 0
.idea/compiler.xml Wyświetl plik

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
+    <bytecodeTargetLevel>
13
+      <module name="ormsimpleaccount" target="1.7" />
14
+    </bytecodeTargetLevel>
15
+  </component>
16
+</project>

+ 6
- 0
.idea/encodings.xml Wyświetl plik

1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="Encoding">
4
+    <file url="file://$PROJECT_DIR$" charset="UTF-8" />
5
+  </component>
6
+</project>

+ 13
- 0
.idea/libraries/Maven__com_j256_ormlite_ormlite_core_4_48.xml Wyświetl plik

1
+<component name="libraryTable">
2
+  <library name="Maven: com.j256.ormlite:ormlite-core:4.48">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/com/j256/ormlite/ormlite-core/4.48/ormlite-core-4.48.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/com/j256/ormlite/ormlite-core/4.48/ormlite-core-4.48-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/com/j256/ormlite/ormlite-core/4.48/ormlite-core-4.48-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
.idea/libraries/Maven__com_j256_ormlite_ormlite_jdbc_4_48.xml Wyświetl plik

1
+<component name="libraryTable">
2
+  <library name="Maven: com.j256.ormlite:ormlite-jdbc:4.48">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/com/j256/ormlite/ormlite-jdbc/4.48/ormlite-jdbc-4.48.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/com/j256/ormlite/ormlite-jdbc/4.48/ormlite-jdbc-4.48-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/com/j256/ormlite/ormlite-jdbc/4.48/ormlite-jdbc-4.48-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
.idea/libraries/Maven__junit_junit_4_11.xml Wyświetl plik

1
+<component name="libraryTable">
2
+  <library name="Maven: junit:junit:4.11">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.11/junit-4.11.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.11/junit-4.11-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.11/junit-4.11-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
.idea/libraries/Maven__mysql_mysql_connector_java_5_1_6.xml Wyświetl plik

1
+<component name="libraryTable">
2
+  <library name="Maven: mysql:mysql-connector-java:5.1.6">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml Wyświetl plik

1
+<component name="libraryTable">
2
+  <library name="Maven: org.hamcrest:hamcrest-core:1.3">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
.idea/misc.xml Wyświetl plik

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

+ 8
- 0
.idea/modules.xml Wyświetl plik

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

+ 367
- 0
.idea/workspace.xml Wyświetl plik

1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="a0b1c7ba-231d-4b5a-93b6-800442527275" name="Default" 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="TRACKING_ENABLED" value="true" />
9
+    <option name="SHOW_DIALOG" value="false" />
10
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
11
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
12
+    <option name="LAST_RESOLUTION" value="IGNORE" />
13
+  </component>
14
+  <component name="FileEditorManager">
15
+    <leaf>
16
+      <file leaf-file-name="AccountApp.java" pinned="false" current-in-tab="true">
17
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcode/io/AccountApp.java">
18
+          <provider selected="true" editor-type-id="text-editor">
19
+            <state relative-caret-position="272">
20
+              <caret line="45" column="52" lean-forward="false" selection-start-line="45" selection-start-column="52" selection-end-line="45" selection-end-column="52" />
21
+              <folding>
22
+                <element signature="imports" expanded="true" />
23
+              </folding>
24
+            </state>
25
+          </provider>
26
+        </entry>
27
+      </file>
28
+    </leaf>
29
+  </component>
30
+  <component name="FileTemplateManagerImpl">
31
+    <option name="RECENT_TEMPLATES">
32
+      <list>
33
+        <option value="Class" />
34
+      </list>
35
+    </option>
36
+  </component>
37
+  <component name="GradleLocalSettings">
38
+    <option name="externalProjectsViewState">
39
+      <projects_view />
40
+    </option>
41
+  </component>
42
+  <component name="IdeDocumentHistory">
43
+    <option name="CHANGED_PATHS">
44
+      <list>
45
+        <option value="$PROJECT_DIR$/pom.xml" />
46
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcode/io/Account.java" />
47
+        <option value="$PROJECT_DIR$/src/main/java/com/zipcode/io/AccountApp.java" />
48
+      </list>
49
+    </option>
50
+  </component>
51
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
52
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
53
+  <component name="JsGulpfileManager">
54
+    <detection-done>true</detection-done>
55
+    <sorting>DEFINITION_ORDER</sorting>
56
+  </component>
57
+  <component name="MavenImportPreferences">
58
+    <option name="importingSettings">
59
+      <MavenImportingSettings>
60
+        <option name="importAutomatically" value="true" />
61
+      </MavenImportingSettings>
62
+    </option>
63
+  </component>
64
+  <component name="ProjectFrameBounds" extendedState="6">
65
+    <option name="x" value="4" />
66
+    <option name="y" value="4" />
67
+    <option name="width" value="635" />
68
+    <option name="height" value="395" />
69
+  </component>
70
+  <component name="ProjectView">
71
+    <navigator currentView="ProjectPane" proportions="" version="1">
72
+      <flattenPackages />
73
+      <showMembers />
74
+      <showModules />
75
+      <showLibraryContents />
76
+      <hideEmptyPackages />
77
+      <abbreviatePackageNames />
78
+      <autoscrollToSource />
79
+      <autoscrollFromSource />
80
+      <sortByType />
81
+      <manualOrder />
82
+      <foldersAlwaysOnTop value="true" />
83
+    </navigator>
84
+    <panes>
85
+      <pane id="ProjectPane">
86
+        <subPane>
87
+          <expand>
88
+            <path>
89
+              <item name="ormsimpleaccount" type="b2602c69:ProjectViewProjectNode" />
90
+              <item name="ormsimpleaccount" type="462c0819:PsiDirectoryNode" />
91
+            </path>
92
+            <path>
93
+              <item name="ormsimpleaccount" type="b2602c69:ProjectViewProjectNode" />
94
+              <item name="ormsimpleaccount" type="462c0819:PsiDirectoryNode" />
95
+              <item name="src" type="462c0819:PsiDirectoryNode" />
96
+            </path>
97
+            <path>
98
+              <item name="ormsimpleaccount" type="b2602c69:ProjectViewProjectNode" />
99
+              <item name="ormsimpleaccount" type="462c0819:PsiDirectoryNode" />
100
+              <item name="src" type="462c0819:PsiDirectoryNode" />
101
+              <item name="main" type="462c0819:PsiDirectoryNode" />
102
+            </path>
103
+            <path>
104
+              <item name="ormsimpleaccount" type="b2602c69:ProjectViewProjectNode" />
105
+              <item name="ormsimpleaccount" type="462c0819:PsiDirectoryNode" />
106
+              <item name="src" type="462c0819:PsiDirectoryNode" />
107
+              <item name="main" type="462c0819:PsiDirectoryNode" />
108
+              <item name="java" type="462c0819:PsiDirectoryNode" />
109
+            </path>
110
+            <path>
111
+              <item name="ormsimpleaccount" type="b2602c69:ProjectViewProjectNode" />
112
+              <item name="ormsimpleaccount" type="462c0819:PsiDirectoryNode" />
113
+              <item name="src" type="462c0819:PsiDirectoryNode" />
114
+              <item name="main" type="462c0819:PsiDirectoryNode" />
115
+              <item name="java" type="462c0819:PsiDirectoryNode" />
116
+              <item name="io" type="462c0819:PsiDirectoryNode" />
117
+            </path>
118
+          </expand>
119
+          <select />
120
+        </subPane>
121
+      </pane>
122
+      <pane id="Scope" />
123
+      <pane id="Scratches" />
124
+      <pane id="PackagesPane" />
125
+      <pane id="AndroidView" />
126
+    </panes>
127
+  </component>
128
+  <component name="PropertiesComponent">
129
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
130
+    <property name="WebServerToolWindowFactoryState" value="false" />
131
+    <property name="aspect.path.notification.shown" value="true" />
132
+  </component>
133
+  <component name="RunDashboard">
134
+    <option name="ruleStates">
135
+      <list>
136
+        <RuleState>
137
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
138
+        </RuleState>
139
+        <RuleState>
140
+          <option name="name" value="StatusDashboardGroupingRule" />
141
+        </RuleState>
142
+      </list>
143
+    </option>
144
+  </component>
145
+  <component name="RunManager">
146
+    <configuration default="true" type="Applet" factoryName="Applet">
147
+      <option name="HTML_USED" value="false" />
148
+      <option name="WIDTH" value="400" />
149
+      <option name="HEIGHT" value="300" />
150
+      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
151
+      <module />
152
+    </configuration>
153
+    <configuration name="AccountApp" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
154
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
155
+        <pattern>
156
+          <option name="PATTERN" value="com.zipcode.io.*" />
157
+          <option name="ENABLED" value="true" />
158
+        </pattern>
159
+      </extension>
160
+      <option name="MAIN_CLASS_NAME" value="com.zipcode.io.AccountApp" />
161
+      <option name="VM_PARAMETERS" />
162
+      <option name="PROGRAM_PARAMETERS" />
163
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
164
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
165
+      <option name="ALTERNATIVE_JRE_PATH" />
166
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
167
+      <option name="ENV_VARIABLES" />
168
+      <option name="PASS_PARENT_ENVS" value="true" />
169
+      <module name="ormsimpleaccount" />
170
+      <envs />
171
+    </configuration>
172
+    <configuration default="true" type="Application" factoryName="Application">
173
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
174
+      <option name="MAIN_CLASS_NAME" />
175
+      <option name="VM_PARAMETERS" />
176
+      <option name="PROGRAM_PARAMETERS" />
177
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
178
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
179
+      <option name="ALTERNATIVE_JRE_PATH" />
180
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
181
+      <option name="ENV_VARIABLES" />
182
+      <option name="PASS_PARENT_ENVS" value="true" />
183
+      <module name="" />
184
+      <envs />
185
+    </configuration>
186
+    <configuration default="true" type="JUnit" factoryName="JUnit">
187
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
188
+      <module name="" />
189
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
190
+      <option name="ALTERNATIVE_JRE_PATH" />
191
+      <option name="PACKAGE_NAME" />
192
+      <option name="MAIN_CLASS_NAME" />
193
+      <option name="METHOD_NAME" />
194
+      <option name="TEST_OBJECT" value="class" />
195
+      <option name="VM_PARAMETERS" value="-ea" />
196
+      <option name="PARAMETERS" />
197
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
198
+      <option name="ENV_VARIABLES" />
199
+      <option name="PASS_PARENT_ENVS" value="true" />
200
+      <option name="TEST_SEARCH_SCOPE">
201
+        <value defaultName="singleModule" />
202
+      </option>
203
+      <envs />
204
+      <patterns />
205
+    </configuration>
206
+    <configuration default="true" type="Remote" factoryName="Remote">
207
+      <option name="USE_SOCKET_TRANSPORT" value="true" />
208
+      <option name="SERVER_MODE" value="false" />
209
+      <option name="SHMEM_ADDRESS" value="javadebug" />
210
+      <option name="HOST" value="localhost" />
211
+      <option name="PORT" value="5005" />
212
+    </configuration>
213
+    <configuration default="true" type="TestNG" factoryName="TestNG">
214
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
215
+      <module name="" />
216
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
217
+      <option name="ALTERNATIVE_JRE_PATH" />
218
+      <option name="SUITE_NAME" />
219
+      <option name="PACKAGE_NAME" />
220
+      <option name="MAIN_CLASS_NAME" />
221
+      <option name="METHOD_NAME" />
222
+      <option name="GROUP_NAME" />
223
+      <option name="TEST_OBJECT" value="CLASS" />
224
+      <option name="VM_PARAMETERS" value="-ea" />
225
+      <option name="PARAMETERS" />
226
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
227
+      <option name="OUTPUT_DIRECTORY" />
228
+      <option name="ANNOTATION_TYPE" />
229
+      <option name="ENV_VARIABLES" />
230
+      <option name="PASS_PARENT_ENVS" value="true" />
231
+      <option name="TEST_SEARCH_SCOPE">
232
+        <value defaultName="singleModule" />
233
+      </option>
234
+      <option name="USE_DEFAULT_REPORTERS" value="false" />
235
+      <option name="PROPERTIES_FILE" />
236
+      <envs />
237
+      <properties />
238
+      <listeners />
239
+    </configuration>
240
+    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
241
+      <module name="" />
242
+      <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
243
+      <option name="PROGRAM_PARAMETERS" />
244
+      <predefined_log_file id="idea.log" enabled="true" />
245
+    </configuration>
246
+    <recent_temporary>
247
+      <list size="1">
248
+        <item index="0" class="java.lang.String" itemvalue="Application.AccountApp" />
249
+      </list>
250
+    </recent_temporary>
251
+  </component>
252
+  <component name="ShelveChangesManager" show_recycled="false">
253
+    <option name="remove_strategy" value="false" />
254
+  </component>
255
+  <component name="SvnConfiguration">
256
+    <configuration />
257
+  </component>
258
+  <component name="TaskManager">
259
+    <task active="true" id="Default" summary="Default task">
260
+      <changelist id="a0b1c7ba-231d-4b5a-93b6-800442527275" name="Default" comment="" />
261
+      <created>1528909396503</created>
262
+      <option name="number" value="Default" />
263
+      <option name="presentableId" value="Default" />
264
+      <updated>1528909396503</updated>
265
+      <workItem from="1528909401078" duration="2953000" />
266
+    </task>
267
+    <servers />
268
+  </component>
269
+  <component name="TimeTrackingManager">
270
+    <option name="totallyTimeSpent" value="2953000" />
271
+  </component>
272
+  <component name="ToolWindowManager">
273
+    <frame x="4" y="4" width="1272" height="792" extended-state="6" />
274
+    <layout>
275
+      <window_info id="Key Promoter X" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
276
+      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
277
+      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
278
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33428982" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
279
+      <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
280
+      <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
281
+      <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
282
+      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
283
+      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
284
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32998565" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
285
+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
286
+      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
287
+      <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
288
+      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
289
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1203252" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
290
+      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
291
+      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
292
+      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
293
+      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
294
+      <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
295
+      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
296
+      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
297
+      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
298
+      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
299
+      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
300
+      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
301
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
302
+      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
303
+    </layout>
304
+  </component>
305
+  <component name="TypeScriptGeneratedFilesManager">
306
+    <option name="version" value="1" />
307
+  </component>
308
+  <component name="VcsContentAnnotationSettings">
309
+    <option name="myLimit" value="2678400000" />
310
+  </component>
311
+  <component name="XDebuggerManager">
312
+    <breakpoint-manager />
313
+    <watches-manager />
314
+  </component>
315
+  <component name="editorHistoryManager">
316
+    <entry file="file://$PROJECT_DIR$/pom.xml">
317
+      <provider selected="true" editor-type-id="text-editor">
318
+        <state relative-caret-position="0">
319
+          <caret line="18" column="0" lean-forward="false" selection-start-line="18" selection-start-column="0" selection-end-line="18" selection-end-column="0" />
320
+          <folding />
321
+        </state>
322
+      </provider>
323
+    </entry>
324
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcode/io/Account.java">
325
+      <provider selected="true" editor-type-id="text-editor">
326
+        <state relative-caret-position="384">
327
+          <caret line="67" column="48" lean-forward="false" selection-start-line="67" selection-start-column="48" selection-end-line="67" selection-end-column="48" />
328
+          <folding />
329
+        </state>
330
+      </provider>
331
+    </entry>
332
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcode/io/App.java">
333
+      <provider selected="true" editor-type-id="text-editor">
334
+        <state relative-caret-position="96">
335
+          <caret line="6" column="13" lean-forward="false" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
336
+          <folding />
337
+        </state>
338
+      </provider>
339
+    </entry>
340
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/zipcode/io/AccountApp.java">
341
+      <provider selected="true" editor-type-id="text-editor">
342
+        <state relative-caret-position="272">
343
+          <caret line="45" column="52" lean-forward="false" selection-start-line="45" selection-start-column="52" selection-end-line="45" selection-end-column="52" />
344
+          <folding>
345
+            <element signature="imports" expanded="true" />
346
+          </folding>
347
+        </state>
348
+      </provider>
349
+    </entry>
350
+  </component>
351
+  <component name="masterDetails">
352
+    <states>
353
+      <state key="ProjectJDKs.UI">
354
+        <settings>
355
+          <last-edited>1.8</last-edited>
356
+          <splitter-proportions>
357
+            <option name="proportions">
358
+              <list>
359
+                <option value="0.2" />
360
+              </list>
361
+            </option>
362
+          </splitter-proportions>
363
+        </settings>
364
+      </state>
365
+    </states>
366
+  </component>
367
+</project>

+ 19
- 0
ormsimpleaccount.iml Wyświetl plik

1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
4
+    <output url="file://$MODULE_DIR$/target/classes" />
5
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
6
+    <content url="file://$MODULE_DIR$">
7
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
9
+      <excludeFolder url="file://$MODULE_DIR$/target" />
10
+    </content>
11
+    <orderEntry type="inheritedJdk" />
12
+    <orderEntry type="sourceFolder" forTests="false" />
13
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.11" level="project" />
14
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
15
+    <orderEntry type="library" name="Maven: com.j256.ormlite:ormlite-core:4.48" level="project" />
16
+    <orderEntry type="library" name="Maven: com.j256.ormlite:ormlite-jdbc:4.48" level="project" />
17
+    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.6" level="project" />
18
+  </component>
19
+</module>

+ 82
- 0
pom.xml Wyświetl plik

1
+<?xml version="1.0" encoding="UTF-8"?>
2
+
3
+<project xmlns="http://maven.apache.org/POM/4.0.0" 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>com.zipcode.io</groupId>
8
+  <artifactId>ormsimpleaccount</artifactId>
9
+  <version>1.0-SNAPSHOT</version>
10
+
11
+  <name>ormsimpleaccount</name>
12
+  <!-- FIXME change it to the project's website -->
13
+  <url>http://www.example.com</url>
14
+
15
+  <properties>
16
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
17
+    <maven.compiler.source>1.7</maven.compiler.source>
18
+    <maven.compiler.target>1.7</maven.compiler.target>
19
+  </properties>
20
+
21
+  <dependencies>
22
+    <dependency>
23
+      <groupId>junit</groupId>
24
+      <artifactId>junit</artifactId>
25
+      <version>4.11</version>
26
+      <scope>test</scope>
27
+    </dependency>
28
+    <!-- https://mvnrepository.com/artifact/com.j256.ormlite/ormlite-core -->
29
+    <dependency>
30
+      <groupId>com.j256.ormlite</groupId>
31
+      <artifactId>ormlite-core</artifactId>
32
+      <version>4.48</version>
33
+    </dependency>
34
+    <!-- https://mvnrepository.com/artifact/com.j256.ormlite/ormlite-jdbc -->
35
+    <dependency>
36
+      <groupId>com.j256.ormlite</groupId>
37
+      <artifactId>ormlite-jdbc</artifactId>
38
+      <version>4.48</version>
39
+    </dependency>
40
+    <dependency>
41
+      <groupId>mysql</groupId>
42
+      <artifactId>mysql-connector-java</artifactId>
43
+      <version>5.1.6</version>
44
+    </dependency>
45
+  </dependencies>
46
+
47
+  <build>
48
+    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
49
+      <plugins>
50
+        <plugin>
51
+          <artifactId>maven-clean-plugin</artifactId>
52
+          <version>3.0.0</version>
53
+        </plugin>
54
+        <!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
55
+        <plugin>
56
+          <artifactId>maven-resources-plugin</artifactId>
57
+          <version>3.0.2</version>
58
+        </plugin>
59
+        <plugin>
60
+          <artifactId>maven-compiler-plugin</artifactId>
61
+          <version>3.7.0</version>
62
+        </plugin>
63
+        <plugin>
64
+          <artifactId>maven-surefire-plugin</artifactId>
65
+          <version>2.20.1</version>
66
+        </plugin>
67
+        <plugin>
68
+          <artifactId>maven-jar-plugin</artifactId>
69
+          <version>3.0.2</version>
70
+        </plugin>
71
+        <plugin>
72
+          <artifactId>maven-install-plugin</artifactId>
73
+          <version>2.5.2</version>
74
+        </plugin>
75
+        <plugin>
76
+          <artifactId>maven-deploy-plugin</artifactId>
77
+          <version>2.8.2</version>
78
+        </plugin>
79
+      </plugins>
80
+    </pluginManagement>
81
+  </build>
82
+</project>

+ 70
- 0
src/main/java/com/zipcode/io/Account.java Wyświetl plik

1
+package com.zipcode.io;
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
+
66
+    @Override
67
+    public String toString() {
68
+        return String.format("Id: %2d Name: %15s Password: %10s", this.id, this.name, this.password);
69
+    }
70
+}

+ 119
- 0
src/main/java/com/zipcode/io/AccountApp.java Wyświetl plik

1
+package com.zipcode.io;
2
+import com.j256.ormlite.dao.Dao;
3
+import com.j256.ormlite.dao.DaoManager;
4
+import com.j256.ormlite.jdbc.JdbcConnectionSource;
5
+import com.j256.ormlite.support.ConnectionSource;
6
+
7
+import java.rmi.server.ExportException;
8
+import java.util.Arrays;
9
+import java.util.Scanner;
10
+
11
+public class AccountApp {
12
+
13
+    // we are using a MySQl database
14
+    private final static String DATABASE_URL = "jdbc:mysql://localhost:3306/orm_lab?useUnicode=true";
15
+
16
+    private Dao<Account, Integer> accountDao;
17
+
18
+    public static void main(String[] args) throws Exception {
19
+        // turn our static method into an instance of Main
20
+        new AccountApp().doMain(args);
21
+    }
22
+
23
+    private void doMain(String[] args) throws Exception {
24
+        ConnectionSource connectionSource = null;
25
+        try {
26
+            // create our data-source for the database
27
+            connectionSource = new JdbcConnectionSource(DATABASE_URL, "root", "1");
28
+            // setup our  DAOs
29
+            setupDao(connectionSource);
30
+            // read, write and delete some data
31
+            // processData();
32
+            crudLoop();
33
+            System.out.println("\n\nIt seems to have worked\n\n");
34
+        } finally {
35
+            // destroy the data source which should close underlying connections
36
+            if (connectionSource != null) {
37
+                connectionSource.close();
38
+            }
39
+        }
40
+    }
41
+
42
+    private void crudLoop() throws Exception {
43
+        boolean flag = true;
44
+        while(flag) {
45
+            System.out.println("Enter a [c][r][u][d] command: ");
46
+            Scanner scanner = new Scanner(System.in);
47
+            String action = scanner.nextLine();
48
+
49
+            if (action.equals("c")) {
50
+                System.out.println("Name :");
51
+                String name = scanner.nextLine();
52
+                System.out.println("Password :");
53
+                String password = scanner.nextLine();
54
+
55
+                createData(name, password);
56
+            }
57
+
58
+            if (action.equals("r")) {
59
+                readData();
60
+            }
61
+
62
+            if (action.equals("u")) {
63
+                System.out.println("Id :");
64
+                int id = Integer.parseInt(scanner.nextLine());
65
+                System.out.println("New Name :");
66
+                String name = scanner.nextLine();
67
+                System.out.println("New Password :");
68
+                String password = scanner.nextLine();
69
+
70
+                updateData(id, name, password);
71
+            }
72
+
73
+            if (action.equals("d")) {
74
+                System.out.println("Id :");
75
+                int id = Integer.parseInt(scanner.nextLine());
76
+
77
+                deleteData(id);
78
+            }
79
+
80
+            if (action.equals("exit")) {
81
+                System.out.println("Bye");
82
+                flag = false;
83
+            }
84
+        }
85
+    }
86
+
87
+    private void createData(String name, String password) throws Exception {
88
+        Account account = new Account(name, password);
89
+
90
+        accountDao.create(account);
91
+        int id = account.getId();
92
+        System.out.println(id);
93
+        accountDao.update(account);
94
+    }
95
+
96
+    private void updateData(int id, String name, String password) throws Exception {
97
+        Account account = accountDao.queryForId(id);
98
+
99
+        account.setName(name);
100
+        account.setPassword(password);
101
+        accountDao.update(account);
102
+    }
103
+
104
+    private void readData() throws Exception {
105
+        for (Account a : accountDao.queryForAll()) {
106
+            System.out.println(a.toString());
107
+        }
108
+    }
109
+
110
+    private void deleteData(int id) throws Exception {
111
+        accountDao.deleteById(id);
112
+    }
113
+
114
+    private void setupDao(ConnectionSource connectionSource) throws Exception {
115
+
116
+        accountDao = DaoManager.createDao(connectionSource, Account.class);
117
+
118
+    }
119
+}

+ 13
- 0
src/main/java/com/zipcode/io/App.java Wyświetl plik

1
+package com.zipcode.io;
2
+
3
+/**
4
+ * Hello world!
5
+ *
6
+ */
7
+public class App 
8
+{
9
+    public static void main( String[] args )
10
+    {
11
+        System.out.println( "Hello World!" );
12
+    }
13
+}

+ 20
- 0
src/test/java/com/zipcode/io/AppTest.java Wyświetl plik

1
+package com.zipcode.io;
2
+
3
+import static org.junit.Assert.assertTrue;
4
+
5
+import org.junit.Test;
6
+
7
+/**
8
+ * Unit test for simple App.
9
+ */
10
+public class AppTest 
11
+{
12
+    /**
13
+     * Rigorous Test :-)
14
+     */
15
+    @Test
16
+    public void shouldAnswerWithTrue()
17
+    {
18
+        assertTrue( true );
19
+    }
20
+}

BIN
target/classes/com/zipcode/io/Account.class Wyświetl plik


BIN
target/classes/com/zipcode/io/AccountApp.class Wyświetl plik


BIN
target/classes/com/zipcode/io/App.class Wyświetl plik


BIN
target/test-classes/com/zipcode/io/AppTest.class Wyświetl plik