Package com.logicaldoc.core.metadata
Class Attribute
java.lang.Object
com.logicaldoc.core.metadata.Attribute
- All Implemented Interfaces:
Serializable
,Comparable<Attribute>
This class defines the value of an attribute associated to an extensible
object. For each value, is possible to define the type and if it is mandatory
or not.
- Since:
- 4.5.1
- Author:
- Matteo Caruso - LogicalDOC
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
Gets the value as it should be displayed to the userint
int
getLabel()
int
Whether an attribute value is mandatory or not.int
getName()
int
This is the position of the attribute into the attributes listint
getSetId()
int
getType()
getValue()
Gets the attribute value.int
hashCode()
void
setBooleanValue
(Boolean booleanValue) void
setDateValue
(Date dateValue) void
setDependsOn
(String dependsOn) void
setDoubleValue
(Double doubleValue) void
setEditor
(int editor) void
setHidden
(int hidden) void
setInitialization
(String initialization) void
setIntValue
(Long intValue) void
void
setMandatory
(int mandatory) void
setMultiple
(int multiple) void
void
void
setPosition
(int position) void
setReadonly
(int readonly) void
void
setStringValue
(String stringValue) void
setStringValues
(String stringValues) void
setType
(int type) void
setValidation
(String validation) void
Sets the attribute value.
-
Field Details
-
TYPE_STRING
public static final int TYPE_STRING- See Also:
-
TYPE_INT
public static final int TYPE_INT- See Also:
-
TYPE_DOUBLE
public static final int TYPE_DOUBLE- See Also:
-
TYPE_DATE
public static final int TYPE_DATE- See Also:
-
TYPE_USER
public static final int TYPE_USER- See Also:
-
TYPE_BOOLEAN
public static final int TYPE_BOOLEAN- See Also:
-
TYPE_FOLDER
public static final int TYPE_FOLDER- See Also:
-
TYPE_DOCUMENT
public static final int TYPE_DOCUMENT- See Also:
-
EDITOR_DEFAULT
public static final int EDITOR_DEFAULT- See Also:
-
EDITOR_LISTBOX
public static final int EDITOR_LISTBOX- See Also:
-
-
Constructor Details
-
Attribute
public Attribute() -
Attribute
-
-
Method Details
-
getStringValue
-
setStringValue
-
getIntValue
-
setIntValue
-
getDoubleValue
-
setDoubleValue
-
getDateValue
-
setDateValue
-
getBooleanValue
-
setBooleanValue
-
getType
public int getType() -
setType
public void setType(int type) -
getValue
Gets the attribute value. It can be as String, Long, Double or Date.- Returns:
- The attribute value as Object.
-
getDisplayValue
Gets the value as it should be displayed to the user- Returns:
- The attribute value to display
-
setValue
Sets the attribute value. It can be as String, Long, Double or Date.- Parameters:
value
- The attribute value.
-
getMandatory
public int getMandatory()Whether an attribute value is mandatory or not.- Returns:
- If 0, the attribute value is not mandatory; if 1, the attribute value is mandatory.
-
setMandatory
public void setMandatory(int mandatory) -
getPosition
public int getPosition()This is the position of the attribute into the attributes list- Returns:
- the attribute's position
-
setPosition
public void setPosition(int position) -
compareTo
- Specified by:
compareTo
in interfaceComparable<Attribute>
-
hashCode
public int hashCode() -
equals
-
getLabel
-
setLabel
-
getEditor
public int getEditor() -
setEditor
public void setEditor(int editor) -
getHidden
public int getHidden() -
setHidden
public void setHidden(int hidden) -
getSetId
-
setSetId
-
getMultiple
public int getMultiple() -
setMultiple
public void setMultiple(int multiple) -
getParent
-
setParent
-
getName
-
setName
-
getStringValues
-
setStringValues
-
getValidation
-
setValidation
-
getInitialization
-
setInitialization
-
getDependsOn
-
setDependsOn
-
getReadonly
public int getReadonly() -
setReadonly
public void setReadonly(int readonly)
-