Class DocumentAttributeDAO

java.lang.Object
fr.paris.lutece.plugins.document.business.attributes.DocumentAttributeDAO
All Implemented Interfaces:
IDocumentAttributeDAO

public final class DocumentAttributeDAO extends Object implements IDocumentAttributeDAO
This class provides Data Access methods for DocumentAttribute objects
  • Constructor Details

    • DocumentAttributeDAO

      public DocumentAttributeDAO()
  • Method Details

    • insert

      public void insert(DocumentAttribute documentAttribute)
      Insert a new record in the table.
      Specified by:
      insert in interface IDocumentAttributeDAO
      Parameters:
      documentAttribute - The documentAttribute object
    • load

      public DocumentAttribute load(int nAttributeId)
      Load the data of DocumentAttribute from the table
      Specified by:
      load in interface IDocumentAttributeDAO
      Parameters:
      nAttributeId - The attribute Id
      Returns:
      the instance of the DocumentAttribute
    • delete

      public void delete(int nAttributeId)
      Delete a record from the table
      Specified by:
      delete in interface IDocumentAttributeDAO
      Parameters:
      nAttributeId - The DocumentAttribute Id
    • store

      public void store(DocumentAttribute documentAttribute)
      Update the record in the table
      Specified by:
      store in interface IDocumentAttributeDAO
      Parameters:
      documentAttribute - The document attribute
    • selectAttributesByDocumentType

      public void selectAttributesByDocumentType(DocumentType documentType)
      Add attributes to a document
      Specified by:
      selectAttributesByDocumentType in interface IDocumentAttributeDAO
      Parameters:
      documentType - The document Type
    • selectAllAttributesOfDocumentType

      public List<DocumentAttribute> selectAllAttributesOfDocumentType(String codeDocumentType)
      Get all attributes of document type
      Specified by:
      selectAllAttributesOfDocumentType in interface IDocumentAttributeDAO
      Parameters:
      codeDocumentType - The code document Type
      Returns:
      listDocumentAttributes The list of all attributes of selected code document type
    • selectAttributeParametersValues

      public List<AttributeTypeParameter> selectAttributeParametersValues(int nAttributeId)
      Gets Attribute parameters values
      Specified by:
      selectAttributeParametersValues in interface IDocumentAttributeDAO
      Parameters:
      nAttributeId - The attribute Id
      Returns:
      List of attribute parameters values
    • getAttributeParameterValues

      public List<String> getAttributeParameterValues(int nAttributeId, String strParameterName)
      Returns the parameter value of an attribute
      Specified by:
      getAttributeParameterValues in interface IDocumentAttributeDAO
      Parameters:
      nAttributeId - The attribute Id
      strParameterName - The parameter name
      Returns:
      The parameter values of an attribute
    • insertRegularExpression

      public void insertRegularExpression(int nIdAttribute, int nIdExpression)
      Inserts an association between an attribute and a regular expression
      Specified by:
      insertRegularExpression in interface IDocumentAttributeDAO
      Parameters:
      nIdAttribute - The identifier of the document attribute
      nIdExpression - The identifier of the regular expression
    • deleteRegularExpression

      public void deleteRegularExpression(int nIdAttribute, int nIdExpression)
      Deletes an association between an attribute and a regular expression
      Specified by:
      deleteRegularExpression in interface IDocumentAttributeDAO
      Parameters:
      nIdAttribute - The identifier of the document attribute
      nIdExpression - The identifier of the regular expression
    • selectListRegularExpressionKeyByIdAttribute

      public Collection<Integer> selectListRegularExpressionKeyByIdAttribute(int nIdAttribute)
      Loads all regular expression key associated to the attribute and returns them into a collection
      Specified by:
      selectListRegularExpressionKeyByIdAttribute in interface IDocumentAttributeDAO
      Parameters:
      nIdAttribute - The identifier of the document attribute
      Returns:
      A collection of regular expression key