mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08: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
|
* @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 {
|
||||||
|
|
|
||||||
|
|
@ -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…
Add table
Add a link
Reference in a new issue