Table of Contents

TXDataEntityType Class

Represents an entity type, the definition of an Aurelius entity class in the XData model.

Remarks

An entity type lists the simple and navigation properties of the entity, and which of them make up its key. It supports inheritance: an entity type can inherit from another entity type. By default, the name of the entity type is the name of the class without the T prefix, so the class TCustomer becomes the entity type Customer.

Syntax

Unit: XData.Model.Classes

TXDataEntityType = class(TXDataStructuredType);

Constructors

Name Description
Create Creates an entity type with no properties.

Methods

Name Description
FindNavigation​Property Looks for a navigation property by its name, including the inherited properties.
FindProperty Looks for a simple property by its name, including the inherited properties.
FindScalarProperty Looks for a simple property by its name, including the inherited properties.
FindStructured​Property Looks for a navigation property by its name, including the inherited properties.
GetScalarProperty Returns a simple property declared in the type, by its index.
GetStructured​Property Returns a navigation property declared in the type, by its index.
IsInheritedFrom Checks whether the type is, or inherits from, another entity type.
KeyScalarProperties Returns the simple properties that make up the key of the entity.
QualifiedName Returns the name of the entity type, qualified by the schema it belongs to.
RootType Returns the topmost entity type in the inheritance chain of the type.
ScalarPropertyCount Returns the number of simple properties declared in the type.
StructuredProperty​Count Returns the number of navigation properties declared in the type.

Properties

Name Description
BaseType Gets or sets the entity type this type inherits from.
BaseTypeRef Gets or sets the name of the base type, used when the model is written to or read from JSON.
Collection Gets the collection type whose items are of this type.
Key Gets the properties that make up the key (identifier) of the entity.
KeyRef Gets or sets the names of the key properties, used when the model is written to or read from JSON.
NavigationProperties Gets the navigation properties declared in the type.
Properties Gets the simple properties declared in the type.