public abstract class ResourceManager<T extends Resource>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.sql.Connection |
con |
protected int |
mid |
protected java.lang.String |
tableName |
Constructor and Description |
---|
ResourceManager(java.sql.Connection con,
int mid) |
Modifier and Type | Method and Description |
---|---|
void |
changeResourceCategory(java.lang.String ids,
int categoryId) |
void |
deleteResource(java.lang.String id) |
int |
getResourceCount(int categoryId) |
protected abstract T |
getResourceFromRs(java.sql.ResultSet rs) |
protected abstract java.lang.String |
getTableName() |
protected void |
loadStandartResourceFromRs(java.sql.ResultSet rs,
Resource res) |
static ResourceManager<?> |
newResourceManager(java.lang.String module,
java.sql.Connection con,
int mid) |
void |
syncResourceUse() |
abstract void |
updateResource(T res) |
protected java.sql.Connection con
protected int mid
protected java.lang.String tableName
public void changeResourceCategory(java.lang.String ids, int categoryId)
public int getResourceCount(int categoryId)
public void deleteResource(java.lang.String id)
protected void loadStandartResourceFromRs(java.sql.ResultSet rs, Resource res) throws java.sql.SQLException
java.sql.SQLException
public abstract void updateResource(T res) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
protected abstract T getResourceFromRs(java.sql.ResultSet rs) throws java.sql.SQLException
java.sql.SQLException
protected abstract java.lang.String getTableName()
public static ResourceManager<?> newResourceManager(java.lang.String module, java.sql.Connection con, int mid) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
public void syncResourceUse() throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException