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 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

      public TypedValue(TypedValue tv_)
      Copy constructor. Creates a new TypedValue with the data of the given TypedValue. A deep copy of the value is performed.
    • TypedValue

      public TypedValue(Long instanceType)
      Creates an instance with the given type.
      Parameters:
      instanceType - the type id
    • TypedValue

      public TypedValue(Long instanceType, Object value_)
      Creates an instance with the given type and value.
      Parameters:
      instanceType - the type id
      value_ - the value
  • Method Details

    • getHiddenAttributes

      public HashSet 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 interface JSONable
      Returns:
      the set of hidden attributes
    • clone

      public Object clone()
      Clone this object.
      Specified by:
      clone in interface DeepCloneable
      Overrides:
      clone in class Object
      Returns:
    • equals

      public boolean equals(Object o)
      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.
      Overrides:
      equals in class Object
      Parameters:
      o - the object to be compared for equality with this typeValue
      Returns:
      true if the specified object is equal to this typeValue
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getInstanceType

      public final Long getInstanceType()
      Retrieves the type id, which corresponds to a Datatype. Built-in datatype ids are defined in AppianType
      Specified by:
      getInstanceType in interface com.appiancorp.core.expr.portable.PortableTypedValue
      Returns:
      the type id
    • setInstanceType

      public void setInstanceType(Long instanceType)
      Sets the instance type of the typed value.
      Parameters:
      instanceType - The instance type id, which corresponds to a Datatype. Built-in datatype ids are defined in AppianType
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getValue

      public Object getValue()
      Retrieves the value of this variable.
      Specified by:
      getValue in interface com.appiancorp.core.expr.portable.PortableTypedValue
      Returns:
      The value of the typed variable.
    • setValue

      public void setValue(Object value)
      Sets the value of the typed variable.
      Parameters:
      value - The value to set the typed variable to.
    • getInstanceTypeIds

      public static Long[] getInstanceTypeIds(TypedValue[] tvs_)
      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 public boolean 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 interface com.appiancorp.type.HasTypeRef
    • setTypeRef

      public final void setTypeRef(com.appiancorp.type.TypeRef typeRef)
      Specified by:
      setTypeRef in interface com.appiancorp.type.HasTypeRef