Muokkaa

Jaa


Entity Collection

An entity collection extends Collection and adds additional behaviors specific to entity collections.

public class CdmEntityCollection extends CdmCollection<CdmEntityDeclarationDefinition>

Constructors

Name Description
CdmEntityCollection(CdmCorpusContext, CdmObject)
ctx: The corpus context.
owner: The object that contains this collection.
Initializes a new instance of the CdmEntityCollection class.

Methods

Name Description Return Type
Add(CdmEntityDefinition, bool)
entity: The entity definition to use to create the entity declaration.
simpleRef [optional]: This parameter is unused. It's kept just for consistency with other Common Data Model collections.

append(...) in Python, push(...) in TypeScript.
Creates an entity declaration based on an entity definition and adds it to the collection. Returns the entity declaration that was added to the collection. CdmEntityDeclarationDefinition
Add(string, string, bool)
name: The name of the entity to add to the collection.
entityPath: The entity's path.
simpleRef [optional]: This parameter is unused. It's kept just for consistency with other Common Data Model collections.

append(...) in Python, push(...) in TypeScript.
Adds a new entity to the collection with the specified name and entity path. Returns the entity declaration that was added to the collection. CdmEntityDeclarationDefinition
AddRange(IEnumerable<CdmEntityDefinition>)
entityList: The list of entities to add.

addAll(...) in Java, extend(...) in Python, concat(...) in TypeScript.
Adds the elements of the specified list of entities to the collection. void
Remove(CdmEntityDefinition)
entityDefToRemove: The entity whose reference we want to remove from the collection.
Removes the specified entity's entity reference from the collection. Returns true if the operation is successful, false otherwise. bool