Package com.appiancorp.suiteapi.type
Class TypedValue
java.lang.Object
com.appiancorp.suiteapi.type.TypedValue
- All Implemented Interfaces:
com.appiancorp.core.expr.portable.PortableTypedValue
,DeepCloneable
,JSONable
,JSONCacheable
,com.appiancorp.type.HasTypeRef
,Serializable
,Cloneable
- Direct Known Subclasses:
NamedTypedValue
@GwtCompatible
public class TypedValue
extends Object
implements JSONCacheable, DeepCloneable, com.appiancorp.type.HasTypeRef, Serializable, com.appiancorp.core.expr.portable.PortableTypedValue
This is a simple bean that represents a type and a value.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
protected boolean
static final int
protected static final org.apache.commons.lang.builder.ToStringStyle
Fields inherited from interface com.appiancorp.type.HasTypeRef
selectTypeId
Fields inherited from interface com.appiancorp.suiteapi.common.JSONable
hiddenAttributes$TRANSIENT
-
Constructor Summary
ConstructorDescriptionTypedValue
(TypedValue tv_) Copy constructor.TypedValue
(Long instanceType) Creates an instance with the given type.TypedValue
(Long instanceType, Object value_) Creates an instance with the given type and value. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.This is an internal method that will be removed from the public API.clone()
Clone this object.boolean
Compares the specified object with this typedValue for equality.Returns the set of attributes (properties) that should not be included in the JSON representation of the object.final Long
Retrieves the type id, which corresponds to aDatatype
.static Long[]
getInstanceTypeIds
(TypedValue[] tvs_) Get the instance type ids (as a Long array) from an array of typed values.final com.appiancorp.type.TypeRef
getValue()
Retrieves the value of this variable.int
hashCode()
void
setInstanceType
(Long instanceType) Sets the instance type of the typed value.final void
setTypeRef
(com.appiancorp.type.TypeRef typeRef) void
Sets the value of the typed variable.toString()
-
Field Details
-
NEVER
public static final int NEVER- See Also:
-
ALWAYS
public static final int ALWAYS- See Also:
-
AT_DESIGNER_DISCRETION
public static final int AT_DESIGNER_DISCRETION- See Also:
-
clearPasswordOnTransport
protected transient boolean clearPasswordOnTransport -
TO_STRING_STYLE
protected static final org.apache.commons.lang.builder.ToStringStyle TO_STRING_STYLE
-
-
Constructor Details
-
TypedValue
public TypedValue() -
TypedValue
Copy constructor. Creates a new TypedValue with the data of the given TypedValue. A deep copy of the value is performed. -
TypedValue
Creates an instance with the given type.- Parameters:
instanceType
- the type id
-
TypedValue
Creates an instance with the given type and value.- Parameters:
instanceType
- the type idvalue_
- the value
-
-
Method Details
-
getHiddenAttributes
Description copied from interface:JSONable
Returns the set of attributes (properties) that should not be included in the JSON representation of the object.- Specified by:
getHiddenAttributes
in interfaceJSONable
- Returns:
- the set of hidden attributes
-
clone
Clone this object.- Specified by:
clone
in interfaceDeepCloneable
- Overrides:
clone
in classObject
- Returns:
-
equals
Compares the specified object with this typedValue for equality. Returns true if and only if the specified object is also a typedValue, both typedValues have the same type, and the same value. -
hashCode
public int hashCode() -
getInstanceType
Retrieves the type id, which corresponds to aDatatype
. Built-in datatype ids are defined inAppianType
- Specified by:
getInstanceType
in interfacecom.appiancorp.core.expr.portable.PortableTypedValue
- Returns:
- the type id
-
setInstanceType
Sets the instance type of the typed value.- Parameters:
instanceType
- The instance type id, which corresponds to aDatatype
. Built-in datatype ids are defined inAppianType
-
toString
-
getValue
Retrieves the value of this variable.- Specified by:
getValue
in interfacecom.appiancorp.core.expr.portable.PortableTypedValue
- Returns:
- The value of the typed variable.
-
setValue
Sets the value of the typed variable.- Parameters:
value
- The value to set the typed variable to.
-
getInstanceTypeIds
Get the instance type ids (as a Long array) from an array of typed values.- Parameters:
tvs_
- an array of typed values- Returns:
- an array of the same size as the given array, containing the instance type ids of the given typed values
-
clearPasswordOnTransport
Deprecated.This is an internal method that will be removed from the public API.Should this clear passswords on transport? Transient property. Works as a flag to avoid including passwords in transport.- Returns:
-
getTypeRef
@Transient public final com.appiancorp.type.TypeRef getTypeRef()- Specified by:
getTypeRef
in interfacecom.appiancorp.type.HasTypeRef
-
setTypeRef
public final void setTypeRef(com.appiancorp.type.TypeRef typeRef) - Specified by:
setTypeRef
in interfacecom.appiancorp.type.HasTypeRef
-