Class ObjectAttributeBean
java.lang.Object
com.riadalabs.jira.plugins.insight.services.model.ObjectAttributeBean
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
LegacyObjectAttributeBean
,MutableObjectAttributeBean
,ObjectAttributeBean.EmptyObjectAttributeBean
Model representing an object attribute
- Author:
- Mathias Edblom
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectAttributeBean
createEmptyPlaceholder
(Integer objectTypeAttributeId, Integer objectId) Deprecated.Use { @link MutableObjectAttributeBean#create() } instead.boolean
deepEquals
(ObjectAttributeBean other) Compares this and all attribute values to determine if this is equal or not.boolean
abstract Long
getId()
The ID of the attribute.abstract List<? extends ObjectAttributeValueBean>
The value(s) set for this object attribute.abstract Integer
The ID of the object that "owns" the attributes.abstract Integer
int
hashCode()
The equals and hashcode uses the objectTypeAttributeId to separate the uniqueness for the object attributes.boolean
void
void
setObjectId
(Integer objectId) void
setObjectTypeAttributeId
(Integer objectTypeAttributeId) toString()
-
Constructor Details
-
ObjectAttributeBean
public ObjectAttributeBean()
-
-
Method Details
-
createEmptyPlaceholder
public static ObjectAttributeBean createEmptyPlaceholder(Integer objectTypeAttributeId, Integer objectId) -
isEmptyPlaceholder
public boolean isEmptyPlaceholder()- Returns:
- true if this object attribute represents an empty placeholder i.e. something that is not a persisted object attribute
-
createMutable
Deprecated.Use { @link MutableObjectAttributeBean#create() } instead. -
setId
-
getId
The ID of the attribute.- Returns:
- the id or null when null or less than 1
-
setObjectTypeAttributeId
-
getObjectTypeAttributeId
- Returns:
- the object type attribute id that determines the type of this attribute
-
setObjectId
-
getObjectId
The ID of the object that "owns" the attributes.- Returns:
- the object id
-
createObjectAttributeValueBean
-
getObjectAttributeValueBeans
The value(s) set for this object attribute.- Returns:
- the list of attribute values
-
hashCode
public int hashCode()The equals and hashcode uses the objectTypeAttributeId to separate the uniqueness for the object attributes. This is done because we not always uses the id for separation and the objectTypeAttributeId will always define if the object attributes is considered "the same" -
equals
-
deepEquals
Compares this and all attribute values to determine if this is equal or not.- Returns:
- true if this objectAttributeBean is equal to the other objectAttributeBean
-
toString
-