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, DatabaseIntegrityCheckerService, 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

public class CayenneService extends BaseService
Provides a base Cayenne ORM service for service classes to extend.
  • 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

      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
    • getObjectForPK

      protected Object getObjectForPK(Class dataObjectClass, Object id)
    • 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, boolean refresh)
    • performNamedQuery

      protected List performNamedQuery(String queryName, Map parameters, boolean refresh)
    • performNamedQuery

      protected List performNamedQuery(String queryName, String[] keys, String[] values, boolean refresh)
    • performQuery

      protected List performQuery(Class dataObjectClass, String property, Object value)
    • performNonSelectingQuery

      protected int[] performNonSelectingQuery(String queryName, String[] keys, String[] values)
    • toMap

      protected Map toMap(String key, Object value)
    • toMap

      protected Map toMap(String[] keys, Object[] values)