Class ObjectAttributeBean

java.lang.Object
com.riadalabs.jira.plugins.insight.services.model.ObjectAttributeBean
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
LegacyObjectAttributeBean, MutableObjectAttributeBean, ObjectAttributeBean.EmptyObjectAttributeBean

public abstract class ObjectAttributeBean extends Object implements Serializable
Model representing an object attribute
Author:
Mathias Edblom
See Also:
  • 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 public MutableObjectAttributeBean createMutable()
      Deprecated.
      Use { @link MutableObjectAttributeBean#create() } instead.
    • setId

      public void setId(Long id)
    • getId

      @Nullable public abstract Long getId()
      The ID of the attribute.
      Returns:
      the id or null when null or less than 1
    • setObjectTypeAttributeId

      public void setObjectTypeAttributeId(Integer objectTypeAttributeId)
    • getObjectTypeAttributeId

      public abstract Integer getObjectTypeAttributeId()
      Returns:
      the object type attribute id that determines the type of this attribute
    • setObjectId

      public void setObjectId(Integer objectId)
    • getObjectId

      public abstract Integer getObjectId()
      The ID of the object that "owns" the attributes.
      Returns:
      the object id
    • createObjectAttributeValueBean

      public MutableObjectAttributeValueBean createObjectAttributeValueBean()
    • getObjectAttributeValueBeans

      public abstract List<? extends ObjectAttributeValueBean> 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"
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • deepEquals

      public boolean deepEquals(ObjectAttributeBean other)
      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

      public String toString()
      Overrides:
      toString in class Object