com.khubla.pragmatach.plugin.ebean
Class EBeanDAO<T,I extends Serializable>

java.lang.Object
  extended by com.khubla.pragmatach.framework.dao.AbstractDAO<T,I>
      extended by com.khubla.pragmatach.plugin.ebean.EBeanDAO<T,I>
All Implemented Interfaces:
DAO<T,I>

public class EBeanDAO<T,I extends Serializable>
extends AbstractDAO<T,I>

Author:
tome

Constructor Summary
EBeanDAO(Class<T> typeClazz, Class<I> identifierClazz)
           
 
Method Summary
 long count()
          get the count of rows in table
 void delete(T t)
          delete
 void deletebyId(I i)
          delete
 com.avaje.ebean.Query<T> find()
          find by fluent query
 T findById(I i)
          find by id
 List<T> getAll()
          findall
 List<T> getAll(int start, int count)
          get all
protected static Set<Class<?>> getEntityClasses()
          the annotation scanner will have run; we can just query for annotated classes
 Class<I> getIdentifierClazz()
           
 Class<T> getTypeClazz()
           
 void reloadConfig()
          do a config reload
 void save(T t)
          save object
 void update(T t)
          update object
 
Methods inherited from class com.khubla.pragmatach.framework.dao.AbstractDAO
getPager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EBeanDAO

public EBeanDAO(Class<T> typeClazz,
                Class<I> identifierClazz)
Method Detail

getEntityClasses

protected static Set<Class<?>> getEntityClasses()
                                         throws PragmatachException
the annotation scanner will have run; we can just query for annotated classes

Throws:
PragmatachException

count

public long count()
           throws PragmatachException
Description copied from interface: DAO
get the count of rows in table

Throws:
PragmatachException

delete

public void delete(T t)
            throws PragmatachException
delete

Throws:
PragmatachException

deletebyId

public void deletebyId(I i)
                throws PragmatachException
delete

Throws:
PragmatachException

find

public com.avaje.ebean.Query<T> find()
                              throws PragmatachException
find by fluent query

Throws:
PragmatachException

findById

public T findById(I i)
           throws PragmatachException
find by id

Throws:
PragmatachException

getAll

public List<T> getAll()
               throws PragmatachException
findall

Throws:
PragmatachException

getAll

public List<T> getAll(int start,
                      int count)
               throws PragmatachException
Description copied from interface: DAO
get all

Throws:
PragmatachException

getIdentifierClazz

public Class<I> getIdentifierClazz()

getTypeClazz

public Class<T> getTypeClazz()

reloadConfig

public void reloadConfig()
Description copied from interface: DAO
do a config reload


save

public void save(T t)
          throws PragmatachException
save object

Throws:
PragmatachException

update

public void update(T t)
            throws PragmatachException
update object

Throws:
PragmatachException


Copyright © 2014 khubla.com. All rights reserved.