diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 5d8473f3c99d82be71dd4d53d7a9660e142cab0c..09a6967035647278dbc0a19323b4d97840b89147 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,10 +3,7 @@ <component name="ChangeListManager"> <list default="true" id="5f36371d-de5c-44ce-a12c-613727d95355" name="Default" comment=""> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/shopInShop.iml" afterPath="$PROJECT_DIR$/shopInShop.iml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/org/s4s/dao/RegistrationDAO.java" afterPath="$PROJECT_DIR$/src/main/java/org/s4s/dao/RegistrationDAO.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/org/s4s/gui/views/RegistrierungView.java" afterPath="$PROJECT_DIR$/src/main/java/org/s4s/gui/views/RegistrierungView.java" /> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/org/s4s/process/control/RegistrationControl.java" afterPath="$PROJECT_DIR$/src/main/java/org/s4s/process/control/RegistrationControl.java" /> </list> <ignored path="shopInShop.iws" /> <ignored path=".idea/workspace.xml" /> @@ -33,7 +30,9 @@ <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="240"> <caret line="18" column="5" lean-forward="false" selection-start-line="18" selection-start-column="5" selection-end-line="18" selection-end-column="5" /> - <folding /> + <folding> + <element signature="imports" expanded="false" /> + </folding> </state> </provider> </entry> @@ -41,8 +40,8 @@ <file leaf-file-name="RegistrationControl.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/process/control/RegistrationControl.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="247"> - <caret line="59" column="48" lean-forward="true" selection-start-line="59" selection-start-column="48" selection-end-line="59" selection-end-column="48" /> + <state relative-caret-position="242"> + <caret line="32" column="27" lean-forward="false" selection-start-line="32" selection-start-column="25" selection-end-line="32" selection-end-column="27" /> <folding /> </state> </provider> @@ -51,14 +50,34 @@ <file leaf-file-name="RegistrationDAO.java" pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/RegistrationDAO.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="360"> - <caret line="31" column="62" lean-forward="true" selection-start-line="31" selection-start-column="62" selection-end-line="31" selection-end-column="62" /> + <state relative-caret-position="630"> + <caret line="45" column="0" lean-forward="false" selection-start-line="45" selection-start-column="0" selection-end-line="45" selection-end-column="0" /> + <folding> + <marker date="1497893381000" expanded="true" signature="587:922" ph="INSERT INTO \"ERR\".\"user\"... " /> + <marker date="1497893381000" expanded="true" signature="1318:1364" ph="SELECT MAX(u... " /> + </folding> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="LoginControl.java" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/process/control/LoginControl.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="240"> + <caret line="25" column="43" lean-forward="false" selection-start-line="25" selection-start-column="43" selection-end-line="25" selection-end-column="43" /> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="TransactionControl.java" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/process/control/TransactionControl.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="-129"> + <caret line="19" column="13" lean-forward="false" selection-start-line="19" selection-start-column="13" selection-end-line="19" selection-end-column="13" /> <folding> - <marker date="1497885607000" expanded="true" signature="773:1103" ph="INSERT INTO \"ERR\".\"user\"... " /> - <marker date="1497885607000" expanded="true" signature="1498:1538" ph="SELECT MAX(u... " /> - <marker date="1497885607000" expanded="true" signature="1498:1539" ph="SELECT MAX(u... " /> - <marker date="1497885607000" expanded="true" signature="1498:1540" ph="SELECT MAX(u... " /> - <marker date="1497885607000" expanded="true" signature="1498:1545" ph="SELECT MAX(u... " /> + <marker date="1497892099000" expanded="true" signature="1899:2096" ph="INSERT INTO \"ERR\".\"transaktion\"... " /> + <marker date="1497892099000" expanded="true" signature="2399:2516" ph="UPDATE INTO " /> </folding> </state> </provider> @@ -67,8 +86,8 @@ <file leaf-file-name="JDBCConnectionTest.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/test/java/org/s4s/services/db/JDBCConnectionTest.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="360"> - <caret line="24" column="66" lean-forward="true" selection-start-line="24" selection-start-column="66" selection-end-line="24" selection-end-column="66" /> + <state relative-caret-position="240"> + <caret line="16" column="26" lean-forward="true" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" /> <folding> <element signature="imports" expanded="true" /> <marker date="1496932737000" expanded="true" signature="585:784" ph="SELECT u.\"b... user" /> @@ -81,7 +100,7 @@ <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/gui/views/RegistrierungView.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="417"> - <caret line="53" column="46" lean-forward="false" selection-start-line="53" selection-start-column="46" selection-end-line="53" selection-end-column="46" /> + <caret line="111" column="0" lean-forward="false" selection-start-line="111" selection-start-column="0" selection-end-line="111" selection-end-column="0" /> <folding /> </state> </provider> @@ -266,6 +285,7 @@ <foldersAlwaysOnTop value="true" /> </navigator> <panes> + <pane id="PackagesPane" /> <pane id="Scratches" /> <pane id="ProjectPane"> <subPane> @@ -591,7 +611,6 @@ </PATH> </subPane> </pane> - <pane id="PackagesPane" /> <pane id="Scope" /> </panes> </component> @@ -1149,6 +1168,7 @@ <workItem from="1496680428314" duration="1810000" /> <workItem from="1496742832611" duration="6144000" /> <workItem from="1497882792519" duration="2838000" /> + <workItem from="1497892141475" duration="1318000" /> </task> <servers /> </component> @@ -1185,7 +1205,7 @@ </history-entry> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="60276000" /> + <option name="totallyTimeSpent" value="61594000" /> </component> <component name="ToolWindowManager"> <frame x="0" y="0" width="1920" height="1080" extended-state="0" /> @@ -1200,8 +1220,8 @@ <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="3" side_tool="false" content_ui="tabs" /> <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.23891892" sideWeight="0.27291667" order="7" side_tool="true" content_ui="tabs" /> <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.1745435" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> - <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24588577" sideWeight="0.49583334" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Version Control" 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="7" side_tool="false" content_ui="tabs" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24588577" sideWeight="0.49583334" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Properties" 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="5" side_tool="false" content_ui="tabs" /> <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="7" side_tool="false" content_ui="tabs" /> <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="2" side_tool="false" content_ui="tabs" /> @@ -1213,8 +1233,8 @@ <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" /> <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="2" side_tool="false" content_ui="tabs" /> <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="5" side_tool="false" content_ui="tabs" /> - <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.26918918" sideWeight="0.7270833" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.18093699" sideWeight="0.5072727" order="2" side_tool="true" content_ui="tabs" /> + <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.26918918" sideWeight="0.7270833" order="3" side_tool="false" content_ui="tabs" /> <window_info id="PlantUML" 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="3" side_tool="false" content_ui="tabs" /> <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" /> <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" /> @@ -1278,27 +1298,6 @@ <option name="serverPort" value="52118" /> </component> <component name="editorHistoryManager"> - <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/gui/views/CheckoutView.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="198"> - <caret line="15" column="46" lean-forward="false" selection-start-line="15" selection-start-column="46" selection-end-line="15" selection-end-column="46" /> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/gui/views/ImpressumView.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="374"> - <caret line="27" column="0" lean-forward="false" selection-start-line="27" selection-start-column="0" selection-end-line="27" selection-end-column="0" /> - </state> - </provider> - </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/gui/views/FaqView.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="308"> - <caret line="20" column="5" lean-forward="false" selection-start-line="17" selection-start-column="3" selection-end-line="20" selection-end-column="5" /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/View/InitView.java" /> <entry file="jar://$MAVEN_REPOSITORY$/com/vaadin/vaadin-server/7.7.8/vaadin-server-7.7.8-sources.jar!/com/vaadin/ui/Button.java" /> <entry file="jar://$MAVEN_REPOSITORY$/com/vaadin/vaadin-server/7.7.8/vaadin-server-7.7.8-sources.jar!/com/vaadin/ui/themes/BaseTheme.java" /> @@ -1366,13 +1365,6 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/gui/views/WelcomeView.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="345"> - <caret line="32" column="73" lean-forward="false" selection-start-line="32" selection-start-column="73" selection-end-line="32" selection-end-column="73" /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/gui/views/ShopErstellung.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="1125"> @@ -1475,13 +1467,6 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/gui/views/WarenkorbView.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="225"> - <caret line="27" column="21" lean-forward="false" selection-start-line="27" selection-start-column="0" selection-end-line="28" selection-end-column="0" /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/test/java/org/s4s/services/db/JDBCConnectionTest2.java" /> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/services/db/JDBCConnection.java"> <provider selected="true" editor-type-id="text-editor"> @@ -1529,7 +1514,7 @@ <state relative-caret-position="315"> <caret line="21" column="0" lean-forward="true" selection-start-line="21" selection-start-column="0" selection-end-line="21" selection-end-column="0" /> <folding> - <element signature="imports" expanded="true" /> + <element signature="imports" expanded="false" /> </folding> </state> </provider> @@ -1540,22 +1525,48 @@ <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="240"> <caret line="18" column="5" lean-forward="false" selection-start-line="18" selection-start-column="5" selection-end-line="18" selection-end-column="5" /> + <folding> + <element signature="imports" expanded="false" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/KundenDAO.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="150"> + <caret line="12" column="2" lean-forward="true" selection-start-line="12" selection-start-column="2" selection-end-line="12" selection-end-column="2" /> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/gui/views/RegistrierungView.java"> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/ProductDAO.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="417"> - <caret line="53" column="46" lean-forward="false" selection-start-line="53" selection-start-column="46" selection-end-line="53" selection-end-column="46" /> + <state relative-caret-position="120"> + <caret line="10" column="17" lean-forward="false" selection-start-line="10" selection-start-column="17" selection-end-line="10" selection-end-column="17" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/ShopDAO.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="120"> + <caret line="8" column="17" lean-forward="false" selection-start-line="8" selection-start-column="17" selection-end-line="8" selection-end-column="17" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/ShopSearchDAO.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="120"> + <caret line="10" column="17" lean-forward="false" selection-start-line="10" selection-start-column="17" selection-end-line="10" selection-end-column="17" /> <folding /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/src/test/java/org/s4s/services/db/JDBCConnectionTest.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="360"> - <caret line="24" column="66" lean-forward="true" selection-start-line="24" selection-start-column="66" selection-end-line="24" selection-end-column="66" /> + <state relative-caret-position="240"> + <caret line="16" column="26" lean-forward="true" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" /> <folding> <element signature="imports" expanded="true" /> <marker date="1496932737000" expanded="true" signature="585:784" ph="SELECT u.\"b... user" /> @@ -1563,56 +1574,74 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/KundenDAO.java"> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/gui/views/WelcomeView.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="150"> - <caret line="12" column="2" lean-forward="true" selection-start-line="12" selection-start-column="2" selection-end-line="12" selection-end-column="2" /> + <state relative-caret-position="75"> + <caret line="6" column="2" lean-forward="true" selection-start-line="6" selection-start-column="2" selection-end-line="6" selection-end-column="2" /> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/ProductDAO.java"> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/process/control/ShopControl.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="120"> - <caret line="10" column="17" lean-forward="false" selection-start-line="10" selection-start-column="17" selection-end-line="10" selection-end-column="17" /> + <caret line="19" column="13" lean-forward="false" selection-start-line="19" selection-start-column="13" selection-end-line="19" selection-end-column="13" /> + <folding> + <marker date="1497872913000" expanded="true" signature="2644:2792" ph="INSERT INTO \"ERR\".\"shop\"... " /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/gui/views/WarenkorbView.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="-396"> + <caret line="27" column="2" lean-forward="true" selection-start-line="27" selection-start-column="0" selection-end-line="28" selection-end-column="0" /> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/ShopDAO.java"> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/process/control/TransactionControl.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="120"> - <caret line="8" column="17" lean-forward="false" selection-start-line="8" selection-start-column="17" selection-end-line="8" selection-end-column="17" /> + <state relative-caret-position="-129"> + <caret line="19" column="13" lean-forward="false" selection-start-line="19" selection-start-column="13" selection-end-line="19" selection-end-column="13" /> + <folding> + <marker date="1497892099000" expanded="true" signature="1899:2096" ph="INSERT INTO \"ERR\".\"transaktion\"... " /> + <marker date="1497892099000" expanded="true" signature="2399:2516" ph="UPDATE INTO " /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/process/control/LoginControl.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="240"> + <caret line="25" column="43" lean-forward="false" selection-start-line="25" selection-start-column="43" selection-end-line="25" selection-end-column="43" /> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/ShopSearchDAO.java"> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/gui/views/RegistrierungView.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="120"> - <caret line="10" column="17" lean-forward="false" selection-start-line="10" selection-start-column="17" selection-end-line="10" selection-end-column="17" /> + <state relative-caret-position="417"> + <caret line="111" column="0" lean-forward="false" selection-start-line="111" selection-start-column="0" selection-end-line="111" selection-end-column="0" /> <folding /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/process/control/RegistrationControl.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="247"> - <caret line="59" column="48" lean-forward="true" selection-start-line="59" selection-start-column="48" selection-end-line="59" selection-end-column="48" /> + <state relative-caret-position="242"> + <caret line="32" column="27" lean-forward="false" selection-start-line="32" selection-start-column="25" selection-end-line="32" selection-end-column="27" /> <folding /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/RegistrationDAO.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="360"> - <caret line="31" column="62" lean-forward="true" selection-start-line="31" selection-start-column="62" selection-end-line="31" selection-end-column="62" /> + <state relative-caret-position="630"> + <caret line="45" column="0" lean-forward="false" selection-start-line="45" selection-start-column="0" selection-end-line="45" selection-end-column="0" /> <folding> - <marker date="1497885607000" expanded="true" signature="773:1103" ph="INSERT INTO \"ERR\".\"user\"... " /> - <marker date="1497885607000" expanded="true" signature="1498:1538" ph="SELECT MAX(u... " /> - <marker date="1497885607000" expanded="true" signature="1498:1539" ph="SELECT MAX(u... " /> - <marker date="1497885607000" expanded="true" signature="1498:1540" ph="SELECT MAX(u... " /> - <marker date="1497885607000" expanded="true" signature="1498:1545" ph="SELECT MAX(u... " /> + <marker date="1497893381000" expanded="true" signature="587:922" ph="INSERT INTO \"ERR\".\"user\"... " /> + <marker date="1497893381000" expanded="true" signature="1318:1364" ph="SELECT MAX(u... " /> </folding> </state> </provider> diff --git a/src/main/java/org/s4s/dao/RegistrationDAO.java b/src/main/java/org/s4s/dao/RegistrationDAO.java index 51444683d0c18acecc544d2daea29eec4210133b..bbadd23c431c71f05ee299e7cfbf7647bdad737b 100644 --- a/src/main/java/org/s4s/dao/RegistrationDAO.java +++ b/src/main/java/org/s4s/dao/RegistrationDAO.java @@ -18,10 +18,11 @@ public class RegistrationDAO extends AbstractDatabaseClass { public void addUser(int userID, String benutzer, String nachname, String vorname, java.util.Date gebDate, int fBereich, String email, String emailwdh, String passwort, String passwortWdh) { try { - sql_update = "INSERT INTO \"ERR\".\"user\"(userID, benutzername, nachname, vorname, geburtsdatum, fachbreichid, email, passwort)" - + "VALUES(\'" + 7262573 + "\', \'" + benutzer + "\', \'" + 1 + "\', \'" + nachname + "\', \'" + vorname + "\', \'" + gebDate + "\', \'" + fBereich + "\', \'" + email + "\', \'" + passwort + "\')"; + sql_update = "INSERT INTO \"ERR\".\"user\"(userID, benutzername, adresseid, nachname, vorname, geburtsdatum, fachbreichid, email, passwort)" + + "VALUES(\'" + 20 + "\', \'" + benutzer + "\', \'" + 1 + "\', \'" + nachname + "\', \'" + vorname + "\', \'" + gebDate + "\', \'" + fBereich + "\', \'" + email + "\', \'" + passwort + "\')"; int exe = JDBCConnection.getInstance().getStatement().executeUpdate(sql_update); + if (exe < 0) { throw new WrongInputException("Wrong Input!"); } @@ -34,7 +35,7 @@ public class RegistrationDAO extends AbstractDatabaseClass { } public int getUserID() { - sql_query = "SELECT MAX(userID)\" FROM \"ERR\".\"user\" u \"\n"; + sql_query = "SELECT MAX(u.userID)\" FROM \"ERR\".\"user\" u"; try { ResultSet set = JDBCConnection.getInstance().getStatement().executeQuery(sql_query); result = set.getInt("userID");