Class ResourceUseManager<T extends ResourceUse>

java.lang.Object
bitel.billing.server.admin.resource.bean.ResourceUseManager<T>
Direct Known Subclasses:
NumberResourceUseManager

public abstract class ResourceUseManager<T extends ResourceUse>
extends java.lang.Object
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected java.sql.Connection con  
    protected int mid  
    protected java.lang.String tableName  
  • Constructor Summary

    Constructors
    Constructor Description
    ResourceUseManager​(java.sql.Connection con, int mid)  
  • Method Summary

    Modifier and Type Method Description
    void closeResourceUse​(int cid, java.util.Date date)  
    void freeResources​(int cid)  
    java.util.List<T> getResourceUse​(int resourceId)  
    protected abstract T getResourceUseFromRs​(java.sql.ResultSet rs)  
    protected abstract java.lang.String getTableName()  
    protected abstract void insertResourceUseList​(int resourceId, java.util.List<T> resourceUseList)  
    protected void loadStandartResourceUseFromRs​(ResourceUse ruse, java.sql.ResultSet rs)  
    void updateResourceUse​(int resourceId, java.util.List<T> useList)  
    boolean wasResourceUsed​(java.lang.String resourceId)  

    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
    • tableName

      protected java.lang.String tableName
    • mid

      protected int mid
  • Constructor Details

    • ResourceUseManager

      public ResourceUseManager​(java.sql.Connection con, int mid)
  • Method Details

    • getResourceUse

      public java.util.List<T> getResourceUse​(int resourceId)
    • updateResourceUse

      public void updateResourceUse​(int resourceId, java.util.List<T> useList)
    • insertResourceUseList

      protected abstract void insertResourceUseList​(int resourceId, java.util.List<T> resourceUseList) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • wasResourceUsed

      public boolean wasResourceUsed​(java.lang.String resourceId)
    • loadStandartResourceUseFromRs

      protected void loadStandartResourceUseFromRs​(ResourceUse ruse, java.sql.ResultSet rs) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • getResourceUseFromRs

      protected abstract T getResourceUseFromRs​(java.sql.ResultSet rs)
    • getTableName

      protected abstract java.lang.String getTableName()
    • freeResources

      public void freeResources​(int cid)
    • closeResourceUse

      public void closeResourceUse​(int cid, java.util.Date date)