Added RedirectUsingNamedRoute
[castle.git] / ActiveRecord / Castle.ActiveRecord.Framework.Internal.Tests / Model / ClassWithCustomPersister.cs
blob08e6ad23e4c6205e692b6f21a79284c6460aa2ef
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.Framework.Internal.Tests.Model
17 using System;
18 using System.Collections;
19 using NHibernate;
20 using NHibernate.Cache;
21 using NHibernate.Engine;
22 using NHibernate.Id;
23 using NHibernate.Metadata;
24 using NHibernate.Persister;
25 using NHibernate.Persister.Entity;
26 using NHibernate.Type;
28 [ActiveRecord("ClassA", Persister=typeof(CustomPersister))]
29 public class ClassWithCustomPersister : ActiveRecordBase
31 private int id;
32 private String name1;
33 private String name2;
34 private String name3;
35 private String text;
37 [PrimaryKey]
38 public int Id
40 get { return id; }
41 set { id = value; }
44 [Property(Insert=false, Update=false)]
45 public string Name1
47 get { return name1; }
48 set { name1 = value; }
51 [Property]
52 public string Name2
54 get { return name2; }
55 set { name2 = value; }
58 [Property(Unique=true, NotNull=true)]
59 public string Name3
61 get { return name3; }
62 set { name3 = value; }
65 [Property(ColumnType="StringClob")]
66 public string Text
68 get { return text; }
69 set { text = value; }
73 public class CustomPersister : IEntityPersister
75 public void PostInstantiate()
77 throw new NotImplementedException();
80 public object CreateProxy(object id, ISessionImplementor session)
82 throw new NotImplementedException();
85 public bool IsUnsaved(object obj)
87 throw new NotImplementedException();
90 public void SetPropertyValues(object obj, object[] values)
92 throw new NotImplementedException();
95 public object[] GetPropertyValues(object obj)
97 throw new NotImplementedException();
100 public void SetPropertyValue(object obj, int i, object value)
102 throw new NotImplementedException();
105 public object GetPropertyValue(object obj, int i)
107 throw new NotImplementedException();
110 public object GetPropertyValue(object obj, string name)
112 throw new NotImplementedException();
115 public IType GetPropertyType(string propertyName)
117 throw new NotImplementedException();
120 public int[] FindDirty(object[] x, object[] y, object owner, ISessionImplementor session)
122 throw new NotImplementedException();
125 public int[] FindModified(object[] old, object[] current, object owner, ISessionImplementor session)
127 throw new NotImplementedException();
130 public object GetIdentifier(object obj)
132 throw new NotImplementedException();
135 public void SetIdentifier(object obj, object id)
137 throw new NotImplementedException();
140 public object GetVersion(object obj)
142 throw new NotImplementedException();
145 public object Instantiate(object id)
147 throw new NotImplementedException();
150 public object Load(object id, object optionalObject, LockMode lockMode, ISessionImplementor session)
152 throw new NotImplementedException();
155 public void Lock(object id, object version, object obj, LockMode lockMode, ISessionImplementor session)
157 throw new NotImplementedException();
160 public void Insert(object id, object[] fields, object obj, ISessionImplementor session)
162 throw new NotImplementedException();
165 public object Insert(object[] fields, object obj, ISessionImplementor session)
167 throw new NotImplementedException();
170 public void Delete(object id, object version, object obj, ISessionImplementor session)
172 throw new NotImplementedException();
175 public void Update(object id, object[] fields, int[] dirtyFields, bool hasDirtyCollection, object[] oldFields,
176 object oldVersion, object obj, ISessionImplementor session)
178 throw new NotImplementedException();
181 public bool IsInstrumented(EntityMode entityMode)
183 throw new NotImplementedException();
186 public object[] GetDatabaseSnapshot(object id, ISessionImplementor session)
188 throw new NotImplementedException();
191 public object GetCurrentVersion(object id, ISessionImplementor session)
193 throw new NotImplementedException();
196 public object ForceVersionIncrement(object id, object currentVersion, ISessionImplementor session)
198 throw new NotImplementedException();
201 public bool IsUnsavedVersion(object[] values)
203 throw new NotImplementedException();
206 public bool IsInstance(object entity)
208 throw new NotImplementedException();
211 public void ProcessInsertGeneratedProperties(object id, object entity, object[] state, ISessionImplementor session)
213 throw new NotImplementedException();
216 public void ProcessUpdateGeneratedProperties(object id, object entity, object[] state, ISessionImplementor session)
218 throw new NotImplementedException();
221 public IEntityPersister GetSubclassEntityPersister(object instance, ISessionFactoryImplementor factory,
222 EntityMode entityMode)
224 throw new NotImplementedException();
227 public object IdentifierSpace
229 get { throw new NotImplementedException(); }
232 public string[] PropertySpaces
234 get { throw new NotImplementedException(); }
237 public Type MappedClass
239 get { throw new NotImplementedException(); }
242 public string ClassName
244 get { throw new NotImplementedException(); }
247 public string RootEntityName
249 get { throw new NotImplementedException(); }
252 public string EntityName
254 get { throw new NotImplementedException(); }
257 public bool ImplementsLifecycle
259 get { throw new NotImplementedException(); }
262 public bool ImplementsValidatable
264 get { throw new NotImplementedException(); }
267 public bool HasProxy
269 get { throw new NotImplementedException(); }
272 public Type ConcreteProxyClass
274 get { throw new NotImplementedException(); }
277 public bool HasCollections
279 get { throw new NotImplementedException(); }
282 public bool HasCascades
284 get { throw new NotImplementedException(); }
287 public bool IsMutable
289 get { throw new NotImplementedException(); }
292 public bool IsIdentifierAssignedByInsert
294 get { throw new NotImplementedException(); }
297 public bool HasIdentifierProperty
299 get { throw new NotImplementedException(); }
302 public bool CanExtractIdOutOfEntity
304 get { throw new NotImplementedException(); }
307 bool IEntityPersister.IsVersioned
309 get { throw new NotImplementedException(); }
312 public IVersionType VersionType
314 get { throw new NotImplementedException(); }
317 public int VersionProperty
319 get { throw new NotImplementedException(); }
322 public IIdentifierGenerator IdentifierGenerator
324 get { throw new NotImplementedException(); }
327 public IType[] PropertyTypes
329 get { throw new NotImplementedException(); }
332 public string[] PropertyNames
334 get { throw new NotImplementedException(); }
337 public bool[] PropertyUpdateability
339 get { throw new NotImplementedException(); }
342 public bool[] PropertyCheckability
344 get { throw new NotImplementedException(); }
347 public bool[] PropertyNullability
349 get { throw new NotImplementedException(); }
352 public bool[] PropertyInsertability
354 get { throw new NotImplementedException(); }
357 public bool[] PropertyVersionability
359 get { throw new NotImplementedException(); }
362 public Cascades.CascadeStyle[] PropertyCascadeStyles
364 get { throw new NotImplementedException(); }
367 public IType IdentifierType
369 get { throw new NotImplementedException(); }
372 public string IdentifierPropertyName
374 get { throw new NotImplementedException(); }
377 public bool IsCacheInvalidationRequired
379 get { throw new NotImplementedException(); }
382 public bool IsLazyPropertiesCacheable
384 get { throw new NotImplementedException(); }
387 public bool HasCache
389 get { throw new NotImplementedException(); }
392 public ICacheConcurrencyStrategy Cache
394 get { throw new NotImplementedException(); }
397 public IClassMetadata ClassMetadata
399 get { throw new NotImplementedException(); }
402 public bool IsBatchLoadable
404 get { throw new NotImplementedException(); }
407 public string[] QuerySpaces
409 get { throw new NotImplementedException(); }
412 public ISessionFactoryImplementor Factory
414 get { throw new NotImplementedException(); }
417 public bool IsVersionPropertyGenerated
419 get { throw new NotImplementedException(); }
422 public bool HasInsertGeneratedProperties
424 get { throw new NotImplementedException(); }
427 public bool HasUpdateGeneratedProperties
429 get { throw new NotImplementedException(); }
432 public bool IsSelectBeforeUpdateRequired
434 get { throw new NotImplementedException(); }
437 public bool IsVersioned
439 get { throw new NotImplementedException(); }
442 public IComparer VersionComparator
444 get { throw new NotImplementedException(); }