Package cz.metacentrum.perun.core.api
Class Attribute
java.lang.Object
cz.metacentrum.perun.core.api.PerunBean
cz.metacentrum.perun.core.api.Auditable
cz.metacentrum.perun.core.api.AttributeDefinition
cz.metacentrum.perun.core.api.Attribute
- All Implemented Interfaces:
Serializable
,Comparable<PerunBean>
This class represents attribute (with value) of some object (VO, member).
TODO
- Author:
- Slavek Licehammer <glory@ics.muni.cz>
- See Also:
-
Constructor Summary
ConstructorDescriptionAttribute
(AttributeDefinition attributeDefinition) Creates Attribute instance from an AttributeDefinition with null value.Attribute
(AttributeDefinition attributeDefinition, Object value) Creates Attribute instance from an AttributeDefinition and a value. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getValue()
int
hashCode()
void
void
setValueCreatedAt
(String valueCreatedAt) void
setValueCreatedBy
(String valueCreatedBy) void
setValueModifiedAt
(String valueModifiedAt) void
setValueModifiedBy
(String valueModifiedBy) toString()
boolean
valueContains
(String value) Check if the attribute value contains value.Methods inherited from class cz.metacentrum.perun.core.api.AttributeDefinition
checkEquality, compareTo, getBaseFriendlyName, getDescription, getDisplayName, getEntity, getFriendlyName, getFriendlyNameParameter, getName, getNamespace, getType, getWritable, isUnique, setDescription, setDisplayName, setFriendlyName, setNamespace, setType, setUnique, setWritable
Methods inherited from class cz.metacentrum.perun.core.api.Auditable
getCreatedAt, getCreatedBy, getCreatedByUid, getModifiedAt, getModifiedBy, getModifiedByUid, setCreatedAt, setCreatedBy, setCreatedByUid, setModifiedAt, setModifiedBy, setModifiedByUid
Methods inherited from class cz.metacentrum.perun.core.api.PerunBean
getBeanName, getId, setId
-
Constructor Details
-
Attribute
public Attribute() -
Attribute
-
Attribute
Creates Attribute instance from an AttributeDefinition with null value. -
Attribute
Creates Attribute instance from an AttributeDefinition and a value.
-
-
Method Details
-
equals
- Overrides:
equals
in classAttributeDefinition
-
getValue
-
setValue
-
getValueCreatedAt
-
setValueCreatedAt
-
getValueCreatedBy
-
setValueCreatedBy
-
getValueModifiedAt
-
setValueModifiedAt
-
getValueModifiedBy
-
setValueModifiedBy
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAttributeDefinition
-
serializeToString
- Overrides:
serializeToString
in classAttributeDefinition
-
toString
- Overrides:
toString
in classAttributeDefinition
-
valueAsBoolean
-
valueAsInteger
-
valueAsList
-
valueAsMap
-
valueAsString
-
valueContains
Check if the attribute value contains value. In case of list, it uses method contains. In case of array it searches in both keys and values.- Parameters:
value
- value- Returns:
- true if the attribute value contains value.
-