Class GenericHibernateManualUpdateDao<T,​ID extends Serializable>

    • Constructor Detail

      • GenericHibernateManualUpdateDao

        protected GenericHibernateManualUpdateDao​(Class<T> persistentClass)
    • Method Detail

      • getIdentifier

        protected abstract ID getIdentifier​(T bean)
      • getPersistentClass

        protected Class<T> getPersistentClass()
        Returns the class whose persistence this DAO controls.
      • add

        protected void add​(T bean,
                           ITransaction transaction)
                    throws PortalException
        Adds the bean to the persistence layer.
        Parameters:
        bean - the bean to be added.
        transaction - the transaction for persistence access.
        Throws:
        PortalException
      • exists

        protected boolean exists​(ID id,
                                 ITransaction transaction)
                          throws PortalException
        Returns whether the bean of identifier id exists.
        Parameters:
        id - the bean identifier.
        transaction - the transacion to be used.
        Returns:
        whether the bean of identifier id exists.
        Throws:
        PortalException
        Since:
        8.0.0
      • delete

        protected boolean delete​(ID id,
                                 ITransaction transaction)
                          throws PortalException
        Deletes the bean with the given id from persistence.
        Parameters:
        id - the bean's id.
        transaction - the transaction for persistence access. Must be a ITransactionHibernate.
        Returns:
        true if the bean was deleted, or false if it did not exist
        Throws:
        PortalException
      • evict

        protected void evict​(ID id,
                             ITransaction transaction)
                      throws PortalException
        Evicts the bean with the given id from the second-level cache.
        Parameters:
        id - the bean identifier.
        transaction - the transaction for persistence access.
        Throws:
        PortalException
        Since:
        4.0.11
      • findByCriteria

        protected List<T> findByCriteria​(ITransaction transaction,
                                         org.hibernate.criterion.Criterion[] criterions,
                                         org.hibernate.criterion.Order[] orders)
                                  throws DaoException
        Convenience method for subclasses. All returned entities are returned in read-only state.
        Throws:
        DaoException
      • findByCriteria

        protected List<T> findByCriteria​(ITransaction transaction,
                                         org.hibernate.criterion.Criterion... criterions)
                                  throws DaoException
        Convenience method for subclasses. All returned entities are returned in read-only state.
        Throws:
        DaoException