Interface BaseFileTransferDao

  • All Known Implementing Classes:
    HibernateBaseFileTransferDaoImpl

    public interface BaseFileTransferDao
    Data Access Interface for File Transfer objects
    Author:
    Ikasan Development Team
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void delete​(FileFilter fileFilter)
      Deletes given FileFilter.
      org.ikasan.spec.search.PagedSearchResult<FileFilter> find​(int pageNo, int pageSize, java.lang.String criteria, java.lang.String clientId)
      Find a Paged List ofFileFilter by its id: clientId or and clientId
      FileFilter findById​(int id)
      Finds FileFilter by given id.
      void housekeep​(java.lang.String clientId, int ageOfFiles, int maxRows)
      Housekeeps FileFilter entries.
      boolean isDuplicate​(ClientListEntry entry, boolean filterOnFilename, boolean filterOnLastModifiedDate)
      Method that checks if an ClientListEntry is already included in the filter table.
      void persistClientListEntry​(ClientListEntry entry)
      Derives an FileFilter from the provided ClientListEntry and persists it to the filtering table.
      FileFilter save​(FileFilter fileFilter)
      Saves given FileFilter.
    • Method Detail

      • isDuplicate

        boolean isDuplicate​(ClientListEntry entry,
                            boolean filterOnFilename,
                            boolean filterOnLastModifiedDate)
                     throws org.hibernate.HibernateException
        Method that checks if an ClientListEntry is already included in the filter table.
        Parameters:
        entry - The ClientListEntry to filter
        filterOnFilename -
        filterOnLastModifiedDate -
        Returns:
        true if the entry is a duplicate, false otherwise.
        Throws:
        java.lang.NullPointerException
        org.hibernate.HibernateException
      • persistClientListEntry

        void persistClientListEntry​(ClientListEntry entry)
                             throws org.hibernate.HibernateException
        Derives an FileFilter from the provided ClientListEntry and persists it to the filtering table.
        Parameters:
        entry - the ClientListEntry to save.
        Throws:
        org.hibernate.HibernateException
      • housekeep

        void housekeep​(java.lang.String clientId,
                       int ageOfFiles,
                       int maxRows)
                throws org.hibernate.HibernateException
        Housekeeps FileFilter entries.
        Parameters:
        clientId - The clientId (as multiple clients share the same table)
        ageOfFiles - (delete from today minus ageOfFiles in Days)
        maxRows - The maximum number of rows the housekeeping can deal with
        Throws:
        org.hibernate.HibernateException
      • findById

        FileFilter findById​(int id)
                     throws org.hibernate.HibernateException
        Finds FileFilter by given id.
        Parameters:
        id - of a FileFilter entry
        Returns:
        FileFilter entry for given id
        Throws:
        java.lang.NullPointerException
        org.hibernate.HibernateException
      • delete

        void delete​(FileFilter fileFilter)
             throws org.hibernate.HibernateException
        Deletes given FileFilter.
        Parameters:
        fileFilter - to be deleted
        Throws:
        java.lang.NullPointerException
        org.hibernate.HibernateException
      • save

        FileFilter save​(FileFilter fileFilter)
                 throws org.hibernate.HibernateException
        Saves given FileFilter.
        Parameters:
        fileFilter - to be deleted
        Throws:
        java.lang.NullPointerException
        org.hibernate.HibernateException
      • find

        org.ikasan.spec.search.PagedSearchResult<FileFilter> find​(int pageNo,
                                                                  int pageSize,
                                                                  java.lang.String criteria,
                                                                  java.lang.String clientId)
        Find a Paged List ofFileFilter by its id: clientId or and clientId
        Parameters:
        pageNo - page number
        pageSize - page Size to be returned
        criteria - of FileFilters to be found
        clientId - of FileFilters to be found
        Returns:
        The found Paged Search result of FileFilter or empty if nothing found in persistence.