AfDataContainerDescriptors Class [AX 2012]
The AfDataContainerDescriptors class provides access to data container metadata.
Syntax
class AfDataContainerDescriptors
Run On
Called
Methods
Method | Description | |
---|---|---|
![]() |
cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) |
![]() |
equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) |
![]() |
getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) |
![]() |
handle | Retrieves the handle of the class of the object. (Inherited from Object.) |
![]() |
new | Initializes a new instance of the AfDataContainerDescriptors class. |
![]() |
notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) |
![]() |
notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) |
![]() |
objectOnServer | Determines whether the object is on a server. (Inherited from Object.) |
![]() |
owner | Returns the instance that owns the object. (Inherited from Object.) |
![]() |
setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) |
![]() |
toString | Returns a string that represents the current object. (Inherited from Object.) |
![]() |
usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) |
![]() |
wait | Pauses a process. (Inherited from Object.) |
![]() |
xml | Returns an XML string that represents the current object. (Inherited from Object.) |
![]() ![]() |
::cacheDataContainerDescriptor | Caches the specified data container descriptor. |
![]() ![]() |
::createAxdDataContainerMetadata | |
![]() ![]() |
::createDataContainerDescriptor | Creates a data container descriptor for the specified type. |
![]() ![]() |
::createTableNKDataContainerMetadata | |
![]() ![]() |
::flushCache | Flushes the data container metadata cache. |
![]() ![]() |
::getActivityAssignmentChildrenMetadata | Retrieves an X++ container that contains metadata for the ProjectResourceChildren data container type. |
![]() ![]() |
::getActivityAssignmentDataMetadata | Retrieves an X++ container that contains metadata for the ProjectResourceData data container type. |
![]() ![]() |
::getActivityAssignmentMetadata | Retrieves an X++ container that contains metadata for the Employee data container type. |
![]() ![]() |
::getAifBudgetAccountMetadata | Retrieves an X++ container that contains metadata for the AifBudgetAccount data container type. |
![]() ![]() |
::getAifBudgetPlanningAccountMetadata | Returns an X++ container that contains metadata for the AifBudgetPlanningAccount data container type. |
![]() ![]() |
::getAifDefaultAccountMetadata | Retrieves an X++ container that contains metadata for the DataItemMetadata data container type. |
![]() ![]() |
::getAifDimensionAttributeSetMetadata | Retrieves an X++ container that contains metadata for the DataItemMetadata data container type. |
![]() ![]() |
::getAifDimensionAttributeValueMetadata | Retrieves an X++ container that contains metadata for the DataItemMetadata data container type. |
![]() ![]() |
::getAifDimensionAttributeValueSetMetadata | Retrieves an X++ container that contains metadata for the DataItemMetadata data container type. |
![]() ![]() |
::getAifLedgerAccountMetadata | Retrieves an X++ container that contains metadata for the AifLedgerAccount data container type. |
![]() ![]() |
::getAifMultiTypeAccountMetadata | Retrieves an X++ container that contains metadata for the AifMultiTypeAccount data container type. |
![]() ![]() |
::getAifMultiTypeDefaultAccountMetadata | Retrieves an X++ container that contains metadata for the AifMultiTypeDefaultAccount data container type. |
![]() ![]() |
::getCachedDataContainerDescriptor | Retrieves the cached data container descriptor for the specified type. |
![]() ![]() |
::getDataContainerDescriptor | Retrieves the data container descriptor for the specified type. |
![]() ![]() |
::getDataContainerMetadataMetadata | Retrieves an X++ container that contains metadata for the DataContainerMetadata data container type. |
![]() ![]() |
::getDataContainerTypeSet | Retrieves an X++ Set object that contains the known data container types. |
![]() ![]() |
::getDataItemMetadataMetadata | Retrieves an X++ container that contains metadata for the DataItemMetadata data container type. |
![]() ![]() |
::getDataItemTypeMetadataMetadata | Retrieves an X++ container that contains metadata for the DataItemTypeMetadata data container type. |
![]() ![]() |
::getEntityTransMetadata | Retrieves an X++ container that contains metadata for the EntityTrans data container type. |
![]() ![]() |
::getEnumElementMetadataMetadata | Retrieves an X++ container that contains metadata for the EnumElementMetadata data container type. |
![]() ![]() |
::getEnumMetadataMetadata | Retrieves an X++ container that contains metadata for the EnumMetadata data container type. |
![]() ![]() |
::getFieldMetadata | Retrieves an X++ container that contains metadata for the Field data container type. |
![]() ![]() |
::getGenericMetadata | Retrieves an X++ container that contains metadata for the Generic data container type. |
![]() ![]() |
::getHierarchyChildrenMetadata | Retrieves an X++ container that contains metadata for the HierarchyChildren data container type. |
![]() ![]() |
::getHierarchyDataMetadata | Retrieves an X++ container that contains metadata for the HierarchyData data container type. |
![]() ![]() |
::getHierarchyMetadata | Retrieves an X++ container that contains metadata for the Hierarchy data container type. |
![]() ![]() |
::getHierarchyNodeChildrenMetadata | Retrieves an X++ container that contains metadata for the HierarchyNodeChildren data container type. |
![]() ![]() |
::getHierarchyNodeDataMetadata | That contains an X++ container that contains metadata for the HierarchyNodeData data container type. |
![]() ![]() |
::getHierarchyNodeMetadata | Retrieves an X++ container that contains metadata for the HierarchyNode data container type. |
![]() ![]() |
::getProjectHeaderChildrenMetadata | Retrieves an X++ container that contains metadata for the ProjectHeaderChildren data container type. |
![]() ![]() |
::getProjectHeaderDataMetadata | Retrieves an X++ container that contains metadata for the ProjectHeaderData data container type. |
![]() ![]() |
::getProjectHeaderMetadata | Retrieves an X++ container that contains metadata for the ProjectHeader data container type. |
![]() ![]() |
::getProjectMetadata | Retrieves an X++ container that contains metadata for the Project data container type. |
![]() ![]() |
::getProjectResourceChildrenMetadata | Retrieves an X++ container that contains metadata for the ProjectResourceChildren data container type. |
![]() ![]() |
::getProjectResourceDataMetadata | Retrieves an X++ container that contains metadata for the ProjectResourceData data container type. |
![]() ![]() |
::getProjectResourceMetadata | Retrieves an X++ container that contains metadata for the ProjectResource data container type. |
![]() ![]() |
::getResourceHeaderChildrenMetadata | Retrieves an X++ container that contains metadata for the EmployeeHeaderChildren data container type. |
![]() ![]() |
::getResourceHeaderDataMetadata | Retrieves an X++ container that contains metadata for the EmployeeHeaderData data container type. |
![]() ![]() |
::getResourceHeaderMetadata | Retrieves an X++ container that contains metadata for the EmployeeHeader data container type. |
![]() ![]() |
::getResourceMetadata | Retrieves an X++ container that contains metadata for the Employee data container type. |
Top
Remarks
All the methods of this class are static and the class cannot be initialized.
Metadata storage: Data container metadata is encoded in private static methods of this class ( AfDataContainerDescriptors ) that are named 'get<Data container type>Metadata()' (e.g. generic data container metadata is encoded in the 'getGenericMetadata’ method). These methods return X++ containers that contain the metadata.
The first two elements in the container are always the metadata source and the data container type: * DataContainerMetadataSource (first element): it is of the DataContainerMetadataSource type and represents the source of the metadata for this data container type. At present, the following sources are supported: * Code: the container has the full metadata. This is used for the ad hoc data containers that do not correspond to any existing object.
* Axd: the metadata is derived from an Axd class. The container has the class ID and the corresponding query data source name.
* DataContainerType (second element): it is of the String type and represents the data container type (e.g. "Generic").
This corresponds to Type property of AfDataContainerDescriptor .
Use data container type constants defined by the DataContainerTypes macro.
The rest of the content depends on the metadata source.
------------------------------------------------------------------------------------- For data containers with metadata derived from an Axd class, the container has the following data: * AxdClassId (third element): the class id of the Axd class to derive the metadata from.
* DataSourceName (forth element): the name of the query data source to which this data container corresponds. For the top level data container that represents the whole document this element is omitted.
This kind of data container does not allow for unknown data items, that is AllowUnknownDataItems property of AfDataContainerDescriptor is always false.
------------------------------------------------------------------------------------- Metadata for the ad hoc data containers that do not correspond to any existing object is stored in the following format: * AllowUnknownDataItems (third element): it is of type boolean and represents the flag indicating whether the data container can contain data items other than the ones defined in metadata.
This corresponds to AllowUnknownDataItems property of AfDataContainerDescriptor .
* DataItems (forth element): it is of type container and represents a list of data items. It is optional for the data containers that do not have any predefined data items such as generic data container.
Each element in this container is itself a container and represents metadata of one data item: * Name (first element): it is of type string and represents name of the data item.
This corresponds to Name property of AfDataItemDescriptor .
Use corresponding constants defined by the corresponding macro (e.g. DataItemMetadataNames).
* Type (second element): it is of type container and represents type of the data item.
This corresponds to TypeDescriptor property of AfDataItemDescriptor .
Each type descriptor is itself a container and represents metadata of a data item type: * Type (first element): it is of type DataItemType (enum) and represents type of the data item.
This corresponds to Type property of AfDataItemTypeDescriptor .
* Other elements are type specific: * Real: * NoOfDecimals (first element): it is of type int and represents the number of decimal positions.
This element is optional. If ommited, the default number of decimal positions is used.
* Enum: * EnumId (first element): it is of type int and represents enum id.
This corresponds to EnumId property of AfDataItemTypeDescriptor .
Use values returned by enumnum() function.
* DataContainer: * DataContainerTypes (first element): it is of type container and represents a list of data container types. Each element of the container is of type string and represents one data container type. The whole list corresponds to DataContainerType property of AfDataItemTypeDescriptor . The first element in the container is considered to be the default data container type and corresponds to DataContainerType property of AfDataItemTypeDescriptor . The list of data container types determines validity of a data container value - only data container of these types are considered to be valid values of this type.
The list can be empty signifying that data container of any type is a valid value of this type.
Use data container type constants defined by DataContainerTypes macro.
* DataContainerList: * DataContainerType (first element): it is of type string and represents the data container type.
This corresponds to DataContainerType property of AfDataItemTypeDescriptor .
Use data container type constants defined by DataContainerTypes macro.
* Array: two elements representing array elemenet type and array length: * ElementType (first element): it is of type container and represents the array element type.
The format of this container is the same the data item type itself.
* Length (second element): it is of type integer and represents the length of the array.
This element is optional. If ommited, any array with the specified element type considered to be valid value of this array type.
* All other types: * no type specific data Use container literals to encode the metadata. Here are some examples of such literals: container metadata = [ /* Source (1) */ DataContainerMetadataSource::Code, /* Type (2) */ "Order", /* AllowUnknownDataItems (3) */ false, /* DataItemDescriptors (4) */ [ // Name (1) Type (2.1) Type-specific info (2.2) [ "Id", [DataItemType::String]], [ "ShippingAddress", [DataItemType::DataContainer, ["Address"]]], [ "LineItems", [DataItemType::DataContainerList, "LineItem"]], [ "AddressType", [DataItemType::Enum, enumnum(AddressType)]] ] ]; container metadata = [ /* Source (1) */ DataContainerMetadataSource::Code, /* Type (1) */ "TestDataContainer", /* AllowUnknownDataItems (2) */ true, /* DataItemDescriptors (3) */ [ // Name (1) Type (2.1) Type-specific info (2.2) ["String1", [DataItemType::String]], ["DataContainer1", [DataItemType::DataContainer]], ["DataContainer2", [DataItemType::DataContainer, [#DataItemTypeMetadata]]], ["DataContainer3", [DataItemType::DataContainer, [#DataItemMetadata, #DataItemTypeMetadata]]], ["DataContainer4", [DataItemType::DataContainer, [#DataContainerMetadata, #DataItemMetadata, #DataItemTypeMetadata]]], ["DataContainerList", [DataItemType::DataContainerList, #DataContainerMetadata]], ["Array1", [DataItemType::Array, [DataItemType::String]]], ["Array2", [DataItemType::Array, [DataItemType::Integer], 10]], ["Array3", [DataItemType::Array, [DataItemType::Enum, enumnum(DataItemType)]]], ["Array4", [DataItemType::Array, [DataItemType::Enum, enumnum(DataItemType)], 13]] ] ];.
Inheritance Hierarchy
Object Class
AfDataContainerDescriptors Class