Class CayenneService

    • Constructor Detail

      • CayenneService

        public CayenneService()
    • 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
      • 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)
      • performNonSelectingQuery

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