Class DocumentAttributeDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.document.business.attributes.DocumentAttributeDAO
-
- All Implemented Interfaces:
IDocumentAttributeDAO
public final class DocumentAttributeDAO extends java.lang.Object implements IDocumentAttributeDAO
This class provides Data Access methods for DocumentAttribute objects
-
-
Constructor Summary
Constructors Constructor Description DocumentAttributeDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(int nAttributeId)Delete a record from the tablevoiddeleteRegularExpression(int nIdAttribute, int nIdExpression)Deletes an association between an attribute and a regular expressionjava.util.List<java.lang.String>getAttributeParameterValues(int nAttributeId, java.lang.String strParameterName)Returns the parameter value of an attributevoidinsert(DocumentAttribute documentAttribute)Insert a new record in the table.voidinsertRegularExpression(int nIdAttribute, int nIdExpression)Inserts an association between an attribute and a regular expressionDocumentAttributeload(int nAttributeId)Load the data of DocumentAttribute from the tablejava.util.List<DocumentAttribute>selectAllAttributesOfDocumentType(java.lang.String codeDocumentType)Get all attributes of document typejava.util.List<AttributeTypeParameter>selectAttributeParametersValues(int nAttributeId)Gets Attribute parameters valuesvoidselectAttributesByDocumentType(DocumentType documentType)Add attributes to a documentjava.util.Collection<java.lang.Integer>selectListRegularExpressionKeyByIdAttribute(int nIdAttribute)Loads all regular expression key associated to the attribute and returns them into a collectionvoidstore(DocumentAttribute documentAttribute)Update the record in the table
-
-
-
Method Detail
-
insert
public void insert(DocumentAttribute documentAttribute)
Insert a new record in the table.- Specified by:
insertin interfaceIDocumentAttributeDAO- Parameters:
documentAttribute- The documentAttribute object
-
load
public DocumentAttribute load(int nAttributeId)
Load the data of DocumentAttribute from the table- Specified by:
loadin interfaceIDocumentAttributeDAO- 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:
deletein interfaceIDocumentAttributeDAO- Parameters:
nAttributeId- The DocumentAttribute Id
-
store
public void store(DocumentAttribute documentAttribute)
Update the record in the table- Specified by:
storein interfaceIDocumentAttributeDAO- Parameters:
documentAttribute- The document attribute
-
selectAttributesByDocumentType
public void selectAttributesByDocumentType(DocumentType documentType)
Add attributes to a document- Specified by:
selectAttributesByDocumentTypein interfaceIDocumentAttributeDAO- Parameters:
documentType- The document Type
-
selectAllAttributesOfDocumentType
public java.util.List<DocumentAttribute> selectAllAttributesOfDocumentType(java.lang.String codeDocumentType)
Get all attributes of document type- Specified by:
selectAllAttributesOfDocumentTypein interfaceIDocumentAttributeDAO- Parameters:
codeDocumentType- The code document Type- Returns:
- listDocumentAttributes The list of all attributes of selected code document type
-
selectAttributeParametersValues
public java.util.List<AttributeTypeParameter> selectAttributeParametersValues(int nAttributeId)
Gets Attribute parameters values- Specified by:
selectAttributeParametersValuesin interfaceIDocumentAttributeDAO- Parameters:
nAttributeId- The attribute Id- Returns:
- List of attribute parameters values
-
getAttributeParameterValues
public java.util.List<java.lang.String> getAttributeParameterValues(int nAttributeId, java.lang.String strParameterName)Returns the parameter value of an attribute- Specified by:
getAttributeParameterValuesin interfaceIDocumentAttributeDAO- Parameters:
nAttributeId- The attribute IdstrParameterName- 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:
insertRegularExpressionin interfaceIDocumentAttributeDAO- Parameters:
nIdAttribute- The identifier of the document attributenIdExpression- 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:
deleteRegularExpressionin interfaceIDocumentAttributeDAO- Parameters:
nIdAttribute- The identifier of the document attributenIdExpression- The identifier of the regular expression
-
selectListRegularExpressionKeyByIdAttribute
public java.util.Collection<java.lang.Integer> selectListRegularExpressionKeyByIdAttribute(int nIdAttribute)
Loads all regular expression key associated to the attribute and returns them into a collection- Specified by:
selectListRegularExpressionKeyByIdAttributein interfaceIDocumentAttributeDAO- Parameters:
nIdAttribute- The identifier of the document attribute- Returns:
- A collection of regular expression key
-
-