Package com.appiancorp.suiteapi.type
Class Datatype
java.lang.Object
com.appiancorp.suiteapi.type.DatatypeProperties
com.appiancorp.suiteapi.type.Datatype
- All Implemented Interfaces:
com.appiancorp.cache.CoupledValue
,AppianType
,com.appiancorp.type.DataType
,com.appiancorp.type.DataTypeProperties
,Serializable
@GwtCompatible
public class Datatype
extends DatatypeProperties
implements com.appiancorp.type.DataType, com.appiancorp.cache.CoupledValue
Datatype
The Datatype 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 Summary
Modifier and TypeFieldDescriptionstatic final String
The name of the type property that holds the type keys used to identify the types that are part of a union (ie. for a type that hasAppianType.UNION
as its foundation type).static final String
The name of the type property that holds the type ids of the types that are part of a union (ie. for a type that hasAppianType.UNION
as its foundation type).Fields inherited from class com.appiancorp.suiteapi.type.DatatypeProperties
AUTO_GENERATE_LIST, DYNAMIC_TYPE_HAS_USERNAME, DYNAMIC_TYPE_HAS_VARIANT, SORT_BY_BASE, SORT_BY_CREATION_TIME, SORT_BY_CREATOR, SORT_BY_DESCRIPTION, SORT_BY_FOUNDATION, SORT_BY_ID, SORT_BY_LIST, SORT_BY_NAME, SORT_BY_NAMESPACE, SORT_BY_ORIGIN, SORT_BY_TYPEOF, SORT_BY_VERSION_ID, SORT_BY_VERSIONS, SORT_BY_VISIBILITY, SUGGEST_PROPERTY_DESCRIPTION, SUGGEST_PROPERTY_NAME, SUGGEST_PROPERTY_QUALIFIED_NAME
Fields inherited from interface com.appiancorp.suiteapi.type.AppianType
ADMINISTERED_PROPERTY, ALIAS, APPLICATION, ARRAY, ATTACHMENT, BEAN, BIG_RATIONAL, BINARY, BOOLEAN, CHART_COLOR, COMMUNITY, CONNECTED_SYSTEM, CONTENT_COMMUNITY, CONTENT_CONSTANT, CONTENT_CUSTOM, CONTENT_DOCUMENT, CONTENT_FOLDER, CONTENT_FREEFORM_RULE, CONTENT_ITEM, CONTENT_KNOWLEDGE_CENTER, CONTENT_RULE, CURRENCY, DATA_SOURCE, DATA_STORE, DATA_STORE_ENTITY, DATATYPE, DATE, DECISION, DECISION_TABLE, DECRYPTED_TEXT, DEFERRED, DICTIONARY, DISCUSSION_THREAD, DOCUMENT, DOCUMENT_OR_FOLDER, DOUBLE, EMAIL_ADDRESS, EMAIL_RECIPIENT, EMBEDDED_SAIL_THEME_ID, ENCRYPTED_TEXT, EVENT, EXPRESSION, EXTERNAL_REFERENCE, EXTERNAL_REFERENCE_WITH_INDICES, EXTERNAL_SYSTEM_ID, FIXED, FOLDER, FORUM, GROUP, GROUP_TYPE, ID_REFERENCE, INITIAL_CUSTOM_TYPE, INTEGER, INTEGER_KEY, INTERFACE, INTERVAL_D_S, KNOWLEDGE_CENTER, LINKS_CHANNEL_FOLDER, LIST, LIST_OF_ADMINISTERED_PROPERTY, LIST_OF_APPLICATION, LIST_OF_ATTACHMENT, LIST_OF_BEAN, LIST_OF_BIG_RATIONAL, LIST_OF_BINARY, LIST_OF_BOOLEAN, LIST_OF_CHART_COLOR, LIST_OF_COMMUNITY, LIST_OF_CONNECTED_SYSTEM, LIST_OF_CONTENT_COMMUNITY, LIST_OF_CONTENT_CONSTANT, LIST_OF_CONTENT_CUSTOM, LIST_OF_CONTENT_DOCUMENT, LIST_OF_CONTENT_FOLDER, LIST_OF_CONTENT_FREEFORM_RULE, LIST_OF_CONTENT_ITEM, LIST_OF_CONTENT_KNOWLEDGE_CENTER, LIST_OF_CONTENT_RULE, LIST_OF_CURRENCY, LIST_OF_DATA_SOURCE, LIST_OF_DATA_STORE, LIST_OF_DATA_STORE_ENTITY, LIST_OF_DATATYPE, LIST_OF_DATE, LIST_OF_DECISION, LIST_OF_DECISION_TABLE, LIST_OF_DECRYPTED_TEXT, LIST_OF_DEFERRED, LIST_OF_DICTIONARY, LIST_OF_DISCUSSION_THREAD, LIST_OF_DOCUMENT, LIST_OF_DOCUMENT_OR_FOLDER, LIST_OF_DOUBLE, LIST_OF_EMAIL_ADDRESS, LIST_OF_EMAIL_RECIPIENT, LIST_OF_EMBEDDED_SAIL_THEME_ID, LIST_OF_ENCRYPTED_TEXT, LIST_OF_EVENT, LIST_OF_EXPRESSION, LIST_OF_EXTERNAL_REFERENCE, LIST_OF_EXTERNAL_REFERENCE_WITH_INDICES, LIST_OF_EXTERNAL_SYSTEM_ID, LIST_OF_FIXED, LIST_OF_FOLDER, LIST_OF_FORUM, LIST_OF_GROUP, LIST_OF_GROUP_TYPE, LIST_OF_ID_REFERENCE, LIST_OF_INTEGER, LIST_OF_INTEGER_KEY, LIST_OF_INTERFACE, LIST_OF_INTERVAL_D_S, LIST_OF_KNOWLEDGE_CENTER, LIST_OF_LINKS_CHANNEL_FOLDER, LIST_OF_MAP, LIST_OF_MESSAGE, LIST_OF_NOTE, LIST_OF_NULL, LIST_OF_OUTBOUND_INTEGRATION, LIST_OF_PAGE, LIST_OF_PASSWORD, LIST_OF_PORTLET, LIST_OF_PROCESS, LIST_OF_PROCESS_ERROR, LIST_OF_PROCESS_MODEL, LIST_OF_PROCESS_MODEL_FOLDER, LIST_OF_QUERY_RULE, LIST_OF_QUICK_APP, LIST_OF_RANGE, LIST_OF_RECORD, LIST_OF_RECORD_REFERENCE, LIST_OF_RECORD_TYPE_ID, LIST_OF_RICH_TEXT, LIST_OF_RULE_FOLDER, LIST_OF_SAFE_URI, LIST_OF_SITE, LIST_OF_STRING, LIST_OF_STRING_KEY, LIST_OF_TASK, LIST_OF_TASK_REPORT, LIST_OF_TEMPO_FEED, LIST_OF_TEMPO_REPORT, LIST_OF_TIME, LIST_OF_TIMESTAMP, LIST_OF_TYPE, LIST_OF_UNIFORM_FOLDER, LIST_OF_UNION, LIST_OF_USER_OR_GROUP, LIST_OF_USERNAME, LIST_OF_VARIANT, LIST_OF_WEB_API, MAP, MESSAGE, NOTE, NULL, OUTBOUND_INTEGRATION, PAGE, PASSWORD, PORTLET, PROCESS, PROCESS_ERROR, PROCESS_MODEL, PROCESS_MODEL_FOLDER, QUERY_RULE, QUICK_APP, RANGE, RECORD, RECORD_REFERENCE, RECORD_TYPE_ID, RICH_TEXT, RULE_FOLDER, SAFE_URI, SITE, STRING, STRING_KEY, TASK, TASK_REPORT, TEMPO_FEED, TEMPO_REPORT, TIME, TIMESTAMP, TYPE, UI_CONTAINER, UNIFORM_FOLDER, UNION, USER_OR_GROUP, USERNAME, VARIANT, WEB_API
Fields inherited from interface com.appiancorp.type.DataType
LOCAL_PART, NAMESPACE, QNAME
Fields inherited from interface com.appiancorp.type.DataTypeProperties
CURRENT_VERSION, FLAG_DEACTIVATE_ON_IMPORT, FLAG_DEACTIVATED, FLAG_HIDDEN, FLAG_IMPORTING, FLAG_LOCKED, FLAG_SECURED, FLAG_STRUCTURALLY_IDENTICAL, FLAG_SYSTEM, FLAG_TEMPORARY, FLAG_TYPE_DESIGNER, FLAG_WEB_SERVICES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addToCache
(Map cache) INTERNAL: NOT APIstatic Datatype
findByQName
(Datatype[] dts, QName targetQName) int
INTERNAL: NOT APIThis is the default value for the type.static Long
getFoundation
(Long instanceType_) Gets the type id of the foundation of a given type.Instance properties apply to an individual instance, and as such have their values stored with each individual instance, not with the type itself.getInstanceProperty
(String name_) Searches the instance properties for one with the specified name and returns it.int
getInstancePropertyIndex
(String name_) Searches the instance properties for one with the specified name and returns its index.Returns the expression that maps instances of this type to instances of thecom.appiancorp.record.data.ListViewItem
type.getNull()
This is the null value for the type.This is context where the datatype is stored.Type properties apply to the type as a whole, not individual instances of the type.getTypeProperty
(String name_) Searches the type properties for one with the specified name and returns it.int
getTypePropertyIndex
(String name_) Searches the type properties for one with the specified name and returns its index.static Long
getValidFoundation
(Long instanceType_) Gets the type id of the foundation of a given type.static boolean
hasFoundation
(Long instanceType_, Long foundationType_) Checks whether a type has a particular type as its foundation type.boolean
Returns whether the type was auto-generated.void
setDefault
(TypedValue defaultValue) void
setInstanceProperties
(NamedTypedValue[] instanceProperties) void
setListViewMapping
(String listViewMapping) Sets an expression that maps instances of this type to instances of thecom.appiancorp.record.data.ListViewItem
type.void
setNull
(TypedValue nullValue) void
setParent
(TypedValue parent_) void
setTypeProperties
(NamedTypedValue[] typeProperties) Methods inherited from class com.appiancorp.suiteapi.type.DatatypeProperties
addFlag, equals, getBase, getBoundType, getCreationTime, getCreator, getDescription, getDynamic, getExternalTypeId, getFlags, getFoundation, getId, getIds, getList, getLocalDescription, getLocalizedDescription, getLocalizedName, getLocalName, getMask, getName, getNamespace, getNameWithinNamespace, getQualifiedName, getResource, getStableVersionNumber, getType, getTypeof, getVersionId, getVersions, hasFlag, hashCode, isExternal, isFoundationType, isHidden, isKeyedBy, isLatestVersionModeOnForDataStores, isLatestVersionModeOnForProcessModels, isLatestVersionModeOnForRules, isListType, isRecordProxyType, isRecordType, isRecordTypeOrProxyType, isSystemType, isUnionType, isValidToCache, newCoupledKeys, newCoupledValues, putAtCoupledKeys, removeFlag, setBase, setBoundType, setCreationTime, setCreator, setDescription, setDynamic, setExternalTypeId, setFlags, setFoundation, setId, setLatestVersionModeOnForDataStores, setLatestVersionModeOnForProcessModels, setLatestVersionModeOnForRules, setList, setLocalDescription, setLocalName, setMask, setName, setQualifiedName, setResource, setStableVersionNumber, setTypeof, setVersionId, setVersions, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.appiancorp.cache.CoupledValue
isKeyedBy, newCoupledKeys, newCoupledValues
Methods inherited from interface com.appiancorp.type.DataTypeProperties
getDescription, getFlags, getFoundation, getId, getList, getName, getNamespace, getNameWithinNamespace, getQualifiedName, getTypeof, hasFlag, isHidden, isListType, isRecordType
-
Field Details
-
TYPE_PROPERTY_UNION_KEYS
The name of the type property that holds the type keys used to identify the types that are part of a union (ie. for a type that hasAppianType.UNION
as its foundation type).- See Also:
-
TYPE_PROPERTY_UNION_TYPES
The name of the type property that holds the type ids of the types that are part of a union (ie. for a type that hasAppianType.UNION
as its foundation type).- See Also:
-
-
Constructor Details
-
Datatype
public Datatype()
-
-
Method Details
-
getInstanceProperties
Instance properties apply to an individual instance, and as such have their values stored with each individual instance, not with the type itself. This includes properties such as a variant's type.- Specified by:
getInstanceProperties
in interfacecom.appiancorp.type.DataType
- Returns:
- the instance properties
-
setInstanceProperties
-
getInstanceProperty
Searches the instance properties for one with the specified name and returns it.- Parameters:
name_
- The name of the instance property to find- Returns:
- the instance property if found, otherwise null
-
getInstancePropertyIndex
Searches the instance properties for one with the specified name and returns its index.- Parameters:
name_
- The name of the instance property to find.- Returns:
- The instance property index if found; otherwise -1.
-
getTypeProperties
Type properties apply to the type as a whole, not individual instances of the type. The type properties have the value at the type level. This includes properties such as the named fields within a record.- Returns:
- the type properties
-
setTypeProperties
-
getTypeProperty
Searches the type properties for one with the specified name and returns it.- Parameters:
name_
- The name of the type property to find- Returns:
- the type property
-
getTypePropertyIndex
Searches the type properties for one with the specified name and returns its index.- Parameters:
name_
- The name of the type property to find.- Returns:
- The type property index if found; otherwise -1.
-
getParent
This is context where the datatype is stored. For example, a datatype specific to a process model could have that process model as a parent. Global datatypes have null as the parent. Currently all datatypes are global.- Returns:
- the parent of this datatype
-
setParent
-
getDefault
This is the default value for the type.- Returns:
- the default value
-
setDefault
-
getNull
This is the null value for the type.- Returns:
- null value
-
setNull
-
getFoundation
Gets the type id of the foundation of a given type. If the specified type does not exist, instanceType is returned.- Parameters:
instanceType_
- the type- Returns:
- the type's foundation type id
-
getValidFoundation
Gets the type id of the foundation of a given type. If the specified type does not exist, InvalidTypeException thrown if not.- Parameters:
instanceType_
- the type- Returns:
- the type's foundation type id
- Throws:
InvalidTypeException
-
hasFoundation
Checks whether a type has a particular type as its foundation type.- Parameters:
instanceType_
- the type whose foundation will be checkedfoundationType_
- the foundation type that we're checking against- Returns:
- whether the given type has the given foundation type as its foundation
-
isAutoGeneratedType
public boolean isAutoGeneratedType()Returns whether the type was auto-generated. When importing types from XSD or creating web service types, extra types that are not defined in the XSD or WSDL are auto-generated, such as list types and others.- Returns:
- true if the type was auto-generated, false otherwise
-
findByQName
-
getListViewMapping
Returns the expression that maps instances of this type to instances of thecom.appiancorp.record.data.ListViewItem
type. -
setListViewMapping
Sets an expression that maps instances of this type to instances of thecom.appiancorp.record.data.ListViewItem
type. -
getCoupledValueType
public int getCoupledValueType()INTERNAL: NOT API- Specified by:
getCoupledValueType
in interfacecom.appiancorp.cache.CoupledValue
- Overrides:
getCoupledValueType
in classDatatypeProperties
-
addToCache
INTERNAL: NOT API- Overrides:
addToCache
in classDatatypeProperties
-