Commit f30e2ab2 authored by firegnom's avatar firegnom
Browse files

modified prefs dao to be interface so it can be now have different implementations

parent d626feec
package mvplan;
public class MVPlanException extends Exception{
public MVPlanException(String desc) {
super(desc);
}
public MVPlanException() {
super();
}
public MVPlanException(String string, Throwable e) {
super(string,e);
}
/**this is a toplevel exception for library
* @author Maciej Kaniewski
*/
private static final long serialVersionUID = 1L;
}
......@@ -24,7 +24,9 @@
package mvplan.model;
public class ModelStateException extends Exception {
import mvplan.MVPlanException;
public class ModelStateException extends MVPlanException {
/**
* Empty Constructor.
*/
......
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* The GNU General Public License can be read at http://www.gnu.org/licenses/licenses.html
*/
package mvplan.prefs;
/**This is interface for saving Mv-plan preferences
*
* @author Maciej Kaniewski
*/
public interface PrefsDAO {
/**
* Persists Prefs object
*/
public void setPrefs(Prefs p) throws PrefsException;
/**
* Read Prefs object
*/
public Prefs getPrefs() throws PrefsException;
}
package mvplan.prefs;
import mvplan.MVPlanException;
public class PrefsException extends MVPlanException{
public PrefsException(String string) {
super(string);
}
public PrefsException(String string, Throwable e) {
super(string,e);
}
/**
*
*/
private static final long serialVersionUID = 1L;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment