com.khubla.pragmatach.framework.dao
Interface DAO<T,I>

All Known Implementing Classes:
AbstractDAO, EBeanDAO, HibernateDAO, MongoDBDAO, OpenJPADAO

public interface DAO<T,I>

Author:
tome

Method Summary
 long count()
          get the count of rows in table
 void delete(T t)
          delete
 void deletebyId(I i)
          delete
 T findById(I i)
          find by id
 List<T> getAll()
          get all
 List<T> getAll(int start, int count)
          get all
 Class<I> getIdentifierClazz()
           
 Pager<T> getPager(int batchsize)
          get pager
 Class<T> getTypeClazz()
           
 void reloadConfig()
          do a config reload
 void save(T t)
          save object
 void update(T t)
          update object
 

Method Detail

count

long count()
           throws PragmatachException
get the count of rows in table

Throws:
PragmatachException

delete

void delete(T t)
            throws PragmatachException
delete

Throws:
PragmatachException

deletebyId

void deletebyId(I i)
                throws PragmatachException
delete

Throws:
PragmatachException

findById

T findById(I i)
           throws PragmatachException
find by id

Throws:
PragmatachException

getAll

List<T> getAll()
               throws PragmatachException
get all

Throws:
PragmatachException

getAll

List<T> getAll(int start,
               int count)
               throws PragmatachException
get all

Throws:
PragmatachException

getIdentifierClazz

Class<I> getIdentifierClazz()

getPager

Pager<T> getPager(int batchsize)
                  throws PragmatachException
get pager

Throws:
PragmatachException

getTypeClazz

Class<T> getTypeClazz()

reloadConfig

void reloadConfig()
do a config reload


save

void save(T t)
          throws PragmatachException
save object

Throws:
PragmatachException

update

void update(T t)
            throws PragmatachException
update object

Throws:
PragmatachException


Copyright © 2014 khubla.com. All rights reserved.