org.zeroexchange.dao.resource.money.fixed
Class CHECreditStatusDAOImpl

java.lang.Object
  extended by org.zeroexchange.dao.HibernateSessionHolder
      extended by org.zeroexchange.dao.BaseHibernateDAO<Integer,T>
          extended by org.zeroexchange.dao.BaseIntegerPKDAO<CHECreditStatus>
              extended by org.zeroexchange.dao.resource.money.fixed.CHECreditStatusDAOImpl
All Implemented Interfaces:
DAO<Integer,CHECreditStatus>, IntegerPKDAO<CHECreditStatus>, CHECreditStatusDAO

public class CHECreditStatusDAOImpl
extends BaseIntegerPKDAO<CHECreditStatus>
implements CHECreditStatusDAO

Author:
black

Constructor Summary
CHECreditStatusDAOImpl()
           
 
Method Summary
 void freeAmount(BigDecimal amount, Integer userId)
          Frees specified amount.
 CHECreditStatus getByUserId(Integer userId)
          Returns credit status by the user's id.
 Class<CHECreditStatus> getEntityClass()
          
 CHECreditStatus getOrCreateByUserId(Integer userId)
          Returns credit status by the user's id OR creates it if not exists.
 BigDecimal getReserved(Integer userId)
          Returns reserved amount.
 void markReserved(BigDecimal amount, Integer userId)
          Marks specified amount as reserved.
 
Methods inherited from class org.zeroexchange.dao.BaseHibernateDAO
getById, removeById, save
 
Methods inherited from class org.zeroexchange.dao.HibernateSessionHolder
getSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.zeroexchange.dao.DAO
getById, removeById, save
 

Constructor Detail

CHECreditStatusDAOImpl

public CHECreditStatusDAOImpl()
Method Detail

getEntityClass

public Class<CHECreditStatus> getEntityClass()

Specified by:
getEntityClass in class BaseHibernateDAO<Integer,CHECreditStatus>

markReserved

public void markReserved(BigDecimal amount,
                         Integer userId)
Marks specified amount as reserved.

Specified by:
markReserved in interface CHECreditStatusDAO

getReserved

public BigDecimal getReserved(Integer userId)
Returns reserved amount.

Specified by:
getReserved in interface CHECreditStatusDAO

freeAmount

public void freeAmount(BigDecimal amount,
                       Integer userId)
Frees specified amount.

Specified by:
freeAmount in interface CHECreditStatusDAO

getByUserId

public CHECreditStatus getByUserId(Integer userId)
Returns credit status by the user's id.

Specified by:
getByUserId in interface CHECreditStatusDAO

getOrCreateByUserId

public CHECreditStatus getOrCreateByUserId(Integer userId)
Returns credit status by the user's id OR creates it if not exists.

Specified by:
getOrCreateByUserId in interface CHECreditStatusDAO


Copyright © 2013. All Rights Reserved.