org.iternine.jeppetto.dao.jdbc
Class JDBCQueryModelDAO<T,ID>

java.lang.Object
  extended by org.iternine.jeppetto.dao.jdbc.JDBCQueryModelDAO<T,ID>
Type Parameters:
T - Persistent class
ID - ID type of the persistent class.
All Implemented Interfaces:
GenericDAO<T,ID>, QueryModelDAO<T,ID>

public class JDBCQueryModelDAO<T,ID>
extends Object
implements QueryModelDAO<T,ID>

An implementation of the QueryModelDAO interface that works atop JDBC.


Constructor Summary
protected JDBCQueryModelDAO(Class<T> entityClass, Map<String,Object> daoProperties)
           
protected JDBCQueryModelDAO(Class<T> entityClass, Map<String,Object> daoProperties, AccessControlContextProvider accessControlContextProvider)
           
 
Method Summary
 Condition buildCondition(String conditionField, ConditionType conditionType, Iterator argsIterator)
           
 Projection buildProjection(String projectionField, ProjectionType projectionType, Iterator argsIterator)
           
 void delete(T entity)
           
 void deleteById(ID id)
           
 Iterable<T> findAll()
           
 T findById(ID id)
           
 T findUniqueUsingQueryModel(QueryModel queryModel)
           
 Iterable<T> findUsingQueryModel(QueryModel queryModel)
           
 void flush()
           
 Object projectUsingQueryModel(QueryModel queryModel)
           
 void save(T entity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCQueryModelDAO

protected JDBCQueryModelDAO(Class<T> entityClass,
                            Map<String,Object> daoProperties)

JDBCQueryModelDAO

protected JDBCQueryModelDAO(Class<T> entityClass,
                            Map<String,Object> daoProperties,
                            AccessControlContextProvider accessControlContextProvider)
Method Detail

findById

public T findById(ID id)
           throws NoSuchItemException
Specified by:
findById in interface GenericDAO<T,ID>
Throws:
NoSuchItemException

findAll

public Iterable<T> findAll()
Specified by:
findAll in interface GenericDAO<T,ID>

save

public void save(T entity)
Specified by:
save in interface GenericDAO<T,ID>

delete

public void delete(T entity)
Specified by:
delete in interface GenericDAO<T,ID>

deleteById

public void deleteById(ID id)
Specified by:
deleteById in interface GenericDAO<T,ID>

flush

public void flush()
Specified by:
flush in interface GenericDAO<T,ID>

findUniqueUsingQueryModel

public T findUniqueUsingQueryModel(QueryModel queryModel)
                            throws NoSuchItemException
Specified by:
findUniqueUsingQueryModel in interface QueryModelDAO<T,ID>
Throws:
NoSuchItemException

findUsingQueryModel

public Iterable<T> findUsingQueryModel(QueryModel queryModel)
Specified by:
findUsingQueryModel in interface QueryModelDAO<T,ID>

projectUsingQueryModel

public Object projectUsingQueryModel(QueryModel queryModel)
Specified by:
projectUsingQueryModel in interface QueryModelDAO<T,ID>

buildCondition

public Condition buildCondition(String conditionField,
                                ConditionType conditionType,
                                Iterator argsIterator)
Specified by:
buildCondition in interface QueryModelDAO<T,ID>

buildProjection

public Projection buildProjection(String projectionField,
                                  ProjectionType projectionType,
                                  Iterator argsIterator)
Specified by:
buildProjection in interface QueryModelDAO<T,ID>


Copyright © 2011. All Rights Reserved.