Package org.hisp.dhis.model
Class IdentifiableObject
java.lang.Object
org.hisp.dhis.model.IdentifiableObject
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Dimension,Me,NameableObject,OptionSet,OrgUnitLevel,Period,ProgramTrackedEntityAttribute,TableHook
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAttributeValue(AttributeValue attributeValue) Adds an attribute value.voidRemoves all attribute values.booleangetAttributeValue(String attribute) Returns the attribute value with the given attribute identifier.getAttributeValueAsString(String attribute) Returns the attribute value with the given attribute identifier as a string.booleanhasAttributeValue(String attribute) Indicates whether an attribute value exists for the given attribute identifier.inthashCode()booleanremoveAttributeValue(String attribute) Removes the attribute value with the given attribute identifier.voidupdateAttributeValue(AttributeValue attributeValue) Updates an attribute value.
-
Field Details
-
id
-
code
-
name
-
created
-
lastUpdated
-
attributeValues
-
-
Constructor Details
-
IdentifiableObject
public IdentifiableObject()
-
-
Method Details
-
addAttributeValue
Adds an attribute value.- Parameters:
attributeValue- theAttributeValue.- Returns:
- true if this set did not already contain the attribute value.
-
updateAttributeValue
Updates an attribute value. Removes an existing attribute value if necessary before adding the given attribute value.- Parameters:
attributeValue- theAttributeValue.
-
getAttributeValue
Returns the attribute value with the given attribute identifier.- Parameters:
attribute- the attribute identifier.- Returns:
- the attribute value with the given attribute identifier, or null.
-
hasAttributeValue
Indicates whether an attribute value exists for the given attribute identifier.- Parameters:
attribute- the attribute identifier.- Returns:
- true of an attribute value exists.
-
getAttributeValueAsString
Returns the attribute value with the given attribute identifier as a string.- Parameters:
attribute- the attribute identifier.- Returns:
- the attribute value with the given attribute identifier, or null.
-
removeAttributeValue
Removes the attribute value with the given attribute identifier.- Parameters:
attribute- the attribute identifier.- Returns:
- true if an attribute value was removed.
-
clearAttributeValues
public void clearAttributeValues()Removes all attribute values. -
hashCode
public int hashCode() -
equals
-