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
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanGets the value as it should be displayed to the userintintgetLabel()intWhether an attribute value is mandatory or not.intgetName()intThis is the position of the attribute into the attributes listintgetSetId()intgetType()getValue()Gets the attribute value.inthashCode()booleanvoidsetBooleanValue(Boolean booleanValue) voidsetDateValue(Date dateValue) voidsetDependsOn(String dependsOn) voidsetDoubleValue(Double doubleValue) voidsetEditor(int editor) voidsetHidden(int hidden) voidsetInitialization(String initialization) voidsetIntValue(Long intValue) voidvoidsetMandatory(int mandatory) voidsetMultiple(int multiple) voidvoidvoidsetPosition(int position) voidsetReadonly(int readonly) voidvoidsetStringValue(String stringValue) voidsetStringValues(String stringValues) voidsetType(int type) voidsetValidation(String validation) voidSets 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:
-
TYPE_SECTION
public static final int TYPE_SECTION- 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) -
isSection
public boolean isSection() -
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:
compareToin 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
-
getDependsOn
-
setDependsOn
-
getReadonly
public int getReadonly() -
setReadonly
public void setReadonly(int readonly) -
getValidation
-
setValidation
-
getInitialization
-
setInitialization
-