Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31234/NHibernate/Mapping
Modified Files:
Property.cs
Log Message:
Added properties and methods for determining the access method.
Index: Property.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Mapping/Property.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Property.cs 23 Jun 2004 21:02:17 -0000 1.7
--- Property.cs 22 Aug 2004 06:22:13 -0000 1.8
***************
*** 1,6 ****
using System;
using System.Collections;
! using NHibernate.Type;
using NHibernate.Engine;
namespace NHibernate.Mapping
--- 1,8 ----
using System;
using System.Collections;
!
using NHibernate.Engine;
+ using NHibernate.Type;
+ using NHibernate.Property;
namespace NHibernate.Mapping
***************
*** 13,16 ****
--- 15,19 ----
private bool updateable;
private bool insertable;
+ private string propertyAccessorName;
public Property(Value propertyValue)
***************
*** 122,125 ****
--- 125,154 ----
get { return Formula!=null; }
}
+
+ public string PropertyAccessorName
+ {
+ get { return propertyAccessorName; }
+ set { propertyAccessorName = value; }
+ }
+
+ public IGetter GetGetter(System.Type clazz)
+ {
+ return PropertyAccessor.GetGetter(clazz, name);
+ }
+
+ public ISetter GetSetter(System.Type clazz)
+ {
+ return PropertyAccessor.GetSetter(clazz, name);
+ }
+
+ protected IPropertyAccessor PropertyAccessor
+ {
+ get { return PropertyAccessorFactory.GetPropertyAccessor( PropertyAccessorName ); }
+ }
+
+ public bool IsBasicPropertyAccessor
+ {
+ get { return propertyAccessorName==null || propertyAccessorName.Equals("property"); }
+ }
}
}
\ No newline at end of file
|