Class BaseService

    • Field Detail

      • FETCH_LIMIT

        public static final int FETCH_LIMIT
        The default database fetch limit.
        See Also:
        Constant Field Values
    • Constructor Detail

      • BaseService

        public BaseService()
    • Method Detail

      • 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

        protected void deleteObjects​(Collection dataObjects)
      • commitChanges

        protected void commitChanges()
      • rollbackChanges

        protected void rollbackChanges()
      • getObjectForPK

        protected Object getObjectForPK​(Class dataObjectClass,
                                        Object id)
      • 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.SelectQuery query)
        Perform the given select query and set the default fetch limit, if no fetch limit has been set.
      • 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)
      • performQueryMatchAll

        public List performQueryMatchAll​(BaseEntity baseEntity)
        Get a list of entities that suits all match criteria.
        Parameters:
        baseEntity - an entity that has
        Returns:
        a list of entities