removed Storage interface (unused)

This commit is contained in:
North 2014-05-28 07:57:25 +03:00
parent b456770e9c
commit 809714bc8c
2 changed files with 1 additions and 27 deletions

View file

@ -15,7 +15,7 @@ import mage.db.model.Log;
/** /**
* @author noxx, North * @author noxx, North
*/ */
public enum EntityManager implements Storage { public enum EntityManager {
instance; instance;
@ -42,18 +42,12 @@ public enum EntityManager implements Storage {
} }
} }
@Override
public void insertLog(String key, java.util.Date date, String... args) throws SQLException { public void insertLog(String key, java.util.Date date, String... args) throws SQLException {
Log logEntity = new Log(key, date); Log logEntity = new Log(key, date);
logEntity.setArguments(args); logEntity.setArguments(args);
logDao.create(logEntity); logDao.create(logEntity);
} }
/**
* Get all logs
* @return
*/
@Override
public List<Log> getAllLogs() { public List<Log> getAllLogs() {
List<Log> logs = new ArrayList<Log>(); List<Log> logs = new ArrayList<Log>();
try { try {
@ -64,13 +58,11 @@ public enum EntityManager implements Storage {
return logs; return logs;
} }
@Override
public void insertFeedback(String username, String title, String type, String message, String email, String host, java.util.Date created) throws SQLException { 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"); Feedback feedback = new Feedback(username, title, type, message, email, host, created, "new");
feedbackDao.create(feedback); feedbackDao.create(feedback);
} }
@Override
public List<Feedback> getAllFeedbacks() { public List<Feedback> getAllFeedbacks() {
List<Feedback> feedbacks = new ArrayList<Feedback>(); List<Feedback> feedbacks = new ArrayList<Feedback>();
try { try {

View file

@ -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();
}