Class OfflineSyncLogDao


  • public class OfflineSyncLogDao
    extends BaseDao
    Provides a DAO for the OfflineSyncLog entity.
    See Also:
    OfflineSyncLog
    • Constructor Detail

      • OfflineSyncLogDao

        public OfflineSyncLogDao()
    • Method Detail

      • getOfflineSyncForId

        public OfflineSyncLog getOfflineSyncForId​(Object id)
        Return the offline sync log object for the given id
        Parameters:
        id - the OID
        Returns:
        the matching offline sync log, or null if not found
      • getOfflineSyncLogForSyncKey

        public OfflineSyncLog getOfflineSyncLogForSyncKey​(String syncKey)
        Return the offline sync log object for the given syncKey.
        Parameters:
        syncKey - the client generated GUID syncKey
        Returns:
        the offline sync log object for the given syncKey
        Since:
        4.1.0
      • getOfflineSyncLogList

        public List<OfflineSyncLog> getOfflineSyncLogList​(String portalId,
                                                          String loginUserName,
                                                          String message,
                                                          String deviceInfo,
                                                          Date startDate,
                                                          Date endDate,
                                                          int pageSize)
        Return the list of offline sync log entries that match the search criteria
        Parameters:
        portalId - the OID of the portal for which the entries were logged (optional)
        loginUserName - the user name of the user who initiated the synchronization (optional)
        message - a substring of the message (optional)
        deviceInfo - a reported device info (optional)
        startDate - the lower bound on the synchronization time (optional)
        endDate - the upper bound on the synchronization time (optional)
        pageSize - the page size used in the query
        Returns:
        the list of matching offline sync log entries
      • getOfflineSyncLogList

        public List<OfflineSyncLog> getOfflineSyncLogList​(String portalId,
                                                          String loginUserName,
                                                          String message,
                                                          String deviceInfo,
                                                          Date startDate,
                                                          Date endDate,
                                                          int pageSize,
                                                          int fetchLimit)
        Return the list of offline sync log entries that match the search criteria
        Parameters:
        portalId - the OID of the portal for which the entries were logged (optional)
        loginUserName - the user name of the user who initiated the synchronization (optional)
        message - a substring of the message (optional)
        deviceInfo - a reported device info (optional)
        startDate - the lower bound on the synchronization time (optional)
        endDate - the upper bound on the synchronization time (optional)
        pageSize - the page size used in the query
        fetchLimit - the query fetch limit
        Returns:
        the list of matching offline sync log entries
        Since:
        4.3.0
      • purgeOfflineSyncLog

        public int purgeOfflineSyncLog​(int maxAgeDays,
                                       int fetchLimit)
        Purge offline sync log records older than a specified number of days
        Parameters:
        maxAgeDays - The age in days above which records will be deleted. If this value is negative or equal to 0, no records will be purged.
        fetchLimit - the maximum number of records to delete (only used if > 0)
        Returns:
        the number of records that were deleted