Class: ForeignKeyModel
Models a foreign key.
Extends
Constructors
new ForeignKeyModel()
new ForeignKeyModel(
targetName
:string
,names
:List
<string
>,onDelete
?:OnDelete
):ForeignKeyModel
Parameters
Parameter | Type |
---|---|
targetName | string |
names | List <string > |
onDelete ? | OnDelete |
Returns
Overrides
Defined in
packages/verse-core/src/model/model.ts:857
Accessors
dependent
get
dependent():undefined
|NavigationPropertyModel
Returns
undefined
| NavigationPropertyModel
Defined in
packages/verse-core/src/model/model.ts:940
names
get
names():List
<string
>
Returns
List
<string
>
Defined in
packages/verse-core/src/model/model.ts:879
onDelete
get
onDelete():undefined
|OnDelete
Returns
undefined
| OnDelete
Defined in
packages/verse-core/src/model/model.ts:883
parent
get
parent():EntityModel
<any
,any
>
Returns the parent model element.
Returns
EntityModel
<any
, any
>
The parent model element.
Overrides
Defined in
packages/verse-core/src/model/model.ts:951
principal
get
principal():undefined
|NavigationPropertyModel
Returns
undefined
| NavigationPropertyModel
Defined in
packages/verse-core/src/model/model.ts:936
properties
get
properties():List
<ScalarPropertyModel
>
Returns
List
<ScalarPropertyModel
>
Defined in
packages/verse-core/src/model/model.ts:895
references
get
references():EntityModel
<any
,any
>
Returns
EntityModel
<any
, any
>
Defined in
packages/verse-core/src/model/model.ts:903
required
get
required():boolean
Returns
boolean
Defined in
packages/verse-core/src/model/model.ts:932
targetName
get
targetName():string
Returns
string
Defined in
packages/verse-core/src/model/model.ts:867
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 Parameter | Default type |
---|---|
T | - |
S | unknown |
Parameters
Parameter | Type | Description |
---|---|---|
visitor | ModelVisitor <T , S > | The visitor to accept. |
state ? | S | An optional state to pass to the visitor. |
Returns
T
The result of visiting this model element.
Overrides
Defined in
packages/verse-core/src/model/model.ts:963
equals()
equals(
other
:unknown
):boolean
Checks if the current object is equal to the provided object.
Parameters
Parameter | Type | Description |
---|---|---|
other | unknown | The object to compare with. |
Returns
boolean
Whether the objects are equal or not.
Overrides
Defined in
packages/verse-core/src/model/model.ts:967
hashCode()
hashCode():
number
Returns the hash code of this object.
Returns
number
The hash code.
Overrides
Defined in
packages/verse-core/src/model/model.ts:977
rewrite()
rewrite(
rewriter
:ModelRewriter
):AbstractModel
Rewrite method for processing a given model with a rewriter.
Parameters
Parameter | Type | Description |
---|---|---|
rewriter | ModelRewriter | The rewriter to use for rewriting the model. |
Returns
The rewritten model.
Inherited from
Defined in
packages/verse-core/src/model/model.ts:55
set()
set(
entity
:object
,key
?:EntityKey
):void
Parameters
Parameter | Type |
---|---|
entity | object |
key ? | EntityKey |
Returns
void
Defined in
packages/verse-core/src/model/model.ts:924
toJSON()
toJSON():
string
Returns a JSON representation of this model element.
Returns
string
The JSON representation.
Inherited from
Defined in
packages/verse-core/src/model/model.ts:82
toObject()
toObject(): {
onDelete
:undefined
|OnDelete
;properties
:string
[];references
:string
; }
Returns this instance as a plain object.
Returns
{onDelete
: undefined
| OnDelete
;properties
: string
[];references
: string
; }
The plain object.
onDelete
onDelete:
undefined
|OnDelete
properties
properties:
string
[]
references
references:
string
Overrides
Defined in
packages/verse-core/src/model/model.ts:955
value()
value(
entity
:object
):List
<any
>
Parameters
Parameter | Type |
---|---|
entity | object |
Returns
List
<any
>
Defined in
packages/verse-core/src/model/model.ts:911
withOnDelete()
withOnDelete(
onDelete
:OnDelete
):ForeignKeyModel
Parameters
Parameter | Type |
---|---|
onDelete | OnDelete |
Returns
Defined in
packages/verse-core/src/model/model.ts:887
withTargetName()
withTargetName(
targetName
:string
):ForeignKeyModel
Parameters
Parameter | Type |
---|---|
targetName | string |