Skip to main content

Class: ModelRewriter

A ModelVisitor for persistently rewriting models. This class provides methods for visiting different types of model nodes and rewriting them.

Extends

Extended by

Constructors

new ModelRewriter()

new ModelRewriter(): ModelRewriter

Returns

ModelRewriter

Inherited from

ModelVisitor.constructor

Methods

rewriteList()

rewriteList<T>(list: List<T>): List<T>

Type Parameters

Type Parameter
T extends AbstractModel

Parameters

ParameterType
listList<T>

Returns

List<T>

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

ModelVisitor.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

ModelVisitor.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

ModelVisitor.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

ModelVisitor.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>

Overrides

ModelVisitor.visitEntity

Defined in

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


visitForeignKey()

visitForeignKey(foreignKey: ForeignKeyModel): AbstractModel

Parameters

ParameterType
foreignKeyForeignKeyModel

Returns

AbstractModel

Overrides

ModelVisitor.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

ModelVisitor.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

ModelVisitor.visitIntProperty

Defined in

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


visitKey()

visitKey(key: KeyModel): AbstractModel

Parameters

ParameterType
keyKeyModel

Returns

AbstractModel

Overrides

ModelVisitor.visitKey

Defined in

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


visitModel()

visitModel(model: Model): Model

Parameters

ParameterType
modelModel

Returns

Model

Overrides

ModelVisitor.visitModel

Defined in

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


visitNavigationProperty()

visitNavigationProperty(navigation: NavigationPropertyModel): AbstractModel

Parameters

ParameterType
navigationNavigationPropertyModel

Returns

AbstractModel

Overrides

ModelVisitor.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

ModelVisitor.visitNumberProperty

Defined in

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


visitScalarProperty()

visitScalarProperty(scalarProperty: ScalarPropertyModel): AbstractModel

Parameters

ParameterType
scalarPropertyScalarPropertyModel

Returns

AbstractModel

Overrides

ModelVisitor.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

ModelVisitor.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

ModelVisitor.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>

Overrides

ModelVisitor.visitValueObject

Defined in

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


visitValueObjectProperty()

visitValueObjectProperty(valueObjectProperty: ValueObjectPropertyModel): AbstractModel

Parameters

ParameterType
valueObjectPropertyValueObjectPropertyModel

Returns

AbstractModel

Overrides

ModelVisitor.visitValueObjectProperty

Defined in

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