mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
removed Storage interface (unused)
This commit is contained in:
parent
b456770e9c
commit
809714bc8c
2 changed files with 1 additions and 27 deletions
|
@ -15,7 +15,7 @@ import mage.db.model.Log;
|
|||
/**
|
||||
* @author noxx, North
|
||||
*/
|
||||
public enum EntityManager implements Storage {
|
||||
public enum EntityManager {
|
||||
|
||||
instance;
|
||||
|
||||
|
@ -42,18 +42,12 @@ public enum EntityManager implements Storage {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertLog(String key, java.util.Date date, String... args) throws SQLException {
|
||||
Log logEntity = new Log(key, date);
|
||||
logEntity.setArguments(args);
|
||||
logDao.create(logEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all logs
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Log> getAllLogs() {
|
||||
List<Log> logs = new ArrayList<Log>();
|
||||
try {
|
||||
|
@ -64,13 +58,11 @@ public enum EntityManager implements Storage {
|
|||
return logs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertFeedback(String username, String title, String type, String message, String email, String host, java.util.Date created) throws SQLException {
|
||||
Feedback feedback = new Feedback(username, title, type, message, email, host, created, "new");
|
||||
feedbackDao.create(feedback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Feedback> getAllFeedbacks() {
|
||||
List<Feedback> feedbacks = new ArrayList<Feedback>();
|
||||
try {
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
package mage.db;
|
||||
|
||||
import mage.db.model.Feedback;
|
||||
import mage.db.model.Log;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Storage interface for saving and fetching entities.
|
||||
* @author noxx
|
||||
*/
|
||||
public interface Storage {
|
||||
void insertLog(String key, Date date, String... args) throws Exception;
|
||||
List<Log> getAllLogs();
|
||||
void insertFeedback(String username, String title, String type, String message, String email, String host, java.util.Date created) throws Exception;
|
||||
List<Feedback> getAllFeedbacks();
|
||||
}
|
Loading…
Reference in a new issue