fr.paris.lutece.plugins.document.business.attributes
Class DocumentAttributeHome

java.lang.Object
  extended by fr.paris.lutece.plugins.document.business.attributes.DocumentAttributeHome

public final class DocumentAttributeHome
extends Object

This class provides instances management methods (create, find, ...) for DocumentAttribute objects


Method Summary
static DocumentAttribute create(DocumentAttribute documentAttribute)
          Creation of an instance of documentAttribute
static void deleteRegularExpression(int nIdAttribute, int nIdExpression)
          Deletes a regular expression in the attribute
static DocumentAttribute findByPrimaryKey(int nKey)
          Returns an instance of a documentAttribute whose identifier is specified in parameter
static Collection<AttributeTypeParameter> getAttributeParametersValues(int nAttributeId, Locale locale)
          Get the attribute type parameters of an attribute
static List<String> getAttributeParameterValues(int nAttributeId, String strParameterName)
          Get the list of values of a parameters of an attribute
static Collection<Integer> getListRegularExpressionKeyByIdAttribute(int nIdAttribute)
          Loads all regular expression key associated to the attribute and returns them into a collection
static void insertRegularExpression(int nIdAttribute, int nIdExpression)
          Inserts a regular expression in the attribute
static void remove(int nAttributeId)
          Remove the DocumentAttribute whose identifier is specified in parameter
static List<DocumentAttribute> selectAllAttributesOfDocumentType(String codeDocumentType)
          Get all attributes of document type
static void setDocumentTypeAttributes(DocumentType documentType)
          Returns a collection of documentAttributes objects
static DocumentAttribute update(DocumentAttribute documentAttribute)
          Update of the documentAttribute which is specified in parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static DocumentAttribute create(DocumentAttribute documentAttribute)
Creation of an instance of documentAttribute

Parameters:
documentAttribute - The instance of the documentAttribute which contains the informations to store
Returns:
The instance of documentAttribute which has been created with its primary key.

update

public static DocumentAttribute update(DocumentAttribute documentAttribute)
Update of the documentAttribute which is specified in parameter

Parameters:
documentAttribute - The instance of the documentAttribute which contains the data to store
Returns:
The instance of the documentAttribute which has been updated

remove

public static void remove(int nAttributeId)
Remove the DocumentAttribute whose identifier is specified in parameter

Parameters:
nAttributeId - The id of the attribute

findByPrimaryKey

public static DocumentAttribute findByPrimaryKey(int nKey)
Returns an instance of a documentAttribute whose identifier is specified in parameter

Parameters:
nKey - The Primary key of the documentAttribute
Returns:
An instance of documentAttribute

setDocumentTypeAttributes

public static void setDocumentTypeAttributes(DocumentType documentType)
Returns a collection of documentAttributes objects

Parameters:
documentType - The document type

selectAllAttributesOfDocumentType

public static List<DocumentAttribute> selectAllAttributesOfDocumentType(String codeDocumentType)
Get all attributes of document type

Parameters:
codeDocumentType - The code document Type
Returns:
listDocumentAttributes The list of all attributes of selected code document type

getAttributeParametersValues

public static Collection<AttributeTypeParameter> getAttributeParametersValues(int nAttributeId,
                                                                              Locale locale)
Get the attribute type parameters of an attribute

Parameters:
nAttributeId - The id of the attribute to get the parameter of
locale - The locale
Returns:
The list of parameters

getAttributeParameterValues

public static List<String> getAttributeParameterValues(int nAttributeId,
                                                       String strParameterName)
Get the list of values of a parameters of an attribute

Parameters:
nAttributeId - The id of the attribute
strParameterName - The name of the parameter
Returns:
The list of values of the parameter of the attribute

insertRegularExpression

public static void insertRegularExpression(int nIdAttribute,
                                           int nIdExpression)
Inserts a regular expression in the attribute

Parameters:
nIdAttribute - The identifier of the document attribute
nIdExpression - The identifier of the regular expression

deleteRegularExpression

public static void deleteRegularExpression(int nIdAttribute,
                                           int nIdExpression)
Deletes a regular expression in the attribute

Parameters:
nIdAttribute - The identifier of the document attribute
nIdExpression - The identifier of the regular expression

getListRegularExpressionKeyByIdAttribute

public static Collection<Integer> getListRegularExpressionKeyByIdAttribute(int nIdAttribute)
Loads all regular expression key associated to the attribute and returns them into a collection

Parameters:
nIdAttribute - The identifier of the document attribute
Returns:
A collection of regular expression key


Copyright © 2013 Mairie de Paris. All Rights Reserved.