Class DatatypeProperties

java.lang.Object
com.appiancorp.suiteapi.type.DatatypeProperties
All Implemented Interfaces:
com.appiancorp.cache.CoupledValue, AppianType, com.appiancorp.type.DataTypeProperties, Serializable
Direct Known Subclasses:
Datatype

@GwtCompatible public class DatatypeProperties extends Object implements AppianType, Serializable, com.appiancorp.type.DataTypeProperties, com.appiancorp.cache.CoupledValue
Datatype Properties The Datatype Properties of a TypedValue. Types are immutable; once created, they never change on the backend. All builtin Datatypes have a parent of null (global). A Type number is constant once created in a given installation of the product, and thus a Type may be safely cached.
See Also:
  • Field Details

    • LOG

      public static final org.apache.log4j.Logger LOG
    • AUTO_GENERATE_LIST

      public static final Long AUTO_GENERATE_LIST
    • SUGGEST_PROPERTY_NAME

      public static final String SUGGEST_PROPERTY_NAME
      See Also:
    • SUGGEST_PROPERTY_DESCRIPTION

      public static final String SUGGEST_PROPERTY_DESCRIPTION
      See Also:
    • SUGGEST_PROPERTY_QUALIFIED_NAME

      public static final String SUGGEST_PROPERTY_QUALIFIED_NAME
      See Also:
    • SORT_BY_ID

      public static final Integer SORT_BY_ID
    • SORT_BY_NAME

      public static final Integer SORT_BY_NAME
    • SORT_BY_DESCRIPTION

      public static final Integer SORT_BY_DESCRIPTION
    • SORT_BY_NAMESPACE

      public static final Integer SORT_BY_NAMESPACE
    • SORT_BY_CREATION_TIME

      public static final Integer SORT_BY_CREATION_TIME
    • SORT_BY_CREATOR

      public static final Integer SORT_BY_CREATOR
    • SORT_BY_VISIBILITY

      public static final Integer SORT_BY_VISIBILITY
    • SORT_BY_ORIGIN

      public static final Integer SORT_BY_ORIGIN
    • SORT_BY_FOUNDATION

      public static final Integer SORT_BY_FOUNDATION
    • SORT_BY_BASE

      public static final Integer SORT_BY_BASE
    • SORT_BY_TYPEOF

      public static final Integer SORT_BY_TYPEOF
    • SORT_BY_LIST

      public static final Integer SORT_BY_LIST
    • SORT_BY_VERSIONS

      public static final Integer SORT_BY_VERSIONS
    • SORT_BY_VERSION_ID

      public static final Integer SORT_BY_VERSION_ID
    • DYNAMIC_TYPE_HAS_VARIANT

      @Deprecated public static final int DYNAMIC_TYPE_HAS_VARIANT
      Deprecated.
      For Appian internal use only.
      DYNAMIC_TYPE_HAS_VARIANT
      See Also:
    • DYNAMIC_TYPE_HAS_USERNAME

      @Deprecated public static final int DYNAMIC_TYPE_HAS_USERNAME
      Deprecated.
      For Appian internal use only.
      DYNAMIC_TYPE_HAS_USERNAME
      See Also:
  • Constructor Details

    • DatatypeProperties

      public DatatypeProperties()
  • Method Details

    • getId

      public Long getId()
      The id of the type.
      Specified by:
      getId in interface com.appiancorp.type.DataTypeProperties
      Returns:
      the id
    • setId

      public void setId(Long id_)
    • getBoundType

      public Long getBoundType()
      If this type represents an external key, then the boundType is the type to which this external key is bound. All data being stored externally will be cast to this type before being passed to the external data handler. As an example, if a Person has a SocialSecurity external key that extends AppianType.STRING, then the boundType would be Person. Storing an Employee onto the SocialSecurity external key would first cast the Employee to Person, then send the Person to the external key handler.
      Returns:
    • setBoundType

      public void setBoundType(Long boundType)
    • isExternal

      public boolean isExternal()
      Is this a key type bound to another type?
      Returns:
    • getExternalTypeId

      public String getExternalTypeId()
      Returns:
      the externalTypeId
    • setExternalTypeId

      public void setExternalTypeId(String externalTypeId_)
      Parameters:
      externalTypeId_ - the externalTypeId to set
    • getDynamic

      @Deprecated public Integer getDynamic()
      Deprecated.
      For Appian internal use only.
      Gets the value of the dynamic flag. This flag determines whether this type has children at depth that hold Variants, Usernames, or both. The Design Engine does the calculation which determines the value of this field. That value is then propagated to the Execution and Content Engines.
      Returns:
      the dynamic flag, a bit vector holding DYNAMIC_TYPE_HAS_VARIANT, DYNAMIC_TYPE_HAS_USERNAME or both, or 0 (not dynamic) within it
    • setDynamic

      @Deprecated public void setDynamic(Integer dynamic)
      Deprecated.
      For Appian internal use only.
      Sets the value of the dynamic flag. This flag is ignored during Datatype creation.
      Parameters:
      dynamic - the dynamic flag to set.
    • getName

      public String getName()
      The name of the type. This may be any text string, but null names and those names beginning with $ are considered private.
      Specified by:
      getName in interface com.appiancorp.type.DataTypeProperties
      Returns:
      the name
    • setName

      public void setName(String name)
    • getNamespace

      public String getNamespace()
      The namespace that the type is a part of. This may be any text string.
      Specified by:
      getNamespace in interface com.appiancorp.type.DataTypeProperties
      Returns:
      the namespace
    • getNameWithinNamespace

      public String getNameWithinNamespace()
      The name of the type within its namespace. This may be any text string.
      Specified by:
      getNameWithinNamespace in interface com.appiancorp.type.DataTypeProperties
      Returns:
      the name
    • getQualifiedName

      public QName getQualifiedName()
      The qualified name of the type. Namespace and local part are persisted, but prefix is not.
      Specified by:
      getQualifiedName in interface com.appiancorp.type.DataTypeProperties
      Returns:
      the qualified name
    • setQualifiedName

      public void setQualifiedName(QName qualifiedName)
    • getDescription

      public String getDescription()
      The description of the type. This may be any text string.
      Specified by:
      getDescription in interface com.appiancorp.type.DataTypeProperties
      Returns:
      the description
    • setDescription

      public void setDescription(String description)
    • getBase

      public Long getBase()
      The base of a Type is what it's based on. Example: AppianType.TYPE_LIST_OF_GROUP is based on AppianType.TYPE_LIST_OF_INTEGER_KEY is based on AppianType.TYPE_LIST For a primitive (such as INTEGER), it's based on itself. For a list type, it's based on LIST. For a record type, it's based on RECORD, etc.
    • setBase

      public void setBase(Long base)
    • getFoundation

      public Long getFoundation()
      The foundation is the ultimate base of a Type. Example: AppianType.TYPE_LIST_OF_GROUP is based on AppianType.TYPE_LIST_OF_INTEGER_KEY is based on AppianType.TYPE_LIST So, the foundation of AppianType.TYPE_LIST_OF_GROUP is AppianType.TYPE_LIST. For a primitive (such as INTEGER), it's based on itself. For a list type, it's based on LIST. For a record type, it's based on RECORD, etc. Read Only Property. (The setter is only used internally.)
      Specified by:
      getFoundation in interface com.appiancorp.type.DataTypeProperties
    • setFoundation

      public void setFoundation(Long foundation)
    • getCreationTime

      public Timestamp getCreationTime()
      The creation time is the time at which a type was created.
      Returns:
      the time at which this type was created
    • setCreationTime

      public void setCreationTime(Timestamp creationTime)
    • getCreator

      public String getCreator()
      The user who created the datatype
      Returns:
      the creator
    • setCreator

      public void setCreator(String creator)
    • getTypeof

      public Long getTypeof()
      The typeof the data inside the type. For a primitive (such as INTEGER), it's based on itself. For a list type, its typeof is the contained type; for example, the typeof LIST_OF_INTEGER is INTEGER.
      Specified by:
      getTypeof in interface com.appiancorp.type.DataTypeProperties
      Returns:
      the type
    • setTypeof

      public void setTypeof(Long typeof)
    • isListType

      public boolean isListType()
      Returns whether this type is a list type. It will return true for any type that is based on the type LIST. Will also return true for the LIST datatype itself. If this type is a list type, the type of the contained items can be obtained using getTypeof().
      Specified by:
      isListType in interface com.appiancorp.type.DataTypeProperties
      Returns:
      a boolean specifying whether this datatype is a list type
    • isRecordType

      public boolean isRecordType()
      Returns whether this type is a record type. It will return true for any type that is based on the type RECORD. Will also return true for the RECORD datatype itself.
      Specified by:
      isRecordType in interface com.appiancorp.type.DataTypeProperties
      Returns:
      a boolean specifying whether this datatype is a record type
    • isRecordProxyType

      public boolean isRecordProxyType()
      Returns whether this type is a record proxy type. It will return true for any type that is based on the type RECORD MAP.
      Returns:
      a boolean specifying whether this datatype is a record proxy type
    • isRecordTypeOrProxyType

      public boolean isRecordTypeOrProxyType()
      Returns whether this type is a record proxy type or a record type. It will return true for any type that is based on either the type RECORD or RECORD MAP.
      Returns:
      a boolean specifying whether this datatype is a record type or a record proxy type
    • isUnionType

      public boolean isUnionType()
      Returns whether this type is a union type. It will return true for any type that is based on the type UNION. Will also return true for the UNION datatype itself.
      Returns:
      a boolean specifying whether this datatype is a union type
    • isFoundationType

      public boolean isFoundationType()
      Returns whether this type is a foundation type. For foundation types (such as INTEGER), returns true; otherwise returns false. If this type is NOT a foundation type, its direct base type can be obtained using getBase(), while its ultimate base type can be obtained using getFoundation().
      Returns:
      a boolean specifying whether this datatype is a foundation type
    • isSystemType

      public boolean isSystemType()
      Returns whether this type is a system type.
      Returns:
      a boolean specifying whether this datatype contains the DataTypeProperties.FLAG_SYSTEM flag
    • getList

      public Long getList()
      Returns the list of this type. Returns null if it does not exist. e.g. this would return LIST_OF_INTEGER for the INTEGER datatype
      Specified by:
      getList in interface com.appiancorp.type.DataTypeProperties
      Returns:
      the id of the list type
    • setList

      public void setList(Long list_)
    • getMask

      public String getMask()
      The mask determines the methodology used for converting to String on the backend. A null indicates the default methodology. Other masks supported include: Date/Time masks (Gregorian only): "mmmmm" J,F,M,A,M,J,J,A,S,O,N,D (this is NOT valid for input) "mmmm" January February March April May June July August September October November December "mmm" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nev Dec "mm" 01 .. 12 "m" 1 .. 12 "MMMMM" J,F,M,A,M,J,J,A,S,O,N,D (this is NOT valid for input) "MMMM" January February March April May June July August September October November December "MMM" Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nev Dec "MM" 01 .. 12 "M" 1 .. 12 "yyyy" 1972 "yy" 72 "ddd" 1st 2nd 3rd 4th 5th 6th 7th 8th 9th 10th 11th 12th 13th 14th 15th 16th 17th 18th 19th 20th 21st 22nd 23rd 24th 25th 26th 27th 28th 29th 30th 31st "dd" 01 .. 31 "d" 1 .. 31 "hh" 01..12 (if AM/PM) or 00..23 (if no AM/PM) "h" 1..12 (if AM/PM) or 0..23 (if no AM/PM) "HH" 01..12 (if AM/PM) or 00..23 (if no AM/PM) "H" 1..12 (if AM/PM) or 0..23 (if no AM/PM) "kk" 01..12 (if AM/PM) or 01..24 (if no AM/PM) "k" 1..12 (if AM/PM) or 1..24 (if no AM/PM) "mm" minute 00..59 (IF hour already processed, i.e., h to left anywhere in format) "ss" second 00..59 "AM/PM" AM/PM in uppercase "am/pm" am/pm in lowercase "A/P" A/P in uppercase "a/p" a/p in lowercase "a" AM or PM in uppercase "aa" AM or PM in uppercase "[h]" the number of hours in the era "@" e.g., 26310.5426 (the serial date value) "dddd" Day of week name, Saturday, Sunday, Monday, etc. "EEEE" Day of week name, Saturday, Sunday, Monday, etc. "EEE" Day of week name, Sat, Sun, Mon, etc. "z" Timezone Name (EST) "zzz" Timezone Name (EST) "zzzz" Timezone Name (Eastern Standard Time) Example: "mmm dd, yyyy" Numeric masks: positive;negative;zero Mask separation for positive, negative and zero numbers. "%" Multply the number by 100.0 "?" same as # "_" space "." decimal alignment "," grouping character "0" left of decimal, 0-filled or digit, right of decimal 0-filled or digit "#" left of decimal, space-filled or digit, right of decimal 0-filled or digit "-" left of decimal only, space or - depending on sign of number "+" left of decimal only, + or - depending on sign of number "\" include next character directly "*" left of decimal only, *-filled or digit rather than 0-filled implicit places "$" left of decimal only, floating currency character Example: "$$$$,$$$,$$$.00" Boolean masks: true;false Specify true and false text. Example: "yes;no" Binary masks: x Hex Digits of Byte o Octal Digits of Byte d Decimal Digits of Byte c Character Representation of Byte Example: "x" might yield "000102030405060708090a0b0c0d0e0f101112" Null masks: text The text representing "null" Example: "nil" Record masks: 'field' The contents of the named field text The text itself [mask] Only present if all fields in mask are present Example: "'last', 'first'[ 'middleInitial'.]" or "'first' ['middleInitial'. ]'last'"
    • setMask

      public void setMask(String mask)
    • getResource

      public TypeResource getResource()
      This is arbitrary resource that may be stored with the Type. Only use this for truly generate information, such as how a form should display the type, etc.
      Returns:
      the resource
    • setResource

      public void setResource(TypeResource resource)
    • getVersionId

      @Deprecated public Long getVersionId()
      Deprecated.
      Do not call this method. The return value of this method cannot be relied on because it can become out of date as further data types are created.
      Version id, -1 is current.
      Returns:
      the version id
    • setVersionId

      @Deprecated public void setVersionId(Long versionId)
      Deprecated.
      Version id, -1 is current. (Read only from K.)
      Parameters:
      versionId - the value to set as the version id
    • getStableVersionNumber

      @Deprecated public Integer getStableVersionNumber()
      Deprecated.
      Do not call this method.
      Returns:
      the stable version number of this type version in this version chain.
    • setStableVersionNumber

      @Deprecated public void setStableVersionNumber(Integer stableVersionNumber)
      Deprecated.
      Do not call this method.
      Parameters:
      stableVersionNumber - The stable version number of this type version.
    • getVersions

      @Deprecated public Long[] getVersions()
      Deprecated.
      Do not call this method. The return value of this method cannot be relied on because it can become out of date as further data types are created.
      All ids of versions in this version chain if more than one version exists. If only one version exists, returns empty array.
      Returns:
      all ids of versions in this version chain if more than one version exists.
    • setVersions

      @Deprecated public void setVersions(Long[] versions)
      Deprecated.
      see #setVersions()
      All ids of versions in this version chain. (Read only from K.)
      Parameters:
      versions - All ids of versions in this version chain
    • getFlags

      public int getFlags()
      Returns the flag that has been set on this datatype. FLAG_HIDDEN indicates that this should be hidden from pickers FLAG_SYSTEM indicates that this is a system datatype (not custom). FLAG_IMPORTING indicates that the type is being imported and that a subsequent call to updateType may update all fields. FLAG_NONE indicates that no flag has been set.
      Specified by:
      getFlags in interface com.appiancorp.type.DataTypeProperties
      Returns:
      one of the FLAG_* constants.
    • setFlags

      public void setFlags(int flags_)
    • hasFlag

      public boolean hasFlag(int flag_)
      Specified by:
      hasFlag in interface com.appiancorp.type.DataTypeProperties
    • addFlag

      public void addFlag(int flag_)
    • removeFlag

      public void removeFlag(int flag_)
    • getLocalName

      public LocaleString getLocalName()
      Returns:
    • setLocalName

      public void setLocalName(LocaleString localName_)
    • getLocalizedName

      public String getLocalizedName(Locale locale_)
      Returns the name of the object. It will be localized if possible, otherwise the default name will be returned
      Parameters:
      locale_ - the locale to use
      Returns:
      the name of the Datatype, localized if possible
    • getLocalDescription

      public LocaleString getLocalDescription()
      Returns:
    • setLocalDescription

      public void setLocalDescription(LocaleString localDescription_)
    • getLocalizedDescription

      public String getLocalizedDescription(Locale locale_)
      Returns the description of the object. It will be localized if possible, otherwise the default description will be returned
      Parameters:
      locale_ - the locale to use
      Returns:
      the description of the Datatype, localized if possible
    • toString

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

      public static Long[] getIds(Datatype[] dts_)
      Get the ids (as a Long array) from an array of Datatype objects.
      Parameters:
      dts_ - an array of datatypes
      Returns:
      an array of the same size as the given array, containing the ids of the given datatypes
    • getType

      protected static Datatype getType(Long type_) throws InvalidTypeException
      Throws:
      InvalidTypeException
    • isHidden

      public boolean isHidden()
      Specified by:
      isHidden in interface com.appiancorp.type.DataTypeProperties
    • equals

      public boolean equals(Object o_)
      Overrides:
      equals in class Object
    • hashCode

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

      public boolean isLatestVersionModeOnForDataStores()
      Gets latestVersionModeOnForDataStores flag, which determines whether references to this DatatypeProperties should be updated to the latest version before use.
      Returns:
      latestVersionModeOnForDataStores flag
    • setLatestVersionModeOnForDataStores

      public void setLatestVersionModeOnForDataStores(boolean latestVersionModeOnForDataStores)
      Sets latestVersionModeOnForDataStores flag, which does not propagate to K.
      Parameters:
      latestVersionModeOnForDataStores - flag to be set.
    • isLatestVersionModeOnForProcessModels

      public boolean isLatestVersionModeOnForProcessModels()
      Gets latestVersionModeOnForProcessModels flag, which determines whether references to this DatatypeProperties should be updated to the latest version before use.
      Returns:
      latestVersionModeOnForProcessModels flag
    • setLatestVersionModeOnForProcessModels

      public void setLatestVersionModeOnForProcessModels(boolean latestVersionModeOnForProcessModels)
      Sets latestVersionModeOnForProcessModels flag, which does not propagate to K.
      Parameters:
      latestVersionModeOnForProcessModels - flag to be set.
    • isLatestVersionModeOnForRules

      public boolean isLatestVersionModeOnForRules()
      Gets latestVersionModeOnForRules flag, which determines whether references to this DatatypeProperties should be updated to the latest version before use.
      Returns:
      latestVersionModeOnForRules flag
    • setLatestVersionModeOnForRules

      public void setLatestVersionModeOnForRules(boolean latestVersionModeOnForRules)
      Sets latestVersionModeOnForRules flag, which does not propagate to K.
      Parameters:
      latestVersionModeOnForRules - flag to be set.
    • putAtCoupledKeys

      @Deprecated public boolean putAtCoupledKeys(com.appiancorp.cache.CoupledElements coupledKeys, com.appiancorp.cache.CoupledElements currentCoupledValues, ConcurrentMap intoCacheMap)
      Deprecated.
      INTERNAL
    • newCoupledKeys

      public com.appiancorp.cache.CoupledElements newCoupledKeys()
      INTERNAL: NOT API
      Specified by:
      newCoupledKeys in interface com.appiancorp.cache.CoupledValue
    • newCoupledValues

      public com.appiancorp.cache.CoupledElements newCoupledValues()
      INTERNAL: NOT API
      Specified by:
      newCoupledValues in interface com.appiancorp.cache.CoupledValue
    • getCoupledValueType

      public int getCoupledValueType()
      INTERNAL: NOT API
      Specified by:
      getCoupledValueType in interface com.appiancorp.cache.CoupledValue
    • isKeyedBy

      public boolean isKeyedBy(com.appiancorp.cache.CoupledKey coupledKey)
      INTERNAL: NOT API
      Specified by:
      isKeyedBy in interface com.appiancorp.cache.CoupledValue
    • isValidToCache

      protected boolean isValidToCache()
      INTERNAL: NOT API
    • addToCache

      public void addToCache(Map cache)
      INTERNAL: NOT API