C# Class Castle.ActiveRecord.Framework.Internal.XmlGenerationVisitor

Traverse the tree emitting proper xml configuration
Inheritance: AbstractDepthFirstVisitor
Mostra file Open project: nats/castle-1.0.3-mono Class Usage Examples

Public Methods

Method Description
CreateXml ( ActiveRecordModel model ) : void

Creates the XML.

MakeTypeName ( Type type ) : String

Create a valid name from a type, without including all the version and public key information

Reset ( ) : void

Resets this instance.

VisitAny ( AnyModel model ) : void

Visits any.

VisitBelongsTo ( BelongsToModel model ) : void

Visits the belongs to.

VisitCollectionID ( CollectionIDModel model ) : void

Visits the collection ID.

VisitCompositePrimaryKey ( CompositeKeyModel model ) : void

Visits the composite primary key.

VisitCompositeUserType ( CompositeUserTypeModel model ) : void

Visits the custom composite user type.

VisitDependentObject ( DependentObjectModel model ) : void

Visits the dependent object.

VisitField ( FieldModel model ) : void

Visits the field.

VisitHasAndBelongsToMany ( HasAndBelongsToManyModel model ) : void

Visits the has and belongs to many.

VisitHasMany ( HasManyModel model ) : void

Visits the has many.

VisitHasManyToAny ( HasManyToAnyModel model ) : void

Visits the has many to any.

VisitHasManyToAnyConfig ( HasManyToAnyModel model ) : void

Visits the has many to any config.

VisitHilo ( Castle.ActiveRecord.Framework.Internal.HiloModel model ) : void

Visits the hilo.

VisitImport ( ImportModel model ) : void

Visits the import.

VisitKey ( KeyModel model ) : void

Visits the key.

VisitModel ( ActiveRecordModel model ) : void

Visits the model.

VisitNested ( Castle.ActiveRecord.Framework.Internal.NestedModel model ) : void

Visits the nested.

VisitNestedParentReference ( NestedParentReferenceModel referenceModel ) : void

Visits the parent

VisitOneToOne ( Castle.ActiveRecord.Framework.Internal.OneToOneModel model ) : void

Visits the one to one.

VisitPrimaryKey ( PrimaryKeyModel model ) : void

Visits the primary key.

VisitProperty ( PropertyModel model ) : void

Visits the property.

VisitTimestamp ( TimestampModel model ) : void

Visits the timestamp.

VisitVersion ( VersionModel model ) : void

Visits the version.

Private Methods

Method Description
Append ( string xml ) : void
AppendF ( string xml ) : void
AppendIdentation ( ) : void
BeginWriteProperty ( string accessString, string columnType, string formula, bool insert, string name, Type propType, bool update ) : void
ConditionalWrite ( string attName, string value, bool condition ) : String
CreateXmlPI ( ) : void
Dedent ( ) : void
EndMappingNode ( ) : void
EndWriteProperty ( ) : void
Ident ( ) : void
MakeAtt ( String attName, String value ) : String
MakeAtt ( String attName, bool value ) : String
MakeAtt ( String attName, bool value, bool output ) : String
MakeClassAtt ( Type type ) : String
MakeCustomTypeAtt ( String attName, Type type ) : String
MakeCustomTypeAttIfNotNull ( String attName, Type type ) : String
MakeTypeAtt ( Type type, String typeName ) : String
StartMappingNode ( bool useAutoImport ) : void
TranslateCacheEnum ( CacheEnum cacheEnum ) : string
TranslateCascadeEnum ( CascadeEnum cascadeEnum ) : string
TranslateCascadeEnum ( ManyRelationCascadeEnum cascadeEnum ) : string
TranslateFetch ( FetchEnum fetch ) : string
TranslateNotFoundBehaviourEnum ( NotFoundBehaviour notFoundBehaviourEnum ) : string
WriteCache ( CacheEnum cacheEnum ) : void
WriteCollection ( ManyRelationCascadeEnum cascadeEnum, Type targetType, RelationType type, string name, string accessString, string table, string schema, bool lazy, bool inverse, string orderBy, string where, string sort, string columnKey, string compositeKeyColumnKeys, string element, string columnRef, string compositeKeyColumnRefs, IVisitable extraModel, string index, string indexType, CacheEnum cache, NotFoundBehaviour notFoundBehaviour, FetchEnum fetch, int batchSize, Type collectionType ) : void
WriteColumn ( string check, string column, string index, int length, bool notNull, string sqlType, bool unique, string uniqueKey ) : void
WriteCompositeColumns ( String columns ) : void
WriteDiscriminator ( ActiveRecordModel model ) : void
WriteElement ( string element, Type targetType ) : void
WriteIfFalse ( String attName, bool value ) : String
WriteIfNonNull ( String attName, String value ) : String
WriteIfNotOne ( String attName, int value ) : String
WriteIfNotZero ( String attName, int value ) : String
WriteIfTrue ( String attName, bool value ) : String
WriteIndex ( String column, String type ) : void
WriteJcsCache ( CacheEnum cacheEnum ) : void
WriteKey ( String column ) : void
WriteManyToMany ( Type type, String columnRef, String notFoundMode ) : void
WriteOneToMany ( Type type, String notFoundMode ) : void
WriteProperty ( String name, Type propType, String accessString, String columnType, bool insert, bool update, String formula, String column, int length, bool notNull, bool unique, String uniqueKey, String sqlType, String index, String check ) : void

Method Details

CreateXml() public method

Creates the XML.
public CreateXml ( ActiveRecordModel model ) : void
model ActiveRecordModel The model.
return void

MakeTypeName() public static method

Create a valid name from a type, without including all the version and public key information
public static MakeTypeName ( Type type ) : String
type System.Type
return String

Reset() public method

Resets this instance.
public Reset ( ) : void
return void

VisitAny() public method

Visits any.
public VisitAny ( AnyModel model ) : void
model AnyModel The model.
return void

VisitBelongsTo() public method

Visits the belongs to.
public VisitBelongsTo ( BelongsToModel model ) : void
model BelongsToModel The model.
return void

VisitCollectionID() public method

Visits the collection ID.
public VisitCollectionID ( CollectionIDModel model ) : void
model CollectionIDModel The model.
return void

VisitCompositePrimaryKey() public method

Visits the composite primary key.
public VisitCompositePrimaryKey ( CompositeKeyModel model ) : void
model CompositeKeyModel The model.
return void

VisitCompositeUserType() public method

Visits the custom composite user type.
public VisitCompositeUserType ( CompositeUserTypeModel model ) : void
model CompositeUserTypeModel The model.
return void

VisitDependentObject() public method

Visits the dependent object.
public VisitDependentObject ( DependentObjectModel model ) : void
model DependentObjectModel The model
return void

VisitField() public method

Visits the field.
public VisitField ( FieldModel model ) : void
model FieldModel The model.
return void

VisitHasAndBelongsToMany() public method

Visits the has and belongs to many.
public VisitHasAndBelongsToMany ( HasAndBelongsToManyModel model ) : void
model HasAndBelongsToManyModel The model.
return void

VisitHasMany() public method

Visits the has many.
public VisitHasMany ( HasManyModel model ) : void
model HasManyModel The model.
return void

VisitHasManyToAny() public method

Visits the has many to any.
public VisitHasManyToAny ( HasManyToAnyModel model ) : void
model HasManyToAnyModel The model.
return void

VisitHasManyToAnyConfig() public method

Visits the has many to any config.
public VisitHasManyToAnyConfig ( HasManyToAnyModel model ) : void
model HasManyToAnyModel The model.
return void

VisitHilo() public method

Visits the hilo.
public VisitHilo ( Castle.ActiveRecord.Framework.Internal.HiloModel model ) : void
model Castle.ActiveRecord.Framework.Internal.HiloModel The model.
return void

VisitImport() public method

Visits the import.
public VisitImport ( ImportModel model ) : void
model ImportModel The model.
return void

VisitKey() public method

Visits the key.
public VisitKey ( KeyModel model ) : void
model KeyModel The model.
return void

VisitModel() public method

Visits the model.
public VisitModel ( ActiveRecordModel model ) : void
model ActiveRecordModel The model.
return void

VisitNested() public method

Visits the nested.
public VisitNested ( Castle.ActiveRecord.Framework.Internal.NestedModel model ) : void
model Castle.ActiveRecord.Framework.Internal.NestedModel The model.
return void

VisitNestedParentReference() public method

Visits the parent
public VisitNestedParentReference ( NestedParentReferenceModel referenceModel ) : void
referenceModel NestedParentReferenceModel The reference model.
return void

VisitOneToOne() public method

Visits the one to one.
public VisitOneToOne ( Castle.ActiveRecord.Framework.Internal.OneToOneModel model ) : void
model Castle.ActiveRecord.Framework.Internal.OneToOneModel The model.
return void

VisitPrimaryKey() public method

Visits the primary key.
public VisitPrimaryKey ( PrimaryKeyModel model ) : void
model PrimaryKeyModel The model.
return void

VisitProperty() public method

Visits the property.
public VisitProperty ( PropertyModel model ) : void
model PropertyModel The model.
return void

VisitTimestamp() public method

Visits the timestamp.
public VisitTimestamp ( TimestampModel model ) : void
model TimestampModel The model.
return void

VisitVersion() public method

Visits the version.
public VisitVersion ( VersionModel model ) : void
model VersionModel The model.
return void