java.lang.Object
com.liferay.portal.security.audit.storage.service.persistence.AuditEventUtil

public class AuditEventUtil extends Object
The persistence utility for the audit event service. This utility wraps com.liferay.portal.security.audit.storage.service.persistence.impl.AuditEventPersistenceImpl and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.

Caching information and settings can be found in portal.properties

See Also:
Generated:
  • Constructor Details

    • AuditEventUtil

      public AuditEventUtil()
  • Method Details

    • cacheResult

      public static void cacheResult(List<AuditEvent> auditEvents)
      See Also:
      • BasePersistence.cacheResult(List)
    • cacheResult

      public static void cacheResult(AuditEvent auditEvent)
      See Also:
      • BasePersistence.cacheResult(com.liferay.portal.kernel.model.BaseModel)
    • clearCache

      public static void clearCache()
      See Also:
      • BasePersistence.clearCache()
    • clearCache

      public static void clearCache(AuditEvent auditEvent)
      See Also:
      • BasePersistence.clearCache(com.liferay.portal.kernel.model.BaseModel)
    • countWithDynamicQuery

      public static long countWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      See Also:
      • BasePersistence.countWithDynamicQuery(DynamicQuery)
    • fetchByPrimaryKeys

      public static Map<Serializable,AuditEvent> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
      See Also:
      • BasePersistence.fetchByPrimaryKeys(Set)
    • findWithDynamicQuery

      public static List<AuditEvent> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery)
    • findWithDynamicQuery

      public static List<AuditEvent> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
    • findWithDynamicQuery

      public static List<AuditEvent> findWithDynamicQuery(com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AuditEvent> orderByComparator)
      See Also:
      • BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
    • update

      public static AuditEvent update(AuditEvent auditEvent)
      See Also:
      • BasePersistence.update(com.liferay.portal.kernel.model.BaseModel)
    • update

      public static AuditEvent update(AuditEvent auditEvent, com.liferay.portal.kernel.service.ServiceContext serviceContext)
      See Also:
      • BasePersistence.update(com.liferay.portal.kernel.model.BaseModel, ServiceContext)
    • findByCompanyId

      public static List<AuditEvent> findByCompanyId(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AuditEvent> orderByComparator, boolean useFinderCache)
      Returns an ordered range of all the audit events where companyId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.portal.security.audit.storage.model.impl.AuditEventModelImpl.

      Parameters:
      companyId - the company ID
      start - the lower bound of the range of audit events
      end - the upper bound of the range of audit events (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      useFinderCache - whether to use the finder cache
      Returns:
      the ordered range of matching audit events
    • findByCompanyId_First

      public static AuditEvent findByCompanyId_First(long companyId, com.liferay.portal.kernel.util.OrderByComparator<AuditEvent> orderByComparator) throws NoSuchEventException
      Returns the first audit event in the ordered set where companyId = ?.
      Parameters:
      companyId - the company ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching audit event
    • fetchByCompanyId_First

      public static AuditEvent fetchByCompanyId_First(long companyId, com.liferay.portal.kernel.util.OrderByComparator<AuditEvent> orderByComparator)
      Returns the first audit event in the ordered set where companyId = ?.
      Parameters:
      companyId - the company ID
      orderByComparator - the comparator to order the set by (optionally null)
      Returns:
      the first matching audit event, or null if a matching audit event could not be found
    • removeByCompanyId

      public static void removeByCompanyId(long companyId)
      Removes all the audit events where companyId = ? from the database.
      Parameters:
      companyId - the company ID
    • countByCompanyId

      public static int countByCompanyId(long companyId)
      Returns the number of audit events where companyId = ?.
      Parameters:
      companyId - the company ID
      Returns:
      the number of matching audit events
    • create

      public static AuditEvent create(long auditEventId)
      Creates a new audit event with the primary key. Does not add the audit event to the database.
      Parameters:
      auditEventId - the primary key for the new audit event
      Returns:
      the new audit event
    • remove

      public static AuditEvent remove(long auditEventId) throws NoSuchEventException
      Removes the audit event with the primary key from the database. Also notifies the appropriate model listeners.
      Parameters:
      auditEventId - the primary key of the audit event
      Returns:
      the audit event that was removed
    • updateImpl

      public static AuditEvent updateImpl(AuditEvent auditEvent)
    • findByPrimaryKey

      public static AuditEvent findByPrimaryKey(long auditEventId) throws NoSuchEventException
      Returns the audit event with the primary key or throws a NoSuchEventException if it could not be found.
      Parameters:
      auditEventId - the primary key of the audit event
      Returns:
      the audit event
    • fetchByPrimaryKey

      public static AuditEvent fetchByPrimaryKey(long auditEventId)
      Returns the audit event with the primary key or returns null if it could not be found.
      Parameters:
      auditEventId - the primary key of the audit event
      Returns:
      the audit event, or null if a audit event with the primary key could not be found
    • findByCompanyId

      public static List<AuditEvent> findByCompanyId(long companyId)
      Returns all the audit events where companyId = ?.
      Parameters:
      companyId - the company ID
      Returns:
      the matching audit events
    • findByCompanyId

      public static List<AuditEvent> findByCompanyId(long companyId, int start, int end)
      Returns a range of all the audit events where companyId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.portal.security.audit.storage.model.impl.AuditEventModelImpl.

      Parameters:
      companyId - the company ID
      start - the lower bound of the range of audit events
      end - the upper bound of the range of audit events (not inclusive)
      Returns:
      the range of matching audit events
    • findByCompanyId

      public static List<AuditEvent> findByCompanyId(long companyId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<AuditEvent> orderByComparator)
      Returns an ordered range of all the audit events where companyId = ?.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent, then the query will include the default ORDER BY logic from com.liferay.portal.security.audit.storage.model.impl.AuditEventModelImpl.

      Parameters:
      companyId - the company ID
      start - the lower bound of the range of audit events
      end - the upper bound of the range of audit events (not inclusive)
      orderByComparator - the comparator to order the results by (optionally null)
      Returns:
      the ordered range of matching audit events
    • getPersistence

      public static AuditEventPersistence getPersistence()
    • setPersistence

      public static void setPersistence(AuditEventPersistence persistence)