Package com.im.df.api.capabilities
Class DFFieldPickListCapability.Item
- java.lang.Object
-
- com.im.df.api.capabilities.DFFieldPickListCapability.Item
-
- Enclosing class:
- DFFieldPickListCapability
public static final class DFFieldPickListCapability.Item extends java.lang.Object
Representation of a single value for the pick list. Each item has the value (used in search, etc.), but also can have a label. This label can be used in query builder or form based query as the labels should make more sense to user. There is also one more attribute of the Item: whether it is obsoleted value. Obsoleted means that the values used be use in database (there can exist rows with this values). So it make sense to query it, but users should not be allowed to insert this value to the database (using edit and insert).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getLabel()
Label of the value.java.lang.String
getLabelWithValue()
Long text representation of the value, with actual value in parenthesis if different from label.java.lang.Comparable<?>
getValue()
int
hashCode()
boolean
isObsoleted()
java.lang.String
toString()
-
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
Label of the value. It never returnsnull
. If label is not defined it just uses the value converted toString
.- Returns:
- Label for the item - human readable text representing the value.
-
getLabelWithValue
public java.lang.String getLabelWithValue()
Long text representation of the value, with actual value in parenthesis if different from label. It never returnsnull
. If label is not defined it just uses the value converted toString
.- Returns:
- Long text representation for the item, in form of
label (value)
in case label different from value is defined.
-
getValue
public java.lang.Comparable<?> getValue()
- Returns:
- The values which is wrapped by this
Item
.
-
isObsoleted
public boolean isObsoleted()
- Returns:
- whether this item is obsoleted or still active. For more details see this class description:
DFFieldPickListCapability.Item
.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-