Skip to main content

Class: abstract AbstractConvention

Base class for conventions that use ModelRewriter.

Extends

Implements

Constructors

new AbstractConvention()

new AbstractConvention(): AbstractConvention

Returns

AbstractConvention

Inherited from

ModelRewriter.constructor

Methods

apply()

apply<TModel>(model: TModel): TModel

Applies the convention to the specified model.

Type Parameters

Type Parameter
TModel extends AbstractModel

Parameters

ParameterTypeDescription
modelTModelThe model to apply the convention to.

Returns

TModel

A new instance if the model was modified; otherwise, the original model.

Implementation of

Convention.apply

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

ParameterType
listList<T>

Returns

List<T>

Inherited from

ModelRewriter.rewriteList

Defined in

packages/verse-core/src/model/rewriter.ts:52


visitBooleanProperty()

visitBooleanProperty(booleanProperty: BooleanPropertyModel, state?: unknown): AbstractModel

Parameters

ParameterType
booleanPropertyBooleanPropertyModel
state?unknown

Returns

AbstractModel

Inherited from

ModelRewriter.visitBooleanProperty

Defined in

packages/verse-core/src/model/visitor.ts:79


visitConcurrency()

visitConcurrency(concurrency: ConcurrencyModel, state?: unknown): AbstractModel

Parameters

ParameterType
concurrencyConcurrencyModel
state?unknown

Returns

AbstractModel

Inherited from

ModelRewriter.visitConcurrency

Defined in

packages/verse-core/src/model/visitor.ts:59


visitConversion()

visitConversion(conversion: ConversionModel, state?: unknown): AbstractModel

Parameters

ParameterType
conversionConversionModel
state?unknown

Returns

AbstractModel

Inherited from

ModelRewriter.visitConversion

Defined in

packages/verse-core/src/model/visitor.ts:109


visitDateProperty()

visitDateProperty(dateProperty: DatePropertyModel, state?: unknown): AbstractModel

Parameters

ParameterType
datePropertyDatePropertyModel
state?unknown

Returns

AbstractModel

Inherited from

ModelRewriter.visitDateProperty

Defined in

packages/verse-core/src/model/visitor.ts:84


visitEntity()

visitEntity(entity: EntityModel<any, any>): EntityModel<any, any>

Parameters

ParameterType
entityEntityModel<any, any>

Returns

EntityModel<any, any>

Inherited from

ModelRewriter.visitEntity

Defined in

packages/verse-core/src/model/rewriter.ts:24


visitForeignKey()

visitForeignKey(foreignKey: ForeignKeyModel): AbstractModel

Parameters

ParameterType
foreignKeyForeignKeyModel

Returns

AbstractModel

Inherited from

ModelRewriter.visitForeignKey

Defined in

packages/verse-core/src/model/rewriter.ts:36


visitGenerator()

visitGenerator(generator: GeneratorModel, state?: unknown): AbstractModel

Parameters

ParameterType
generatorGeneratorModel
state?unknown

Returns

AbstractModel

Inherited from

ModelRewriter.visitGenerator

Defined in

packages/verse-core/src/model/visitor.ts:104


visitIntProperty()

visitIntProperty(intProperty: IntPropertyModel, state?: unknown): AbstractModel

Parameters

ParameterType
intPropertyIntPropertyModel
state?unknown

Returns

AbstractModel

Inherited from

ModelRewriter.visitIntProperty

Defined in

packages/verse-core/src/model/visitor.ts:74


visitKey()

visitKey(key: KeyModel): AbstractModel

Parameters

ParameterType
keyKeyModel

Returns

AbstractModel

Inherited from

ModelRewriter.visitKey

Defined in

packages/verse-core/src/model/rewriter.ts:32


visitModel()

visitModel(model: Model): Model

Parameters

ParameterType
modelModel

Returns

Model

Inherited from

ModelRewriter.visitModel

Defined in

packages/verse-core/src/model/rewriter.ts:20


visitNavigationProperty()

visitNavigationProperty(navigation: NavigationPropertyModel): AbstractModel

Parameters

ParameterType
navigationNavigationPropertyModel

Returns

AbstractModel

Inherited from

ModelRewriter.visitNavigationProperty

Defined in

packages/verse-core/src/model/rewriter.ts:44


visitNumberProperty()

visitNumberProperty(numberProperty: NumberPropertyModel, state?: unknown): AbstractModel

Parameters

ParameterType
numberPropertyNumberPropertyModel
state?unknown

Returns

AbstractModel

Inherited from

ModelRewriter.visitNumberProperty

Defined in

packages/verse-core/src/model/visitor.ts:89


visitScalarProperty()

visitScalarProperty(scalarProperty: ScalarPropertyModel): AbstractModel

Parameters

ParameterType
scalarPropertyScalarPropertyModel

Returns

AbstractModel

Inherited from

ModelRewriter.visitScalarProperty

Defined in

packages/verse-core/src/model/rewriter.ts:40


visitSequence()

visitSequence(sequence: SequenceModel, state?: unknown): AbstractModel

Parameters

ParameterType
sequenceSequenceModel
state?unknown

Returns

AbstractModel

Inherited from

ModelRewriter.visitSequence

Defined in

packages/verse-core/src/model/visitor.ts:44


visitStringProperty()

visitStringProperty(stringProperty: StringPropertyModel, state?: unknown): AbstractModel

Parameters

ParameterType
stringPropertyStringPropertyModel
state?unknown

Returns

AbstractModel

Inherited from

ModelRewriter.visitStringProperty

Defined in

packages/verse-core/src/model/visitor.ts:69


visitValueObject()

visitValueObject(valueObject: ValueObjectModel<any>): ValueObjectModel<any>

Parameters

ParameterType
valueObjectValueObjectModel<any>

Returns

ValueObjectModel<any>

Inherited from

ModelRewriter.visitValueObject

Defined in

packages/verse-core/src/model/rewriter.ts:28


visitValueObjectProperty()

visitValueObjectProperty(valueObjectProperty: ValueObjectPropertyModel): AbstractModel

Parameters

ParameterType
valueObjectPropertyValueObjectPropertyModel

Returns

AbstractModel

Inherited from

ModelRewriter.visitValueObjectProperty

Defined in

packages/verse-core/src/model/rewriter.ts:48