throws Exception added on refresh in DataHander interface
authorMichael <Michael@Michael-LT.bfh.ch>
Wed, 18 Nov 2015 16:10:38 +0000 (17:10 +0100)
committerMichael <Michael@Michael-LT.bfh.ch>
Wed, 18 Nov 2015 16:10:38 +0000 (17:10 +0100)
dummy methods added in DataHandlerForTest no need for futher
implementation of saveChanges and refresh

src/main/java/ch/bfh/ti/srs/datahandler/DataHandler.java
src/main/java/ch/bfh/ti/srs/datahandler/DataHandlerForTests.java

index dc2122f..2728ef8 100644 (file)
@@ -120,5 +120,5 @@ public interface DataHandler {
         *                      <code>true</code> do not try to save the changes
         *                      <code>false</code> try to save the changes
         */
-       public void refresh(boolean discardChanges);
+       public void refresh(boolean discardChanges) throws Exception;
 }
index 78d9126..916047c 100644 (file)
@@ -156,4 +156,20 @@ public class DataHandlerForTests implements DataHandler {
                reservationList.add(reservation);
        }
 
+       /**
+        * {@inheritDoc}
+        */
+       @Override
+       public void saveChanges() {
+       }
+
+       /**
+        * {@inheritDoc}
+        * @throws Exception no implementation for <code>true</code> possible
+        */
+       @Override
+       public void refresh(boolean discardChanges) throws Exception {
+               if(discardChanges == true) throw new Exception("No implementation on DataHandlerForTests possible");
+       }
+
 }