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
,EventOutboxService
,FormDataService
,FormService
,GoogleTwoFactorAuthenticationService
,GroovyLogService
,ImportActionService
,JobControllerService
,JobEventLogService
,JobProcessorService
,MetadataService
,MockEntityService
,MockEntityUtils
,PaymentLogService
,PaymentsReminderServiceImpl
,PropertyValueService
,RandomTrackingNumberService
,ReceiptDataService
,RequestLogService
,SchemaSeedService
,SecurityManagerService
,StatusManagement
,SubmissionDataService
,SubmissionDeliveryControllerService
,SubmissionEmailVerificationService
,SubmissionExtractDataService
,SubmissionReceiptServiceImpl
,SubmissionService
,SubmissionStatusService
,SubmissionTaskService
,SystemHealthService
,TaskService
,TestSuiteService
,TransactionHistoryCreationService
,TransactionLicensingService
,TransactionProcessor
,TrashCanDeliveryProcess
,UserAuthEventService
,UserBulkImportService
,UserPortalService
,UserService
Provides a base Cayenne ORM service for service classes to extend.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
protected org.apache.cayenne.access.DataDomain
protected Object
getObjectForPK
(Class dataObjectClass, Object id) protected org.apache.cayenne.access.ObjectStore
protected <T> T
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
Reverts any changes that have occurred to objects registered with DataContext; also performs cascading rollback of all parent DataContexts.protected Map
protected Map
Methods inherited from class com.avoka.fc.core.service.BaseService
getLogger
-
Constructor Details
-
CayenneService
public CayenneService()
-
-
Method Details
-
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
-
deleteObject
protected void deleteObject(org.apache.cayenne.DataObject dataObject) -
deleteObjects
-
refetchEntity
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
-
getObjectForPK
-
getDataDomain
protected org.apache.cayenne.access.DataDomain getDataDomain() -
getObjectStore
protected org.apache.cayenne.access.ObjectStore getObjectStore() -
findObject
-
performNonSelectingQuery
protected int[] performNonSelectingQuery(org.apache.cayenne.query.Query query) -
performNonSelectingQuery
-
performNonSelectingQuery
-
performQuery
-
performNamedQuery
-
performNamedQuery
-
performNamedQuery
-
performQuery
-
performNonSelectingQuery
-
toMap
-
toMap
-