Class ResourceManager<T extends Resource>
java.lang.Object
bitel.billing.server.admin.resource.bean.ResourceManager<T>
- Direct Known Subclasses:
IPResourceRangeManager
,NumberResourceManager
public abstract class ResourceManager<T extends Resource>
extends java.lang.Object
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ResourceManager(java.sql.Connection con, int mid)
-
Method Summary
Modifier and Type Method 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)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
con
protected java.sql.Connection con -
mid
protected int mid -
tableName
protected java.lang.String tableName
-
-
Constructor Details
-
ResourceManager
public ResourceManager(java.sql.Connection con, int mid)
-
-
Method Details
-
changeResourceCategory
public void changeResourceCategory(java.lang.String ids, int categoryId) -
getResourceCount
public int getResourceCount(int categoryId) -
deleteResource
public void deleteResource(java.lang.String id) -
loadStandartResourceFromRs
protected void loadStandartResourceFromRs(java.sql.ResultSet rs, Resource res) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
updateResource
- Throws:
ru.bitel.bgbilling.common.BGException
-
getResourceFromRs
- Throws:
java.sql.SQLException
-
getTableName
protected abstract java.lang.String getTableName() -
newResourceManager
public static ResourceManager<?> newResourceManager(java.lang.String module, java.sql.Connection con, int mid) throws ru.bitel.bgbilling.common.BGException- Throws:
ru.bitel.bgbilling.common.BGException
-
syncResourceUse
public void syncResourceUse() throws ru.bitel.bgbilling.common.BGException- Throws:
ru.bitel.bgbilling.common.BGException
-