Package bitel.billing.server.admin.resource.bean

# Class ResourceManager<T extends Resource>

java.lang.Object
bitel.billing.server.admin.resource.bean.ResourceManager<T>

Direct Known Subclasses:
  `NumberResourceManager`

public abstract class ResourceManager<T extends Resource> extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Connection`
  `con`
  `protected int`
  `mid`
  `protected String`
  `tableName`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ResourceManager(Connection con, int mid)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `changeResourceCategory(String ids, int categoryId)`
  `void`
  `deleteResource(String id)`
  `int`
  `getResourceCount(int categoryId)`
  `protected abstract T`
  `getResourceFromRs(ResultSet rs)`
  `protected abstract String`
  `getTableName()`
  `protected void`
  `loadStandartResourceFromRs(ResultSet rs, Resource res)`
  `static ResourceManager<?>`
  `newResourceManager(String module, 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 Connection con

  - ### mid

    protected int mid

  - ### tableName

    protected String tableName

- ## Constructor Details

  - ### ResourceManager

    public ResourceManager(Connection con, int mid)

- ## Method Details

  - ### changeResourceCategory

    public void changeResourceCategory(String ids, int categoryId) throws SQLException
    Throws:
      `SQLException`

  - ### getResourceCount

    public int getResourceCount(int categoryId) throws SQLException
    Throws:
      `SQLException`

  - ### deleteResource

    public void deleteResource(String id) throws SQLException
    Throws:
      `SQLException`

  - ### loadStandartResourceFromRs

    protected void loadStandartResourceFromRs(ResultSet rs, Resource res) throws SQLException
    Throws:
      `SQLException`

  - ### updateResource

    public abstract void updateResource(T res) throws SQLException
    Throws:
      `SQLException`

  - ### getResourceFromRs

    protected abstract T getResourceFromRs(ResultSet rs) throws SQLException
    Throws:
      `SQLException`

  - ### getTableName

    protected abstract String getTableName()

  - ### newResourceManager

    public static ResourceManager<?> newResourceManager(String module, 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`