Package com.avoka.core.service
Class BaseService
java.lang.Object
com.avoka.core.service.BaseService
- Direct Known Subclasses:
BlankTestReceiptService
,ObjectConverterService
Provides base service classes for application services classes to extend
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
deleteObject
(org.apache.cayenne.DataObject dataObject) protected void
deleteObjects
(Collection dataObjects) protected org.apache.cayenne.DataObject
findObject
(Class dataObjectClass, String property, Object value) protected org.apache.cayenne.access.DataContext
protected int
Return the default query fetch limit.protected org.slf4j.Logger
Return the service log.protected Object
getObjectForPK
(Class dataObjectClass, Object id) protected List
performNamedQuery
(String queryName, boolean refresh) protected List
performNamedQuery
(String queryName, String[] keys, String[] values, boolean refresh) protected List
performNamedQuery
(String queryName, Map parameters, boolean refresh) protected int[]
performNonSelectingQuery
(String queryName) protected int[]
performNonSelectingQuery
(String queryName, String[] keys, String[] values) protected int[]
performNonSelectingQuery
(String queryName, Map parameters) protected int[]
performNonSelectingQuery
(org.apache.cayenne.query.Query query) protected List
performQuery
(Class dataObjectClass, String property, Object value) protected List
performQuery
(org.apache.cayenne.query.SelectQuery query) Perform the given select query and set the default fetch limit, if no fetch limit has been set.performQueryMatchAll
(BaseEntity baseEntity) Get a list of entities that suits all match criteria.protected void
registerNewObject
(org.apache.cayenne.DataObject dataObject) protected void
protected void
setFetchLimit
(int limit) Set the default query fetch limit.protected Map
protected Map
-
Field Details
-
FETCH_LIMIT
public static final int FETCH_LIMITThe default database fetch limit.- See Also:
-
-
Constructor Details
-
BaseService
public BaseService()
-
-
Method Details
-
getFetchLimit
protected int getFetchLimit()Return the default query fetch limit.- Returns:
- the default query fetch limit
-
setFetchLimit
protected void setFetchLimit(int limit) Set the default query fetch limit.- Parameters:
limit
- the default query fetch limit
-
getLogger
protected org.slf4j.Logger getLogger()Return the service log.- Returns:
- the service log
-
getDataContext
protected org.apache.cayenne.access.DataContext getDataContext() -
registerNewObject
protected void registerNewObject(org.apache.cayenne.DataObject dataObject) -
deleteObject
protected void deleteObject(org.apache.cayenne.DataObject dataObject) -
deleteObjects
-
commitChanges
protected void commitChanges() -
rollbackChanges
protected void rollbackChanges() -
getObjectForPK
-
findObject
-
performNonSelectingQuery
protected int[] performNonSelectingQuery(org.apache.cayenne.query.Query query) -
performNonSelectingQuery
-
performNonSelectingQuery
-
performQuery
Perform the given select query and set the default fetch limit, if no fetch limit has been set. -
performNamedQuery
-
performNamedQuery
-
performNamedQuery
-
performQuery
-
performNonSelectingQuery
-
performQueryMatchAll
Get a list of entities that suits all match criteria.- Parameters:
baseEntity
- an entity that has- Returns:
- a list of entities
-
toMap
-
toMap
-