Class DocumentTypeHome


  • public final class DocumentTypeHome
    extends Object
    This class provides instances management methods (create, find, ...) for DocumentType objects
    • Method Detail

      • create

        public static DocumentType create​(DocumentType documentType)
        Creation of an instance of documentType
        Parameters:
        documentType - The instance of the documentType which contains the informations to store
        Returns:
        The instance of documentType which has been created with its primary key.
      • update

        public static DocumentType update​(DocumentType documentType)
        Update of the documentType which is specified in parameter
        Parameters:
        documentType - The instance of the documentType which contains the data to store
        Returns:
        The instance of the documentType which has been updated
      • remove

        public static void remove​(String strCode)
        Remove the DocumentType whose identifier is specified in parameter
        Parameters:
        strCode - The document type code
      • findByPrimaryKey

        public static DocumentType findByPrimaryKey​(String strCode)
        Returns an instance of a documentType whose identifier is specified in parameter
        Parameters:
        strCode - The document type code
        Returns:
        An instance of documentType
      • findAll

        public static Collection<DocumentType> findAll()
        Returns a collection of documentTypes objects
        Returns:
        A collection of documentTypes
      • checkDocuments

        public static boolean checkDocuments​(String strCode)
        Checks if type has documents
        Parameters:
        strCode - The document type code
        Returns:
        True if the given type has documents
      • reorderAttributes

        public static void reorderAttributes​(int nIdAttribute1,
                                             int nOrderAttribute1,
                                             int nIdAttribute2,
                                             int nOrderAttribute2)
        Reorder Attributes
        Parameters:
        nIdAttribute1 - The id of the first attribute
        nOrderAttribute1 - The order of the first attribute
        nIdAttribute2 - The id of the second attribute
        nOrderAttribute2 - The order of the second attribute
      • getDocumentTypesList

        public static fr.paris.lutece.util.ReferenceList getDocumentTypesList()
        Get document types list
        Returns:
        document types list
      • setAdminStyleSheet

        public static void setAdminStyleSheet​(byte[] baXslAdmin,
                                              String strCodeType)
        Sets the admin stylesheet
        Parameters:
        baXslAdmin - The stylesheet
        strCodeType - The code type
      • setContentStyleSheet

        public static void setContentStyleSheet​(byte[] baXslContent,
                                                String strCodeType)
        Sets the content service stylesheet
        Parameters:
        baXslContent - The stylesheet
        strCodeType - The code type