Skip to main content

Class: KeyModel

Models a primary key.

Extends

Constructors

new KeyModel()

new KeyModel(names: List<string>): KeyModel

Parameters

ParameterType
namesList<string>

Returns

KeyModel

Overrides

AbstractModel.constructor

Defined in

packages/verse-core/src/model/model.ts:767

Accessors

composite

get composite(): boolean

Returns

boolean

Defined in

packages/verse-core/src/model/model.ts:787


names

get names(): List<string>

Returns

List<string>

Defined in

packages/verse-core/src/model/model.ts:775


parent

get parent(): EntityModel<any, any>

Returns the parent model element.

Returns

EntityModel<any, any>

The parent model element.

Overrides

AbstractModel.parent

Defined in

packages/verse-core/src/model/model.ts:812


properties

get properties(): List<ScalarPropertyModel>

Returns

List<ScalarPropertyModel>

Defined in

packages/verse-core/src/model/model.ts:779

Methods

accept()

accept<T, S>(visitor: ModelVisitor<T, S>, state?: S): T

Accepts a visitor and returns the result of visiting this model element.

Type Parameters

Type ParameterDefault type
T-
Sunknown

Parameters

ParameterTypeDescription
visitorModelVisitor<T, S>The visitor to accept.
state?SAn optional state to pass to the visitor.

Returns

T

The result of visiting this model element.

Overrides

AbstractModel.accept

Defined in

packages/verse-core/src/model/model.ts:820


equals()

equals(other: unknown): boolean

Checks if the current object is equal to the provided object.

Parameters

ParameterTypeDescription
otherunknownThe object to compare with.

Returns

boolean

Whether the objects are equal or not.

Overrides

AbstractModel.equals

Defined in

packages/verse-core/src/model/model.ts:824


hashCode()

hashCode(): number

Returns the hash code of this object.

Returns

number

The hash code.

Overrides

AbstractModel.hashCode

Defined in

packages/verse-core/src/model/model.ts:828


keyOf()

keyOf(entity: any): undefined | List<any>

Parameters

ParameterType
entityany

Returns

undefined | List<any>

Defined in

packages/verse-core/src/model/model.ts:791


rewrite()

rewrite(rewriter: ModelRewriter): AbstractModel

Rewrite method for processing a given model with a rewriter.

Parameters

ParameterTypeDescription
rewriterModelRewriterThe rewriter to use for rewriting the model.

Returns

AbstractModel

The rewritten model.

Inherited from

AbstractModel.rewrite

Defined in

packages/verse-core/src/model/model.ts:55


toJSON()

toJSON(): string

Returns a JSON representation of this model element.

Returns

string

The JSON representation.

Inherited from

AbstractModel.toJSON

Defined in

packages/verse-core/src/model/model.ts:82


toObject()

toObject(): string[]

Returns this instance as a plain object.

Returns

string[]

The plain object.

Overrides

AbstractModel.toObject

Defined in

packages/verse-core/src/model/model.ts:816