public class Attribute
extends java.lang.Object
implements java.io.Serializable
This represents the Attribute object. ALL FIELDS are required.
The default attribute types supported are:
TYPE_BOOLEAN, TYPE_STRING, TYPE_INTEGER, TYPE_FLOAT, TYPE_DATE, TYPE_USER, TYPE_GROUP
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_BOOLEAN |
static int |
TYPE_DATE |
static int |
TYPE_FLOAT |
static int |
TYPE_GROUP |
static int |
TYPE_INTEGER |
static int |
TYPE_STRING |
static int |
TYPE_USER |
Constructor and Description |
---|
Attribute() |
Attribute(java.lang.String name,
java.lang.Integer type) |
Attribute(java.lang.String name,
java.lang.Integer type,
java.lang.Object value) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static Attribute |
findAttributeByName(Attribute[] attributes,
java.lang.String name)
Finds an attribute in a list of attributes, searching by name
|
static int |
findAttributeIndexByName(Attribute[] attributes,
java.lang.String name)
Finds the index of an attribute in a list of attributes, searching by name
|
static java.lang.Long |
getAppianTypeFromAttributeType(java.lang.Integer attributeType) |
static java.lang.Integer |
getAttributeTypeFromAppianType(java.lang.Long appianType) |
java.lang.String |
getName()
The attribute name (unique per group type, serves as the attribute handle).
|
java.lang.Integer |
getType()
Can be any one of the TYPE_XXX constants on this class.
|
java.lang.String |
getTypeName()
Returns the name of this Attribute's type.
|
java.lang.Object |
getValue()
Returns the attribute value.
|
int |
hashCode() |
void |
setName(java.lang.String name)
Sets the name.
|
void |
setType(java.lang.Integer type)
Sets the type.
|
void |
setValue(java.lang.Object value)
Sets the value.
|
java.lang.String |
toString() |
public static final int TYPE_BOOLEAN
public static final int TYPE_STRING
public static final int TYPE_INTEGER
public static final int TYPE_FLOAT
public static final int TYPE_DATE
public static final int TYPE_USER
public static final int TYPE_GROUP
public Attribute()
public Attribute(java.lang.String name, java.lang.Integer type)
public Attribute(java.lang.String name, java.lang.Integer type, java.lang.Object value)
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name to setpublic java.lang.Integer getType()
public void setType(java.lang.Integer type)
type
- The type to setpublic java.lang.Object getValue()
public void setValue(java.lang.Object value)
value
- The value to setpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static java.lang.Long getAppianTypeFromAttributeType(java.lang.Integer attributeType)
public static java.lang.Integer getAttributeTypeFromAppianType(java.lang.Long appianType)
public java.lang.String getTypeName()
public java.lang.String toString()
toString
in class java.lang.Object
public static int findAttributeIndexByName(Attribute[] attributes, java.lang.String name)
attributes
- the list of attributes to search inname
- the name of the attribute to search forpublic static Attribute findAttributeByName(Attribute[] attributes, java.lang.String name)
attributes
- the list of attributes to search inname
- the name of the attribute to search forCopyright © 2003-2024 Appian Corporation. All Rights Reserved.