Removed untyped contructor from ComponentRegistration and add a protected setter.
[castle.git] / ActiveRecord / Castle.ActiveRecord / Attributes / Enums.cs
blobdfcb4c6fb77ddaa65ac696c572dadddb3af3cc79
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
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
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
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
17 using System;
19 /// <summary>
20 /// Defines the values for optimistic locking
21 /// </summary>
22 [Serializable]
23 public enum OptimisticLocking
25 /// <summary>
26 /// do not use optimistic locking
27 /// </summary>
28 None,
30 /// <summary>
31 /// check the version/timestamp columns
32 /// </summary>
33 Version,
35 /// <summary>
36 /// check the changed columns
37 /// </summary>
38 Dirty,
40 /// <summary>
41 /// check all columns
42 /// </summary>
43 All
46 /// <summary>
47 /// Define the polymorphism options
48 /// </summary>
49 [Serializable]
50 public enum Polymorphism
52 /// <summary>
53 /// Implicit polymorphism
54 /// </summary>
55 Implicit,
56 /// <summary>
57 /// Explicit polymorphism
58 /// </summary>
59 Explicit
62 /// <summary>
63 /// Define the caching options
64 /// </summary>
65 [Serializable]
66 public enum CacheEnum
68 /// <summary>
69 /// Default value, no caching
70 /// </summary>
71 Undefined,
72 /// <summary>
73 /// Read only cache - use for cases where no write are performed.
74 /// </summary>
75 ReadOnly,
76 /// <summary>
77 /// Read write cache
78 /// </summary>
79 ReadWrite,
80 /// <summary>
81 /// Read write cache with looser semantics.
82 /// Check NHibernate's documentation for the detials.
83 /// </summary>
84 NonStrictReadWrite
87 /// <summary>
88 /// Define outer join options
89 /// </summary>
90 [Serializable]
91 public enum OuterJoinEnum
93 /// <summary>
94 /// Let NHibernate decide what to do
95 /// </summary>
96 Auto,
97 /// <summary>
98 /// Use outer join
99 /// </summary>
100 True,
101 /// <summary>
102 /// Do not use outer join
103 /// </summary>
104 False
107 /// <summary>
108 /// Define the possible fetch option values
109 /// </summary>
110 public enum FetchEnum
112 /// <summary>
113 /// Let NHibernate decide what to do here
114 /// </summary>
115 Unspecified,
116 /// <summary>
117 /// Use a JOIN to load the data
118 /// </summary>
119 Join,
120 /// <summary>
121 /// Use a seperate SELECT statement to load the data
122 /// </summary>
123 Select,
124 /// <summary>
125 /// Use a seperate SELECT statement to load the data, re-running the original query in a subselect
126 /// </summary>
127 SubSelect
130 /// <summary>
131 /// Defines the cascading behaviour of this association.
132 /// </summary>
133 /// <remarks>
134 /// Entities has associations to other objects, this may be an association to a single item (<see cref="BelongsToAttribute" />)
135 /// or an association to a collection (<see cref="HasManyAttribute" />, <see cref="HasManyToAnyAttribute" />).
136 /// At any rate, you are able to tell NHibernate to automatically traverse an entity's associations, and act according
137 /// to the cascade option. For instance, adding an unsaved entity to a collection with <see cref="CascadeEnum.SaveUpdate" />
138 /// cascade will cause it to be saved along with its parent object, without any need for explicit instructions on our side.
139 /// </remarks>
140 public enum CascadeEnum
142 /// <summary>
143 /// No cascading. This is the default.
144 /// The cascade should be handled manually.
145 /// </summary>
146 None,
147 /// <summary>
148 /// Cascade save, update and delete.
149 /// When the object is saved, updated or deleted, the associations will be checked
150 /// and the objects found will also be saved, updated or deleted.
151 /// </summary>
152 All,
153 /// <summary>
154 /// Cascade save and update.
155 /// When the object is saved or updated, the associations will be checked and any object that requires
156 /// will be saved or updated (including saving or updating the associations in many-to-many scenario).
157 /// </summary>
158 SaveUpdate,
159 /// <summary>
160 /// Cascade delete.
161 /// When the object is deleted, all the objects in the association will be deleted as well.
162 /// </summary>
163 Delete
166 /// <summary>
167 /// Defines the cascading behaviour of this association.
168 /// </summary>
169 /// <remarks>
170 /// Entities has associations to other objects, this may be an association to a single item (<see cref="BelongsToAttribute" />)
171 /// or an association to a collection (<see cref="HasManyAttribute" />, <see cref="HasManyToAnyAttribute" />).
172 /// At any rate, you are able to tell NHibernate to automatically traverse an entity's associations, and act according
173 /// to the cascade option. For instance, adding an unsaved entity to a collection with <see cref="CascadeEnum.SaveUpdate" />
174 /// cascade will cause it to be saved along with its parent object, without any need for explicit instructions on our side.
175 /// </remarks>
176 [Serializable]
177 public enum ManyRelationCascadeEnum
179 /// <summary>
180 /// No cascading. This is the default.
181 /// The cascade should be handled manually.
182 /// </summary>
183 None,
184 /// <summary>
185 /// Cascade save, update and delete.
186 /// When the object is saved, updated or deleted, the associations will be checked
187 /// and the objects found will also be saved, updated or deleted.
188 /// </summary>
189 All,
190 /// <summary>
191 /// Cascade save and update.
192 /// When the object is saved or updated, the associations will be checked and any object that requires
193 /// will be saved or updated (including saving or updating the associations in many-to-many scenario).
194 /// </summary>
195 SaveUpdate,
196 /// <summary>
197 /// Cascade delete.
198 /// When the object is deleted, all the objects in the association will be deleted as well.
199 /// </summary>
200 Delete,
201 /// <summary>
202 /// Cascade save, update and delete, removing orphan children.
203 /// When an object is saved, updated or deleted, the associations will be checked and all objects found
204 /// will be saved, updated or deleted as well.
205 /// In additional to that, when an object is removed from the association and not associated with another object (orphaned), it will also be deleted.
206 /// </summary>
207 AllDeleteOrphan