Eric Foster 6 лет назад
Родитель
Сommit
f60d8e5b09

+ 95
- 98
.idea/workspace.xml Просмотреть файл

@@ -2,7 +2,16 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="ad381d05-32c5-4ad5-8041-a0cb51a71fd9" name="Default" comment="">
5
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/alidade/model/Account.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/alidade/model/Account.java" afterDir="false" />
5
+      <change afterPath="$PROJECT_DIR$/src/main/java/com/alidade/model/Login.java" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/alidade/controller/UserController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/alidade/controller/UserController.java" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/alidade/model/Account.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/alidade/model/User.java" afterDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/alidade/model/Destination.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/alidade/model/Destination.java" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/alidade/model/FriendList.java" beforeDir="false" />
11
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/alidade/model/Map.java" beforeDir="false" />
12
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/alidade/model/User.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/alidade/model/Profile.java" afterDir="false" />
13
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/alidade/repository/UserRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/alidade/repository/UserRepository.java" afterDir="false" />
14
+      <change beforePath="$PROJECT_DIR$/src/test/java/UserControllerTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/ProfileControllerTest.java" afterDir="false" />
6 15
     </list>
7 16
     <ignored path="$PROJECT_DIR$/out/" />
8 17
     <ignored path="$PROJECT_DIR$/target/" />
@@ -27,50 +36,29 @@
27 36
           </provider>
28 37
         </entry>
29 38
       </file>
30
-      <file leaf-file-name="User.java" pinned="false" current-in-tab="false">
31
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/User.java">
32
-          <provider selected="true" editor-type-id="text-editor">
33
-            <state relative-caret-position="135">
34
-              <caret line="9" column="20" lean-forward="true" selection-start-line="7" selection-start-column="4" selection-end-line="9" selection-end-column="20" />
35
-            </state>
36
-          </provider>
37
-        </entry>
38
-      </file>
39
-      <file leaf-file-name="Account.java" pinned="false" current-in-tab="true">
40
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/Account.java">
41
-          <provider selected="true" editor-type-id="text-editor">
42
-            <state relative-caret-position="270">
43
-              <caret line="18" column="1" lean-forward="true" selection-start-line="18" selection-start-column="1" selection-end-line="18" selection-end-column="1" />
44
-              <folding>
45
-                <element signature="imports" expanded="true" />
46
-              </folding>
47
-            </state>
48
-          </provider>
49
-        </entry>
50
-      </file>
51
-      <file leaf-file-name="FriendList.java" pinned="false" current-in-tab="false">
52
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/FriendList.java">
39
+      <file leaf-file-name="Profile.java" pinned="false" current-in-tab="false">
40
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/Profile.java">
53 41
           <provider selected="true" editor-type-id="text-editor">
54
-            <state relative-caret-position="75">
55
-              <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
42
+            <state relative-caret-position="450">
43
+              <caret line="30" column="22" selection-start-line="30" selection-start-column="22" selection-end-line="30" selection-end-column="22" />
56 44
             </state>
57 45
           </provider>
58 46
         </entry>
59 47
       </file>
60
-      <file leaf-file-name="Map.java" pinned="false" current-in-tab="false">
61
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/Map.java">
48
+      <file leaf-file-name="Login.java" pinned="false" current-in-tab="false">
49
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/Login.java">
62 50
           <provider selected="true" editor-type-id="text-editor">
63
-            <state relative-caret-position="135">
64
-              <caret line="10" column="4" selection-start-line="10" selection-start-column="4" selection-end-line="10" selection-end-column="4" />
51
+            <state relative-caret-position="705">
52
+              <caret line="47" column="27" selection-start-line="47" selection-start-column="27" selection-end-line="47" selection-end-column="27" />
65 53
             </state>
66 54
           </provider>
67 55
         </entry>
68 56
       </file>
69
-      <file leaf-file-name="Destination.java" pinned="false" current-in-tab="false">
70
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/Destination.java">
57
+      <file leaf-file-name="User.java" pinned="false" current-in-tab="false">
58
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/User.java">
71 59
           <provider selected="true" editor-type-id="text-editor">
72 60
             <state relative-caret-position="90">
73
-              <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
61
+              <caret line="6" lean-forward="true" selection-start-line="6" selection-end-line="6" />
74 62
               <folding>
75 63
                 <element signature="imports" expanded="true" />
76 64
               </folding>
@@ -78,32 +66,29 @@
78 66
           </provider>
79 67
         </entry>
80 68
       </file>
81
-      <file leaf-file-name="HomeController.java" pinned="false" current-in-tab="false">
82
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/controller/HomeController.java">
69
+      <file leaf-file-name="application.properties" pinned="false" current-in-tab="false">
70
+        <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
83 71
           <provider selected="true" editor-type-id="text-editor">
84
-            <state relative-caret-position="90">
85
-              <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
86
-              <folding>
87
-                <element signature="imports" expanded="true" />
88
-              </folding>
72
+            <state relative-caret-position="165">
73
+              <caret line="11" column="36" lean-forward="true" selection-start-line="11" selection-start-column="36" selection-end-line="11" selection-end-column="36" />
89 74
             </state>
90 75
           </provider>
91 76
         </entry>
92 77
       </file>
93
-      <file leaf-file-name="DestinationRepository.java" pinned="false" current-in-tab="false">
94
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/repository/DestinationRepository.java">
78
+      <file leaf-file-name="pom.xml" pinned="false" current-in-tab="false">
79
+        <entry file="file://$PROJECT_DIR$/pom.xml">
95 80
           <provider selected="true" editor-type-id="text-editor">
96
-            <state relative-caret-position="75">
97
-              <caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
81
+            <state relative-caret-position="315">
82
+              <caret line="21" column="18" lean-forward="true" selection-start-line="21" selection-start-column="18" selection-end-line="21" selection-end-column="18" />
98 83
             </state>
99 84
           </provider>
100 85
         </entry>
101 86
       </file>
102
-      <file leaf-file-name="UserRepository.java" pinned="false" current-in-tab="false">
103
-        <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/repository/UserRepository.java">
87
+      <file leaf-file-name="Destination.java" pinned="false" current-in-tab="true">
88
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/Destination.java">
104 89
           <provider selected="true" editor-type-id="text-editor">
105
-            <state relative-caret-position="105">
106
-              <caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
90
+            <state relative-caret-position="360">
91
+              <caret line="28" column="28" lean-forward="true" selection-start-line="28" selection-start-column="28" selection-end-line="28" selection-end-column="28" />
107 92
               <folding>
108 93
                 <element signature="imports" expanded="true" />
109 94
               </folding>
@@ -147,8 +132,6 @@
147 132
         <option value="$PROJECT_DIR$/src/main/java/alidade/alidade.java" />
148 133
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/DestinationState.java" />
149 134
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/FutureDestination.java" />
150
-        <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/Login.java" />
151
-        <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/Profile.java" />
152 135
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/repository/ProfileRepository.java" />
153 136
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/Feed.java" />
154 137
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/App.java" />
@@ -177,20 +160,23 @@
177 160
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/MessageBoard.java" />
178 161
         <option value="$PROJECT_DIR$/pom.xml" />
179 162
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/controller/HomeController.java" />
180
-        <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/FriendList.java" />
181 163
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/controller/UserController.java" />
182 164
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/config/PersistenceConfiguration.java" />
183 165
         <option value="$PROJECT_DIR$/src/main/resources/application.properties" />
184
-        <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/Destination.java" />
185 166
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/map/DestinationRepository.java" />
186 167
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/user/DestinationType.java" />
187 168
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/user/DestinationState.java" />
188 169
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/map/DestinationState.java" />
189 170
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/map/Destination.java" />
190 171
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/controller/DestinationController.java" />
172
+        <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/Account.java" />
173
+        <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/UserAccount.java" />
191 174
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/Map.java" />
175
+        <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/FriendList.java" />
192 176
         <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/User.java" />
193
-        <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/Account.java" />
177
+        <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/Login.java" />
178
+        <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/Profile.java" />
179
+        <option value="$PROJECT_DIR$/src/main/java/com/alidade/model/Destination.java" />
194 180
       </list>
195 181
     </option>
196 182
   </component>
@@ -324,6 +310,11 @@
324 310
     <property name="project.structure.side.proportion" value="0.0" />
325 311
     <property name="settings.editor.selected.configurable" value="reference.settings.ide.settings.file-colors" />
326 312
   </component>
313
+  <component name="RecentsManager">
314
+    <key name="CreateClassDialog.RecentsKey">
315
+      <recent name="com.alidade.model" />
316
+    </key>
317
+  </component>
327 318
   <component name="RunDashboard">
328 319
     <option name="ruleStates">
329 320
       <list>
@@ -385,12 +376,12 @@
385 376
       </option>
386 377
       <patterns />
387 378
     </configuration>
388
-    <configuration name="UserControllerTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
379
+    <configuration name="ProfileControllerTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
389 380
       <module name="SharedTravelMap" />
390 381
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
391 382
       <option name="ALTERNATIVE_JRE_PATH" />
392 383
       <option name="PACKAGE_NAME" value="" />
393
-      <option name="MAIN_CLASS_NAME" value="UserControllerTest" />
384
+      <option name="MAIN_CLASS_NAME" value="ProfileControllerTest" />
394 385
       <option name="METHOD_NAME" />
395 386
       <option name="TEST_OBJECT" value="class" />
396 387
       <option name="VM_PARAMETERS" value="-ea" />
@@ -447,7 +438,7 @@
447 438
     <list>
448 439
       <item itemvalue="Spring Boot.SharedTravelApp" />
449 440
       <item itemvalue="Application.SharedTravelApp" />
450
-      <item itemvalue="JUnit.UserControllerTest" />
441
+      <item itemvalue="JUnit.ProfileControllerTest" />
451 442
       <item itemvalue="JUnit.AppTest" />
452 443
       <item itemvalue="JUnit.All in SharedTravelMap" />
453 444
     </list>
@@ -456,7 +447,7 @@
456 447
         <item itemvalue="Application.SharedTravelApp" />
457 448
         <item itemvalue="JUnit.All in SharedTravelMap" />
458 449
         <item itemvalue="JUnit.AppTest" />
459
-        <item itemvalue="JUnit.UserControllerTest" />
450
+        <item itemvalue="JUnit.ProfileControllerTest" />
460 451
       </list>
461 452
     </recent_temporary>
462 453
   </component>
@@ -487,7 +478,7 @@
487 478
       <workItem from="1531762938122" duration="894000" />
488 479
       <workItem from="1531932455408" duration="4691000" />
489 480
       <workItem from="1532000475012" duration="5571000" />
490
-      <workItem from="1532369057862" duration="1753000" />
481
+      <workItem from="1532369057862" duration="7541000" />
491 482
     </task>
492 483
     <servers />
493 484
   </component>
@@ -506,7 +497,7 @@
506 497
     </history-entry>
507 498
   </component>
508 499
   <component name="TimeTrackingManager">
509
-    <option name="totallyTimeSpent" value="51756000" />
500
+    <option name="totallyTimeSpent" value="57544000" />
510 501
   </component>
511 502
   <component name="TodoView">
512 503
     <todo-panel id="selected-file">
@@ -544,6 +535,7 @@
544 535
       <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.19009584" />
545 536
       <window_info anchor="right" id="Bean Validation" order="4" />
546 537
       <window_info id="Web" order="3" side_tool="true" />
538
+      <window_info anchor="bottom" id="Find" order="1" weight="0.32935324" />
547 539
       <window_info anchor="right" id="Theme Preview" order="3" />
548 540
       <window_info id="Favorites" order="2" side_tool="true" />
549 541
       <window_info anchor="bottom" id="Messages" order="8" weight="0.3283582" />
@@ -552,7 +544,6 @@
552 544
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
553 545
       <window_info anchor="bottom" id="Message" order="0" />
554 546
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
555
-      <window_info anchor="bottom" id="Find" order="1" />
556 547
     </layout>
557 548
   </component>
558 549
   <component name="TypeScriptGeneratedFilesManager">
@@ -562,14 +553,13 @@
562 553
     <option name="myLimit" value="2678400000" />
563 554
   </component>
564 555
   <component name="editorHistoryManager">
565
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/controller/FeedController.java" />
566 556
     <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/Friend.java" />
567 557
     <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/repository/FeedRepository.java" />
568 558
     <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/repository/FriendRepository.java" />
569 559
     <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/repository/ProfileRepository.java" />
570 560
     <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/UserProfile.java" />
571 561
     <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/TravelFeed.java" />
572
-    <entry file="file://$PROJECT_DIR$/src/test/java/UserControllerTest.java">
562
+    <entry file="file://$PROJECT_DIR$/src/test/java/ProfileControllerTest.java">
573 563
       <provider selected="true" editor-type-id="text-editor">
574 564
         <state>
575 565
           <caret selection-end-line="42" selection-end-column="5" />
@@ -668,20 +658,6 @@
668 658
     </entry>
669 659
     <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/UserLogin.java" />
670 660
     <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/config/PersistenceConfiguration.java" />
671
-    <entry file="file://$PROJECT_DIR$/pom.xml">
672
-      <provider selected="true" editor-type-id="text-editor">
673
-        <state relative-caret-position="503">
674
-          <caret line="39" column="21" selection-start-line="39" selection-start-column="21" selection-end-line="39" selection-end-column="21" />
675
-        </state>
676
-      </provider>
677
-    </entry>
678
-    <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
679
-      <provider selected="true" editor-type-id="text-editor">
680
-        <state relative-caret-position="165">
681
-          <caret line="11" column="36" selection-start-line="11" selection-start-column="36" selection-end-line="11" selection-end-column="36" />
682
-        </state>
683
-      </provider>
684
-    </entry>
685 661
     <entry file="jar://$MAVEN_REPOSITORY$/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6.jar!/com/mysql/jdbc/PreparedStatement.class">
686 662
       <provider selected="true" editor-type-id="text-editor">
687 663
         <state relative-caret-position="2005">
@@ -696,17 +672,17 @@
696 672
         </state>
697 673
       </provider>
698 674
     </entry>
699
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/FriendList.java">
675
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/repository/DestinationRepository.java">
700 676
       <provider selected="true" editor-type-id="text-editor">
701 677
         <state relative-caret-position="75">
702
-          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
678
+          <caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
703 679
         </state>
704 680
       </provider>
705 681
     </entry>
706
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/controller/UserController.java">
682
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/repository/UserRepository.java">
707 683
       <provider selected="true" editor-type-id="text-editor">
708
-        <state relative-caret-position="180">
709
-          <caret line="12" column="13" selection-start-line="12" selection-start-column="13" selection-end-line="12" selection-end-column="13" />
684
+        <state relative-caret-position="105">
685
+          <caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
710 686
           <folding>
711 687
             <element signature="imports" expanded="true" />
712 688
           </folding>
@@ -723,10 +699,10 @@
723 699
         </state>
724 700
       </provider>
725 701
     </entry>
726
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/Destination.java">
702
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/controller/UserController.java">
727 703
       <provider selected="true" editor-type-id="text-editor">
728
-        <state relative-caret-position="90">
729
-          <caret line="6" column="13" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
704
+        <state relative-caret-position="180">
705
+          <caret line="12" column="13" selection-start-line="12" selection-start-column="13" selection-end-line="12" selection-end-column="13" />
730 706
           <folding>
731 707
             <element signature="imports" expanded="true" />
732 708
           </folding>
@@ -743,41 +719,62 @@
743 719
         </state>
744 720
       </provider>
745 721
     </entry>
746
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/repository/DestinationRepository.java">
722
+    <entry file="file://$PROJECT_DIR$/pom.xml">
747 723
       <provider selected="true" editor-type-id="text-editor">
748
-        <state relative-caret-position="75">
749
-          <caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
724
+        <state relative-caret-position="315">
725
+          <caret line="21" column="18" lean-forward="true" selection-start-line="21" selection-start-column="18" selection-end-line="21" selection-end-column="18" />
750 726
         </state>
751 727
       </provider>
752 728
     </entry>
753
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/repository/UserRepository.java">
729
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/FriendList.java">
730
+      <provider selected="true" editor-type-id="text-editor">
731
+        <state relative-caret-position="120">
732
+          <caret line="9" column="20" lean-forward="true" selection-start-line="9" selection-start-column="20" selection-end-line="9" selection-end-column="20" />
733
+        </state>
734
+      </provider>
735
+    </entry>
736
+    <entry file="file://$PROJECT_DIR$/src/main/resources/application.properties">
737
+      <provider selected="true" editor-type-id="text-editor">
738
+        <state relative-caret-position="165">
739
+          <caret line="11" column="36" lean-forward="true" selection-start-line="11" selection-start-column="36" selection-end-line="11" selection-end-column="36" />
740
+        </state>
741
+      </provider>
742
+    </entry>
743
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/Map.java">
754 744
       <provider selected="true" editor-type-id="text-editor">
755 745
         <state relative-caret-position="105">
756
-          <caret line="7" column="17" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
746
+          <caret line="8" column="4" selection-start-line="8" selection-start-column="4" selection-end-line="8" selection-end-column="4" />
747
+        </state>
748
+      </provider>
749
+    </entry>
750
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/User.java">
751
+      <provider selected="true" editor-type-id="text-editor">
752
+        <state relative-caret-position="90">
753
+          <caret line="6" lean-forward="true" selection-start-line="6" selection-end-line="6" />
757 754
           <folding>
758 755
             <element signature="imports" expanded="true" />
759 756
           </folding>
760 757
         </state>
761 758
       </provider>
762 759
     </entry>
763
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/Map.java">
760
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/Login.java">
764 761
       <provider selected="true" editor-type-id="text-editor">
765
-        <state relative-caret-position="135">
766
-          <caret line="10" column="4" selection-start-line="10" selection-start-column="4" selection-end-line="10" selection-end-column="4" />
762
+        <state relative-caret-position="705">
763
+          <caret line="47" column="27" selection-start-line="47" selection-start-column="27" selection-end-line="47" selection-end-column="27" />
767 764
         </state>
768 765
       </provider>
769 766
     </entry>
770
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/User.java">
767
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/Profile.java">
771 768
       <provider selected="true" editor-type-id="text-editor">
772
-        <state relative-caret-position="135">
773
-          <caret line="9" column="20" lean-forward="true" selection-start-line="7" selection-start-column="4" selection-end-line="9" selection-end-column="20" />
769
+        <state relative-caret-position="450">
770
+          <caret line="30" column="22" selection-start-line="30" selection-start-column="22" selection-end-line="30" selection-end-column="22" />
774 771
         </state>
775 772
       </provider>
776 773
     </entry>
777
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/Account.java">
774
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/alidade/model/Destination.java">
778 775
       <provider selected="true" editor-type-id="text-editor">
779
-        <state relative-caret-position="270">
780
-          <caret line="18" column="1" lean-forward="true" selection-start-line="18" selection-start-column="1" selection-end-line="18" selection-end-column="1" />
776
+        <state relative-caret-position="360">
777
+          <caret line="28" column="28" lean-forward="true" selection-start-line="28" selection-start-column="28" selection-end-line="28" selection-end-column="28" />
781 778
           <folding>
782 779
             <element signature="imports" expanded="true" />
783 780
           </folding>

+ 12
- 12
src/main/java/com/alidade/controller/UserController.java Просмотреть файл

@@ -1,6 +1,6 @@
1 1
 package com.alidade.controller;
2 2
 
3
-import com.alidade.model.User;
3
+import com.alidade.model.Profile;
4 4
 import com.alidade.repository.UserRepository;
5 5
 import org.springframework.beans.BeanUtils;
6 6
 import org.springframework.beans.factory.annotation.Autowired;
@@ -17,30 +17,30 @@ public class UserController {
17 17
 
18 18
     //CREATE
19 19
     @RequestMapping(value = "users", method = RequestMethod.POST)
20
-    public ResponseEntity<User> create(@RequestBody User user){
21
-        return new ResponseEntity<User>(userRepository.saveAndFlush(user),HttpStatus.CREATED);
20
+    public ResponseEntity<Profile> create(@RequestBody Profile profile){
21
+        return new ResponseEntity<Profile>(userRepository.saveAndFlush(profile),HttpStatus.CREATED);
22 22
     }
23 23
 
24 24
     //READ
25 25
     @RequestMapping(value = "users/{id}", method = RequestMethod.GET)
26
-    public User get(@PathVariable Long id){
26
+    public Profile get(@PathVariable Long id){
27 27
         return userRepository.findOne(id);
28 28
     }
29 29
 
30 30
     //UPDATE
31 31
     @RequestMapping(value = "users/{id}", method = RequestMethod.PUT)
32
-    public User update(@PathVariable Long id, @RequestBody User user){
33
-        User userToUpdate = userRepository.findOne(id);
34
-        BeanUtils.copyProperties(user, userToUpdate);
35
-        return userRepository.saveAndFlush(userToUpdate);
32
+    public Profile update(@PathVariable Long id, @RequestBody Profile profile){
33
+        Profile profileToUpdate = userRepository.findOne(id);
34
+        BeanUtils.copyProperties(profile, profileToUpdate);
35
+        return userRepository.saveAndFlush(profileToUpdate);
36 36
     }
37 37
 
38 38
     //DELETE
39 39
     @RequestMapping(value = "users/{id}", method = RequestMethod.DELETE)
40
-    public User delete(@PathVariable Long id){
41
-        User userToDelete = userRepository.findOne(id);
42
-        userRepository.delete(userToDelete);
43
-        return userToDelete;
40
+    public Profile delete(@PathVariable Long id){
41
+        Profile profileToDelete = userRepository.findOne(id);
42
+        userRepository.delete(profileToDelete);
43
+        return profileToDelete;
44 44
     }
45 45
 
46 46
 

+ 0
- 19
src/main/java/com/alidade/model/Account.java Просмотреть файл

@@ -1,19 +0,0 @@
1
-package com.alidade.model;
2
-
3
-import sun.java2d.cmm.Profile;
4
-
5
-import javax.persistence.Entity;
6
-import javax.persistence.GeneratedValue;
7
-import javax.persistence.GenerationType;
8
-import javax.persistence.Id;
9
-
10
-@Entity
11
-public class Account {
12
-
13
-    @Id
14
-    @GeneratedValue(strategy = GenerationType.AUTO)
15
-    private Long id;
16
-    private Profile profile;
17
-    private Auth auth;
18
-
19
-}

+ 20
- 1
src/main/java/com/alidade/model/Destination.java Просмотреть файл

@@ -1,5 +1,9 @@
1 1
 package com.alidade.model;
2 2
 
3
+import com.fasterxml.jackson.annotation.JsonIgnore;
4
+import org.hibernate.annotations.OnDelete;
5
+import org.hibernate.annotations.OnDeleteAction;
6
+
3 7
 import javax.persistence.*;
4 8
 import java.util.Date;
5 9
 
@@ -18,7 +22,13 @@ public class Destination {
18 22
     private String favoriteThing;
19 23
     private String notes;
20 24
 
21
-    public void setId(long id) {
25
+    @ManyToOne(fetch = FetchType.LAZY, optional = false)
26
+    @JoinColumn(name = "profile_id", nullable = false)
27
+    @OnDelete(action = OnDeleteAction.CASCADE)
28
+    @JsonIgnore
29
+    private Profile profile;
30
+
31
+    public void setId(Long id) {
22 32
         this.id = id;
23 33
     }
24 34
 
@@ -89,4 +99,13 @@ public class Destination {
89 99
     public void setNotes(String notes) {
90 100
         this.notes = notes;
91 101
     }
102
+
103
+    public Profile getProfile() {
104
+        return profile;
105
+    }
106
+
107
+    public void setProfile(Profile profile) {
108
+        this.profile = profile;
109
+    }
110
+
92 111
 }

+ 0
- 13
src/main/java/com/alidade/model/FriendList.java Просмотреть файл

@@ -1,13 +0,0 @@
1
-package com.alidade.model;
2
-
3
-import javax.persistence.*;
4
-import java.util.List;
5
-
6
-@Entity
7
-public class FriendList {
8
-    @Id
9
-    @GeneratedValue(strategy = GenerationType.AUTO)
10
-    private Long id;
11
-//    @OneToMany(targetEntity = User.class)
12
-//    private List<User> friends;
13
-}

+ 55
- 0
src/main/java/com/alidade/model/Login.java Просмотреть файл

@@ -0,0 +1,55 @@
1
+package com.alidade.model;
2
+
3
+import javax.persistence.*;
4
+
5
+@Entity
6
+public class Login {
7
+
8
+    @Id
9
+    @GeneratedValue(strategy = GenerationType.AUTO)
10
+    private Long id;
11
+
12
+    @Column(name = "email")
13
+    private String email;
14
+
15
+    @Column(name = "password")
16
+    private String password;
17
+
18
+    @OneToOne(fetch = FetchType.LAZY,
19
+            optional=false)
20
+    @JoinColumn(name = "user_id",
21
+            nullable = false)
22
+    private User user;
23
+
24
+    public Long getId() {
25
+        return id;
26
+    }
27
+
28
+    public void setId(Long id) {
29
+        this.id = id;
30
+    }
31
+
32
+    public String getEmail() {
33
+        return email;
34
+    }
35
+
36
+    public void setEmail(String email) {
37
+        this.email = email;
38
+    }
39
+
40
+    public String getPassword() {
41
+        return password;
42
+    }
43
+
44
+    public void setPassword(String password) {
45
+        this.password = password;
46
+    }
47
+
48
+    public User getUser() {
49
+        return user;
50
+    }
51
+
52
+    public void setUser(User user) {
53
+        this.user = user;
54
+    }
55
+}

+ 0
- 12
src/main/java/com/alidade/model/Map.java Просмотреть файл

@@ -1,12 +0,0 @@
1
-package com.alidade.model;
2
-
3
-import javax.persistence.*;
4
-import java.util.List;
5
-
6
-@Entity
7
-public class Map {
8
-    @Id
9
-    @GeneratedValue(strategy = GenerationType.AUTO)
10
-    private Long id;
11
-    private List<Destination> destinations;
12
-}

+ 88
- 0
src/main/java/com/alidade/model/Profile.java Просмотреть файл

@@ -0,0 +1,88 @@
1
+package com.alidade.model;
2
+
3
+import javax.persistence.*;
4
+
5
+@Entity
6
+public class Profile {
7
+
8
+    @Id
9
+    @GeneratedValue(strategy = GenerationType.AUTO)
10
+    private Long id;
11
+
12
+    @Column(name = "username")
13
+    private String userName;
14
+
15
+    @Column(name = "home_city")
16
+    private String homeCity;
17
+
18
+    @Column(name = "home_country")
19
+    private String homeCountry;
20
+
21
+    @Column(name = "description")
22
+    private String description;
23
+
24
+    @Column(name = "image_path")
25
+    private String imagePath;
26
+
27
+    @OneToOne(fetch = FetchType.LAZY,
28
+            optional=false)
29
+    @JoinColumn(name = "user_id",
30
+            nullable = false)
31
+    private User user;
32
+
33
+    public Long getId() {
34
+        return id;
35
+    }
36
+
37
+    public void setId(Long id) {
38
+        this.id = id;
39
+    }
40
+
41
+    public String getUserName() {
42
+        return userName;
43
+    }
44
+
45
+    public void setUserName(String userName) {
46
+        this.userName = userName;
47
+    }
48
+
49
+    public String getHomeCity() {
50
+        return homeCity;
51
+    }
52
+
53
+    public void setHomeCity(String homeCity) {
54
+        this.homeCity = homeCity;
55
+    }
56
+
57
+    public String getHomeCountry() {
58
+        return homeCountry;
59
+    }
60
+
61
+    public void setHomeCountry(String homeCountry) {
62
+        this.homeCountry = homeCountry;
63
+    }
64
+
65
+    public String getDescription() {
66
+        return description;
67
+    }
68
+
69
+    public void setDescription(String description) {
70
+        this.description = description;
71
+    }
72
+
73
+    public String getImagePath() {
74
+        return imagePath;
75
+    }
76
+
77
+    public void setImagePath(String imagePath) {
78
+        this.imagePath = imagePath;
79
+    }
80
+
81
+    public User getUser() {
82
+        return user;
83
+    }
84
+
85
+    public void setUser(User user) {
86
+        this.user = user;
87
+    }
88
+}

+ 24
- 37
src/main/java/com/alidade/model/User.java Просмотреть файл

@@ -1,5 +1,7 @@
1 1
 package com.alidade.model;
2 2
 
3
+import sun.java2d.cmm.Profile;
4
+
3 5
 import javax.persistence.*;
4 6
 
5 7
 @Entity
@@ -8,13 +10,22 @@ public class User {
8 10
     @Id
9 11
     @GeneratedValue(strategy = GenerationType.AUTO)
10 12
     private Long id;
11
-    private String userName;
13
+
14
+    @Column(name = "FIRST_NAME")
12 15
     private String firstName;
16
+
17
+    @Column(name = "LAST_NAME")
13 18
     private String lastName;
14
-    private String homeCity;
15
-    private String homeCountry;
16
-    private String description;
17
-    private String imagePath;
19
+
20
+    @OneToOne(fetch = FetchType.LAZY,
21
+            cascade = CascadeType.ALL,
22
+            mappedBy = "user")
23
+    private Login login;
24
+
25
+    @OneToOne(fetch = FetchType.LAZY,
26
+            cascade = CascadeType.ALL,
27
+            mappedBy = "user")
28
+    private Profile profile;
18 29
 
19 30
     public Long getId() {
20 31
         return id;
@@ -24,14 +35,6 @@ public class User {
24 35
         this.id = id;
25 36
     }
26 37
 
27
-    public String getUserName() {
28
-        return userName;
29
-    }
30
-
31
-    public void setUserName(String userName) {
32
-        this.userName = userName;
33
-    }
34
-
35 38
     public String getFirstName() {
36 39
         return firstName;
37 40
     }
@@ -48,36 +51,20 @@ public class User {
48 51
         this.lastName = lastName;
49 52
     }
50 53
 
51
-    public String getHomeCity() {
52
-        return homeCity;
53
-    }
54
-
55
-    public void setHomeCity(String homeCity) {
56
-        this.homeCity = homeCity;
57
-    }
58
-
59
-    public String getHomeCountry() {
60
-        return homeCountry;
61
-    }
62
-
63
-    public void setHomeCountry(String homeCountry) {
64
-        this.homeCountry = homeCountry;
65
-    }
66
-
67
-    public String getDescription() {
68
-        return description;
54
+    public Login getLogin() {
55
+        return login;
69 56
     }
70 57
 
71
-    public void setDescription(String description) {
72
-        this.description = description;
58
+    public void setLogin(Login login) {
59
+        this.login = login;
73 60
     }
74 61
 
75
-    public String getImagePath() {
76
-        return imagePath;
62
+    public Profile getProfile() {
63
+        return profile;
77 64
     }
78 65
 
79
-    public void setImagePath(String imagePath) {
80
-        this.imagePath = imagePath;
66
+    public void setProfile(Profile profile) {
67
+        this.profile = profile;
81 68
     }
82 69
 
83 70
 }

+ 2
- 2
src/main/java/com/alidade/repository/UserRepository.java Просмотреть файл

@@ -1,9 +1,9 @@
1 1
 package com.alidade.repository;
2 2
 
3
-import com.alidade.model.User;
3
+import com.alidade.model.Profile;
4 4
 import org.springframework.data.jpa.repository.JpaRepository;
5 5
 import org.springframework.stereotype.Repository;
6 6
 
7 7
 @Repository
8
-public interface UserRepository extends JpaRepository<User, Long> {
8
+public interface UserRepository extends JpaRepository<Profile, Long> {
9 9
 }

src/test/java/UserControllerTest.java → src/test/java/ProfileControllerTest.java Просмотреть файл

@@ -1,5 +1,5 @@
1 1
 import com.alidade.controller.UserController;
2
-import com.alidade.model.User;
2
+import com.alidade.model.Profile;
3 3
 import com.alidade.repository.UserRepository;
4 4
 import org.junit.Before;
5 5
 import org.junit.Test;
@@ -12,7 +12,7 @@ import static org.hamcrest.core.Is.is;
12 12
 import static org.mockito.Mockito.verify;
13 13
 import static org.mockito.Mockito.when;
14 14
 
15
-public class UserControllerTest {
15
+public class ProfileControllerTest {
16 16
 
17 17
     @InjectMocks
18 18
     private UserController uc;
@@ -28,18 +28,18 @@ public class UserControllerTest {
28 28
 
29 29
     @Test
30 30
     public void testUserCreate(){
31
-        User user = new User();
32
-        user.setId(1L);
31
+        Profile profile = new Profile();
32
+        profile.setId(1L);
33 33
     }
34 34
 
35 35
     @Test
36 36
     public void testUserGet(){
37
-        User user = new User();
38
-        user.setId(1L);
39
-        when(userRepository.findOne(1l)).thenReturn(user);
40
-        User userTest = uc.get(1L);
37
+        Profile profile = new Profile();
38
+        profile.setId(1L);
39
+        when(userRepository.findOne(1l)).thenReturn(profile);
40
+        Profile profileTest = uc.get(1L);
41 41
         verify(userRepository).findOne(1l);
42
-        assertThat(userTest.getId(), is(1l));
42
+        assertThat(profileTest.getId(), is(1l));
43 43
     }
44 44
 
45 45
 }