Namespaces

Types

Type IEntityPersister

Namespace NHibernate.Persister.Entity

Methods

Properties

Public instance methods

object CreateProxy(object id, ISessionImplementor session)

Create a new proxy instance
Parameters
return object
object id
ISessionImplementor session

void Delete(object id, object version, object obj, ISessionImplementor session)

Delete a persistent instance
Parameters
object id
object version
object obj
ISessionImplementor session

Int32[] FindDirty(Object[] x, Object[] y, object owner, ISessionImplementor session)

Parameters
return Int32[]
Object[] x
Object[] y
object owner
ISessionImplementor session

Int32[] FindModified(Object[] old, Object[] current, object owner, ISessionImplementor session)

Parameters
return Int32[]
Object[] old
Object[] current
object owner
ISessionImplementor session

object GetCurrentVersion(object id, ISessionImplementor session)

Get the current version of the object, or return null if there is no row for the given identifier. In the case of unversioned data, return any object if the row exists.
Parameters
return object
object id
ISessionImplementor session

Object[] GetDatabaseSnapshot(object id, object version, ISessionImplementor session)

Get the current database state of the object, in a "hydrated" form, without resolving identifiers
Parameters
return Object[] ${WriteSummary(content)}
object id
object version
ISessionImplementor session

object GetIdentifier(object obj)

Get the identifier of an instance ( throw an exception if no identifier property)
Parameters
return object
object obj

IType GetPropertyType(string propertyName)

Get the type of a particular property
Parameters
return IType
string propertyName

object GetPropertyValue(object obj, int i)

Get the value of a particular property
Parameters
return object
object obj
int i

object GetPropertyValue(object obj, string name)

Get the value of a particular property
Parameters
return object
object obj
string name

Object[] GetPropertyValues(object obj)

Return the values of the mapped properties of the object
Parameters
return Object[]
object obj

object GetVersion(object obj)

Get the version number (or timestamp) from the object's version property (or return null if not versioned)
Parameters
return object
object obj

object Insert(Object[] fields, object obj, ISessionImplementor session)

Parameters
return object
Object[] fields
object obj
ISessionImplementor session

void Insert(object id, Object[] fields, object obj, ISessionImplementor session)

Parameters
object id
Object[] fields
object obj
ISessionImplementor session

object Instantiate(object id)

Create a class instance initialized with the given identifier
Parameters
return object
object id

bool IsInstance(object entity)

Determines whether the specified entity is an instance of the class managed by this persister.
Parameters
return bool ${WriteSummary(content)}
object entity The entity.

bool IsUnsaved(object obj)

Is this a new transient instance?
Parameters
return bool
object obj

bool IsUnsavedVersion(Object[] values)

Parameters
return bool
Object[] values

object Load(object id, object optionalObject, LockMode lockMode, ISessionImplementor session)

Load an insatance of the persistent class.
Parameters
return object
object id
object optionalObject
LockMode lockMode
ISessionImplementor session

void Lock(object id, object version, object obj, LockMode lockMode, ISessionImplementor session)

Do a version check (optional operation)
Parameters
object id
object version
object obj
LockMode lockMode
ISessionImplementor session

void PostInstantiate()

Finish the initialization of this object, once all ClassPersisters have been instantiated. Called only once, before any other method.

void ProcessInsertGeneratedProperties(object id, object entity, Object[] state, ISessionImplementor session)

Parameters
object id
object entity
Object[] state
ISessionImplementor session

void ProcessUpdateGeneratedProperties(object id, object entity, Object[] state, ISessionImplementor session)

Parameters
object id
object entity
Object[] state
ISessionImplementor session

void SetIdentifier(object obj, object id)

Set the identifier of an instance (or do nothing if no identifier property)
Parameters
object obj The object to set the Id property on.
object id The value to set the Id property to.

void SetPropertyValue(object obj, int i, object value)

Set the value of a particular property
Parameters
object obj
int i
object value

void SetPropertyValues(object obj, Object[] values)

Parameters
object obj
Object[] values

void Update(object id, Object[] fields, Int32[] dirtyFields, bool hasDirtyCollection, Object[] oldFields, object oldVersion, object obj, ISessionImplementor session)

Parameters
object id
Object[] fields
Int32[] dirtyFields
bool hasDirtyCollection
Object[] oldFields
object oldVersion
object obj
ISessionImplementor session

Public properties

ICacheConcurrencyStrategy Cache get;

Get the cache (optional operation)
return ICacheConcurrencyStrategy

IClassMetadata ClassMetadata get;

Get the user-visible metadata for the class (optional operation)
return IClassMetadata

string ClassName get;

The classname of the persistent class (used only for messages)
return string

Type ConcreteProxyClass get;

Get the proxy interface that instances of this concrete class will be cast to
return Type

ISessionFactoryImplementor Factory get;

The session factory this instance is associated with.
return ISessionFactoryImplementor

bool HasCache get;

Does this class have a cache?
return bool

bool HasCascades get;

Does this class declare any cascading save/update/deletes?
return bool

bool HasCollections get;

Do instances of this class contain collections?
return bool

bool HasIdentifierProperty get;

Does the class have a property holding the identifier value?
return bool

bool HasIdentifierPropertyOrEmbeddedCompositeIdentifier get;

Gets if the Type has a Property for the or uses a to store the id.
return bool

bool HasInsertGeneratedProperties get;

Does this entity define any properties as being database-generated on insert?
return bool

bool HasProxy get;

Does this class support dynamic proxies?
return bool

bool HasUpdateGeneratedProperties get;

Does this entity define any properties as being database-generated on update?
return bool

IIdentifierGenerator IdentifierGenerator get;

Return the IIdentifierGenerator for the class
return IIdentifierGenerator

string IdentifierPropertyName get;

Get the name of the indentifier property (or return null) - need not return the name of an actual .NET property
return string

object IdentifierSpace get;

Returns an object that identifies the space in which identifiers of this class hierarchy are unique. eg. a table name, etc.
return object

IType IdentifierType get;

Get the identifier type
return IType

bool ImplementsLifecycle get;

Does the class implement the ILifecycle inteface?
return bool

bool ImplementsValidatable get;

Does the class implement the IValidatable interface?
return bool

bool IsBatchLoadable get;

Is batch loading enabled?
return bool

bool IsCacheInvalidationRequired get;

Should we always invalidate the cache instead of recaching updated state
return bool

bool IsIdentifierAssignedByInsert get;

Is the identifier assigned before the insert by an IDGenerator or is it returned by the Insert() method?
This determines which form of Insert() will be called.
return bool

bool IsMutable get;

Are instances of this class mutable?
return bool

bool IsVersioned get;

Are instances of this class versioned by a timestamp or version number column?
return bool

bool IsVersionPropertyGenerated get;

Does this entity contain a version property that is defined to be database generated?
return bool

Type MappedClass get;

The persistent class
return Type

CascadeStyle[] PropertyCascadeStyles get;

Get the cascade styles of the properties (optional operation)
return CascadeStyle[]

Boolean[] PropertyCheckability get;

Properties that may be dirty (and thus should be dirty-checked). These include all updatable properties and some associations.
return Boolean[]

Boolean[] PropertyInsertability get;

Gets if the Property is insertable.
This is for formula columns and if the user sets the insert attribute on the element.
return Boolean[]

String[] PropertyNames get;

Get the names of the class properties - doesn't have to be the names of the actual .NET properties (used for XML generation only)
return String[]

Boolean[] PropertyNullability get;

Get the nullability of the properties of this class
return Boolean[]

Object[] PropertySpaces get;

Returns an array of objects that identifies spaces in which properties of this class instance are persisted. eg. table names.
return Object[]

IType[] PropertyTypes get;

Get the Hibernate types of the class properties
return IType[]

Boolean[] PropertyUpdateability get;

Gets if the Property is updatable
This is for formula columns and if the user sets the update attribute on the element.
return Boolean[]

Boolean[] PropertyVersionability get;

Get the "versionability" of the properties of this class (is the property optimistic-locked)
return Boolean[]

Object[] QuerySpaces get;

Returns an array of objects that identify spaces in which properties of this class are persisted, for instances of this class and its subclasses.
return Object[]

int VersionProperty get;

Which property holds the version number? (optional operation)
return int

IVersionType VersionType get;

Get the type of versioning (optional operation)
return IVersionType