Class DocumentTypeDao


  • public class DocumentTypeDao
    extends AbstractDao
    Provides a DAO for the DocumentType entity.
    See Also:
    DocumentType
    • Constructor Detail

      • DocumentTypeDao

        public DocumentTypeDao()
    • Method Detail

      • getDocumentTypeForPK

        public DocumentType getDocumentTypeForPK​(Object id)
        Return the document type with the specified OID
        Parameters:
        id - the OID
        Returns:
        the matching document type, or null if not found
      • getDocumentTypeList

        public List<DocumentType> getDocumentTypeList​(String clientId,
                                                      String keyword)
        Return the list of document types matching the specified search criteria
        Parameters:
        clientId - the client OID (optional); note that global document types are always returned even if a client OID is specified
        keyword - the search keyword
        Returns:
        the list of matching document types
      • getGlobalDocumentTypes

        public List<DocumentType> getGlobalDocumentTypes()
        Return the list of global document types (those that are not associated with a particular client), sorted by name and code
        Returns:
        the list of global document types
      • getDocumentTypeByCode

        public List<DocumentType> getDocumentTypeByCode​(String code)
        Return a list of document types with the specified document code
        Parameters:
        code - the code
        Returns:
        the list of matching document types
      • getDocumentTypesByClient

        public List<DocumentType> getDocumentTypesByClient​(String clientId)
        Return the list of document types for the specified client, sorted by name and code
        Parameters:
        clientId - a valid client OID
        Returns:
        the list of document types for the client
      • getDocumentTypeByName

        public DocumentType getDocumentTypeByName​(String name,
                                                  String clientId)
        Return a document type with the specified name
        Parameters:
        name - the name
        clientId - the OID of the client the document type belongs to (optional)
        Returns:
        the matching document type, if one exists