mirror of
https://github.com/Rogiel/l2jserver2
synced 2025-12-10 17:32:46 +00:00
Change-Id: I7385cf78327165548c25be9184190f5b80eeba9c
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
package com.l2jserver.service.database;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
|
||||
public abstract class AbstractDAO implements DataAccessObject {
|
||||
protected final DatabaseService database;
|
||||
|
||||
@Inject
|
||||
protected AbstractDAO(DatabaseService database) {
|
||||
this.database = database;
|
||||
}
|
||||
|
||||
public DatabaseService getDatabase() {
|
||||
return database;
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.l2jserver.service.database;
|
||||
|
||||
public class DB4ODatabaseService implements DatabaseService {
|
||||
@Override
|
||||
public void start() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package com.l2jserver.service.database;
|
||||
|
||||
/**
|
||||
* The DAO interface
|
||||
*
|
||||
* @author <a href="http://www.rogiel.com">Rogiel</a>
|
||||
*/
|
||||
public interface DataAccessObject {
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package com.l2jserver.service.database;
|
||||
|
||||
import com.l2jserver.service.configuration.Configuration;
|
||||
import com.l2jserver.service.configuration.Configuration.ConfigurationName;
|
||||
import com.l2jserver.service.configuration.Configuration.ConfigurationPrefix;
|
||||
|
||||
@ConfigurationName("database")
|
||||
@ConfigurationPrefix("database")
|
||||
public interface DatabaseConfiguration extends Configuration {
|
||||
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.l2jserver.service.database;
|
||||
|
||||
import com.l2jserver.service.Service;
|
||||
|
||||
public interface DatabaseService extends Service {
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.l2jserver.service.database;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.l2jserver.service.configuration.ConfigurationService;
|
||||
|
||||
public class MySQL5DatabaseService implements DatabaseService {
|
||||
private final MySQLDatabaseConfiguration config;
|
||||
|
||||
@Inject
|
||||
public MySQL5DatabaseService(ConfigurationService configService) {
|
||||
config = configService.get(MySQLDatabaseConfiguration.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.l2jserver.service.database;
|
||||
|
||||
import com.l2jserver.service.configuration.Configuration.ConfigurationPrefix;
|
||||
|
||||
@ConfigurationPrefix("mysql")
|
||||
public interface MySQLDatabaseConfiguration extends DatabaseConfiguration {
|
||||
/**
|
||||
* @return the jdbc url
|
||||
*/
|
||||
@ConfigurationPropertyGetter(name = "jdbc.url", defaultValue = "jdbc:mysql://localhost/l2jserver-gs")
|
||||
String getJdbcUrl();
|
||||
|
||||
/**
|
||||
* @param jdbcUrl
|
||||
* the new jdbc url
|
||||
*/
|
||||
@ConfigurationPropertySetter(name = "jdbc.url")
|
||||
void setJdbcUrl(String jdbcUrl);
|
||||
|
||||
@ConfigurationPropertyGetter(name = "jdbc.username", defaultValue = "root")
|
||||
String getUsername();
|
||||
|
||||
@ConfigurationPropertySetter(name = "jdbc.username")
|
||||
void setUsername(String username);
|
||||
|
||||
@ConfigurationPropertyGetter(name = "jdbc.password")
|
||||
String getPassword();
|
||||
|
||||
@ConfigurationPropertySetter(name = "jdbc.password")
|
||||
void setPassword(String password);
|
||||
}
|
||||
Reference in New Issue
Block a user