1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.ActiveRecord
.Framework
.Internal
18 /// For implementign the visitor pattern.
20 public interface IVisitor
23 /// Visits the top level of the model.
25 /// <param name="model">The model.</param>
26 void VisitModel(ActiveRecordModel model
);
29 /// Visits the primary key.
31 /// <param name="model">The model.</param>
32 void VisitPrimaryKey(PrimaryKeyModel model
);
35 /// Visits the composite primary key.
37 /// <param name="model">The model.</param>
38 void VisitCompositePrimaryKey(CompositeKeyModel model
);
41 /// Visits the has many to any association
43 /// <param name="model">The model.</param>
44 void VisitHasManyToAny(HasManyToAnyModel model
);
49 /// <param name="model">The model.</param>
50 void VisitAny(AnyModel model
);
53 /// Visits the property.
55 /// <param name="model">The model.</param>
56 void VisitProperty(PropertyModel model
);
61 /// <param name="model">The model.</param>
62 void VisitField(FieldModel model
);
65 /// Visits the component parent reference
67 /// <param name="referenceModel">The model.</param>
68 void VisitNestedParentReference(NestedParentReferenceModel referenceModel
);
71 /// Visits the version.
73 /// <param name="model">The model.</param>
74 void VisitVersion(VersionModel model
);
77 /// Visits the timestamp.
79 /// <param name="model">The model.</param>
80 void VisitTimestamp(TimestampModel model
);
85 /// <param name="model">The model.</param>
86 void VisitKey(KeyModel model
);
89 /// Visits the belongs to association
91 /// <param name="model">The model.</param>
92 void VisitBelongsTo(BelongsToModel model
);
95 /// Visits the has many association
97 /// <param name="model">The model.</param>
98 void VisitHasMany(HasManyModel model
);
101 /// Visits the one to one association
103 /// <param name="model">The model.</param>
104 void VisitOneToOne(OneToOneModel model
);
107 /// Visits the has and belongs to many association
109 /// <param name="model">The model.</param>
110 void VisitHasAndBelongsToMany(HasAndBelongsToManyModel model
);
113 /// Visits the hilo strategy
115 /// <param name="model">The model.</param>
116 void VisitHilo(HiloModel model
);
119 /// Visits the nested (component) model
121 /// <param name="model">The model.</param>
122 void VisitNested(NestedModel model
);
125 /// Visits the collection ID.
127 /// <param name="model">The model.</param>
128 void VisitCollectionID(CollectionIDModel model
);
131 /// Visits the has many to any configuration
133 /// <param name="hasManyToAnyConfigModel">The has many to any config model.</param>
134 void VisitHasManyToAnyConfig(HasManyToAnyModel
.Config hasManyToAnyConfigModel
);
137 /// Visits the import statement
139 /// <param name="model">The model.</param>
140 void VisitImport(ImportModel model
);
143 /// Visits the dependent object model
145 /// <param name="model">The model.</param>
146 void VisitDependentObject(DependentObjectModel model
);
149 /// Visits the custom composite user type.
151 /// <param name="model">The model.</param>
152 void VisitCompositeUserType(CompositeUserTypeModel model
);