Package com.avoka.fc.core.service
Class CayenneService
- java.lang.Object
-
- com.avoka.fc.core.service.BaseService
-
- com.avoka.fc.core.service.CayenneService
-
- Direct Known Subclasses:
AbandonmentService
,AbstractDynamicDataWebService
,AbstractEmailService
,AbstractJobActionService
,AbstractRenderReceiptService
,AbstractSubmissionDataStorageService
,AmazonKMSSubmissionDataStorageService
,ApplicationPackageService
,AsyncMessageService
,AttachmentService
,AuditLogService
,BaseArchiveService
,ClientService
,CloneService
,DatabaseConfigService
,DataRetentionManagementServiceImpl
,DeliveryCheckpointService
,EmailQueueServiceImpl
,FormDataService
,FormService
,GoogleTwoFactorAuthenticationService
,GroovyLogService
,ImportActionService
,JobControllerService
,JobEventLogService
,JobProcessorService
,MetadataService
,MockEntityService
,MockEntityUtils
,PaymentLogService
,PaymentsReminderServiceImpl
,PropertyValueService
,RandomTrackingNumberService
,ReceiptDataService
,RequestLogService
,SchemaSeedService
,SecurityManagerService
,SubmissionDataService
,SubmissionDeliveryControllerService
,SubmissionEmailVerificationService
,SubmissionExtractDataService
,SubmissionReceiptServiceImpl
,SubmissionService
,SubmissionStatusService
,SubmissionTaskService
,SystemHealthService
,TaskService
,TestSuiteService
,TransactionHistoryCreationService
,TransactionLicensingService
,TransactionProcessor
,TrashCanDeliveryProcess
,UserAuthEventService
,UserBulkImportService
,UserPortalService
,UserService
public class CayenneService extends BaseService
Provides a base Cayenne ORM service for service classes to extend.
-
-
Constructor Summary
Constructors Constructor Description CayenneService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
commitChanges()
Synchronizes object graph with the database.protected void
deleteObject(org.apache.cayenne.DataObject dataObject)
protected void
deleteObjects(Collection objects)
protected org.apache.cayenne.DataObject
findObject(Class dataObjectClass, String property, Object value)
protected org.apache.cayenne.access.DataContext
getDataContext()
protected org.apache.cayenne.access.DataDomain
getDataDomain()
protected Object
getObjectForPK(Class dataObjectClass, Object id)
protected org.apache.cayenne.access.ObjectStore
getObjectStore()
protected <T> T
newObject(Class<T> persistentClass)
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.Query query)
protected <T extends BaseEntity>
TrefetchEntity(T entity)
Refetch the given entity if associated with a different data context.protected org.apache.cayenne.DataObject
refetchObject(org.apache.cayenne.DataObject dataObject)
protected void
registerNewObject(org.apache.cayenne.DataObject dataObject)
void
rollbackChanges()
Reverts any changes that have occurred to objects registered with DataContext; also performs cascading rollback of all parent DataContexts.protected Map
toMap(String[] keys, Object[] values)
protected Map
toMap(String key, Object value)
-
Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
-
-
-
Method Detail
-
commitChanges
public void commitChanges()
Synchronizes object graph with the database. Executes needed insert, update and delete queries (generated internally).
-
rollbackChanges
public void rollbackChanges()
Reverts any changes that have occurred to objects registered with DataContext; also performs cascading rollback of all parent DataContexts.
-
getDataContext
protected org.apache.cayenne.access.DataContext getDataContext()
-
refetchObject
protected org.apache.cayenne.DataObject refetchObject(org.apache.cayenne.DataObject dataObject)
-
registerNewObject
protected void registerNewObject(org.apache.cayenne.DataObject dataObject)
-
newObject
protected <T> T newObject(Class<T> persistentClass)
-
deleteObject
protected void deleteObject(org.apache.cayenne.DataObject dataObject)
-
deleteObjects
protected void deleteObjects(Collection objects)
-
refetchEntity
protected <T extends BaseEntity> T refetchEntity(T entity)
Refetch the given entity if associated with a different data context.- Parameters:
entity
- to check- Returns:
- the refetched entity if associated with a different data context.
- Since:
- 4.2.1
-
getDataDomain
protected org.apache.cayenne.access.DataDomain getDataDomain()
-
getObjectStore
protected org.apache.cayenne.access.ObjectStore getObjectStore()
-
findObject
protected org.apache.cayenne.DataObject findObject(Class dataObjectClass, String property, Object value)
-
performNonSelectingQuery
protected int[] performNonSelectingQuery(org.apache.cayenne.query.Query query)
-
performNonSelectingQuery
protected int[] performNonSelectingQuery(String queryName)
-
performNonSelectingQuery
protected int[] performNonSelectingQuery(String queryName, Map parameters)
-
performQuery
protected List performQuery(org.apache.cayenne.query.Query query)
-
performNamedQuery
protected List performNamedQuery(String queryName, Map parameters, boolean refresh)
-
performNamedQuery
protected List performNamedQuery(String queryName, String[] keys, String[] values, boolean refresh)
-
performNonSelectingQuery
protected int[] performNonSelectingQuery(String queryName, String[] keys, String[] values)
-
-