Class: abstract
AbstractConvention
Base class for conventions that use ModelRewriter.
Extends
Implements
Constructors
new AbstractConvention()
new AbstractConvention():
AbstractConvention
Returns
Inherited from
Methods
apply()
apply<
TModel
>(model
:TModel
):TModel
Applies the convention to the specified model.
Type Parameters
Type Parameter |
---|
TModel extends AbstractModel |
Parameters
Parameter | Type | Description |
---|---|---|
model | TModel | The model to apply the convention to. |
Returns
TModel
A new instance if the model was modified; otherwise, the original model.
Implementation of
Defined in
packages/verse-core/src/conventions/convention.ts:27
rewriteList()
rewriteList<
T
>(list
:List
<T
>):List
<T
>
Type Parameters
Type Parameter |
---|
T extends AbstractModel |
Parameters
Parameter | Type |
---|---|
list | List <T > |
Returns
List
<T
>
Inherited from
Defined in
packages/verse-core/src/model/rewriter.ts:52
visitBooleanProperty()
visitBooleanProperty(
booleanProperty
:BooleanPropertyModel
,state
?:unknown
):AbstractModel
Parameters
Parameter | Type |
---|---|
booleanProperty | BooleanPropertyModel |
state ? | unknown |
Returns
Inherited from
ModelRewriter
.visitBooleanProperty
Defined in
packages/verse-core/src/model/visitor.ts:79
visitConcurrency()
visitConcurrency(
concurrency
:ConcurrencyModel
,state
?:unknown
):AbstractModel
Parameters
Parameter | Type |
---|---|
concurrency | ConcurrencyModel |
state ? | unknown |
Returns
Inherited from
ModelRewriter
.visitConcurrency
Defined in
packages/verse-core/src/model/visitor.ts:59
visitConversion()
visitConversion(
conversion
:ConversionModel
,state
?:unknown
):AbstractModel
Parameters
Parameter | Type |
---|---|
conversion | ConversionModel |
state ? | unknown |
Returns
Inherited from
Defined in
packages/verse-core/src/model/visitor.ts:109
visitDateProperty()
visitDateProperty(
dateProperty
:DatePropertyModel
,state
?:unknown
):AbstractModel
Parameters
Parameter | Type |
---|---|
dateProperty | DatePropertyModel |
state ? | unknown |
Returns
Inherited from
ModelRewriter
.visitDateProperty
Defined in
packages/verse-core/src/model/visitor.ts:84
visitEntity()
visitEntity(
entity
:EntityModel
<any
,any
>):EntityModel
<any
,any
>
Parameters
Parameter | Type |
---|---|
entity | EntityModel <any , any > |
Returns
EntityModel
<any
, any
>
Inherited from
Defined in
packages/verse-core/src/model/rewriter.ts:24
visitForeignKey()
visitForeignKey(
foreignKey
:ForeignKeyModel
):AbstractModel
Parameters
Parameter | Type |
---|---|
foreignKey | ForeignKeyModel |
Returns
Inherited from
Defined in
packages/verse-core/src/model/rewriter.ts:36
visitGenerator()
visitGenerator(
generator
:GeneratorModel
,state
?:unknown
):AbstractModel
Parameters
Parameter | Type |
---|---|
generator | GeneratorModel |
state ? | unknown |
Returns
Inherited from
Defined in
packages/verse-core/src/model/visitor.ts:104
visitIntProperty()
visitIntProperty(
intProperty
:IntPropertyModel
,state
?:unknown
):AbstractModel
Parameters
Parameter | Type |
---|---|
intProperty | IntPropertyModel |
state ? | unknown |
Returns
Inherited from
ModelRewriter
.visitIntProperty
Defined in
packages/verse-core/src/model/visitor.ts:74
visitKey()
visitKey(
key
:KeyModel
):AbstractModel
Parameters
Parameter | Type |
---|---|
key | KeyModel |
Returns
Inherited from
Defined in
packages/verse-core/src/model/rewriter.ts:32
visitModel()
Parameters
Parameter | Type |
---|---|
model | Model |
Returns
Inherited from
Defined in
packages/verse-core/src/model/rewriter.ts:20
visitNavigationProperty()
visitNavigationProperty(
navigation
:NavigationPropertyModel
):AbstractModel
Parameters
Parameter | Type |
---|---|
navigation | NavigationPropertyModel |
Returns
Inherited from
ModelRewriter
.visitNavigationProperty
Defined in
packages/verse-core/src/model/rewriter.ts:44
visitNumberProperty()
visitNumberProperty(
numberProperty
:NumberPropertyModel
,state
?:unknown
):AbstractModel
Parameters
Parameter | Type |
---|---|
numberProperty | NumberPropertyModel |
state ? | unknown |
Returns
Inherited from
ModelRewriter
.visitNumberProperty
Defined in
packages/verse-core/src/model/visitor.ts:89
visitScalarProperty()
visitScalarProperty(
scalarProperty
:ScalarPropertyModel
):AbstractModel
Parameters
Parameter | Type |
---|---|
scalarProperty | ScalarPropertyModel |
Returns
Inherited from
ModelRewriter
.visitScalarProperty
Defined in
packages/verse-core/src/model/rewriter.ts:40
visitSequence()
visitSequence(
sequence
:SequenceModel
,state
?:unknown
):AbstractModel
Parameters
Parameter | Type |
---|---|
sequence | SequenceModel |
state ? | unknown |
Returns
Inherited from
Defined in
packages/verse-core/src/model/visitor.ts:44
visitStringProperty()
visitStringProperty(
stringProperty
:StringPropertyModel
,state
?:unknown
):AbstractModel
Parameters
Parameter | Type |
---|---|
stringProperty | StringPropertyModel |
state ? | unknown |
Returns
Inherited from
ModelRewriter
.visitStringProperty
Defined in
packages/verse-core/src/model/visitor.ts:69
visitValueObject()
visitValueObject(
valueObject
:ValueObjectModel
<any
>):ValueObjectModel
<any
>
Parameters
Parameter | Type |
---|---|
valueObject | ValueObjectModel <any > |
Returns
ValueObjectModel
<any
>
Inherited from
ModelRewriter
.visitValueObject
Defined in
packages/verse-core/src/model/rewriter.ts:28
visitValueObjectProperty()
visitValueObjectProperty(
valueObjectProperty
:ValueObjectPropertyModel
):AbstractModel
Parameters
Parameter | Type |
---|---|
valueObjectProperty | ValueObjectPropertyModel |
Returns
Inherited from
ModelRewriter
.visitValueObjectProperty