C# Class NHibernate.Persister.Entity.AbstractEntityPersister

Superclass for built-in mapping strategies. Implements functionalty common to both mapping strategies
May be considered an immutable view of the mapping object
Inheritance: IOuterJoinLoadable, IQueryable, IClassMetadata, IUniqueKeyLoadable, ISqlLoadable, ILazyPropertyInitializer, IPostInsertIdentityPersister, ILockable
Exibir arquivo Open project: nhibernate/nhibernate-core Class Usage Examples

Protected Properties

Property Type Description
customSQLDelete SqlString[]
customSQLInsert SqlString[]
customSQLUpdate SqlString[]
deleteCallable bool[]
deleteResultCheckStyles ExecuteUpdateResultCheckStyle[]
insertCallable bool[]
insertResultCheckStyles ExecuteUpdateResultCheckStyle[]
propertyDefinedOnSubclass bool[]
propertyMapping BasicEntityPropertyMapping
rowIdName string
updateCallable bool[]
updateResultCheckStyles ExecuteUpdateResultCheckStyle[]

Private Properties

Property Type Description
CheckVersion bool
CreateJoin NHibernate.SqlCommand.JoinFragment
CreateJoin NHibernate.SqlCommand.JoinFragment
CreateLoaders void
CreateUniqueKeyLoader NHibernate.Loader.Entity.EntityLoader
GenerateGeneratedValuesSelectString NHibernate.SqlCommand.SqlString
GenerateVersionIncrementUpdateString NHibernate.SqlCommand.SqlCommandInfo
GetAppropriateLoader IUniqueEntityLoader
GetAppropriateUniqueKeyLoader NHibernate.Loader.Entity.EntityLoader
GetColumnsToTableAliasMap string>.IDictionary
GetLocker ILockingStrategy
GetSubclassEntityName string
GetSubclassPropertyIndex int
GetUpdateStrings NHibernate.SqlCommand.SqlCommandInfo[]
HasIdentifierMapper bool
InitDiscriminatorPropertyPath void
InitIdentifierPropertyPaths void
InitOrdinaryPropertyPaths void
InitPropertyPaths void
InitializeLazyPropertiesFromCache object
InitializeLazyPropertiesFromDatastore object
InitializeLazyProperty bool
InternalInitSubclassPropertyAliasesMap void
IsAllNull bool
LocateVersionType IVersionType
LogDirtyProperties void
ProcessGeneratedPropertiesWithGeneratedSql void
ProcessGeneratedPropertiesWithLoader void

Public Methods

Method Description
AfterInitialize ( object entity, bool lazyPropertiesAreUnfetched, ISessionImplementor session ) : void
AfterReassociate ( object entity, ISessionImplementor session ) : void
ConsumesCollectionAlias ( ) : bool
ConsumesEntityAlias ( ) : bool
CountSubclassProperties ( ) : int
CreateProxy ( object id, ISessionImplementor session ) : object
Delete ( object id, object version, int j, object obj, NHibernate.SqlCommand.SqlCommandInfo sql, ISessionImplementor session, object loadedState ) : void

Perform an SQL DELETE

Delete ( object id, object version, object obj, ISessionImplementor session ) : void
FilterFragment ( string alias ) : string
FilterFragment ( string alias, IFilter>.IDictionary enabledFilters ) : string
FindDirty ( object currentState, object previousState, object entity, ISessionImplementor session ) : int[]
FindModified ( object old, object current, object entity, ISessionImplementor session ) : int[]
ForceVersionIncrement ( object id, object currentVersion, ISessionImplementor session ) : object
FromJoinFragment ( string alias, bool innerJoin, bool includeSubclasses ) : NHibernate.SqlCommand.SqlString
FromTableFragment ( string alias ) : string
GenerateFilterConditionAlias ( string rootAlias ) : string
GenerateTableAlias ( string rootAlias, int tableNumber ) : string
GenerateTableAliasForColumn ( string rootAlias, string column ) : string
GetCascadeStyle ( int i ) : CascadeStyle
GetConcreteProxyClass ( EntityMode entityMode ) : Type
GetCurrentVersion ( object id, ISessionImplementor session ) : object

Retrieve the version number

GetDatabaseSnapshot ( object id, ISessionImplementor session ) : object[]
GetDiscriminatorAlias ( string suffix ) : string
GetFetchMode ( int i ) : FetchMode
GetIdentifier ( object obj, EntityMode entityMode ) : object
GetIdentifierAliases ( string suffix ) : string[]
GetIdentifierType ( int j ) : IType
GetInfoString ( ) : string
GetMappedClass ( EntityMode entityMode ) : Type
GetNaturalIdentifierSnapshot ( object id, ISessionImplementor session ) : object[]
GetPropertyAliases ( string suffix, int i ) : string[]
GetPropertyColumnNames ( int i ) : string[]

Get the column names for the numbered property of this class

GetPropertyColumnNames ( string propertyName ) : string[]
GetPropertyIndex ( string propertyName ) : int
GetPropertyTableName ( string propertyName ) : string
GetPropertyType ( string path ) : IType
GetPropertyValue ( object obj, int i, EntityMode entityMode ) : object
GetPropertyValue ( object obj, string propertyName, EntityMode entityMode ) : object
GetPropertyValues ( object obj, EntityMode entityMode ) : object[]
GetPropertyValuesToInsert ( object obj, IDictionary mergeMap, ISessionImplementor session ) : object[]
GetRootTableAlias ( string drivingAlias ) : string
GetSelectByUniqueKeyString ( string propertyName ) : NHibernate.SqlCommand.SqlString
GetSubclassEntityPersister ( object instance, ISessionFactoryImplementor factory, EntityMode entityMode ) : IEntityPersister
GetSubclassForDiscriminatorValue ( object value ) : string
GetSubclassPropertyColumnAliases ( string propertyName, string suffix ) : string[]
GetSubclassPropertyColumnNames ( int i ) : string[]
GetSubclassPropertyColumnNames ( string propertyName ) : string[]
GetSubclassPropertyDeclarer ( string propertyPath ) : Declarer
GetSubclassPropertyName ( int i ) : string
GetSubclassPropertyTableName ( int i ) : string
GetSubclassPropertyTableNumber ( string propertyPath ) : int Warning: When there are duplicated property names in the subclasses of the class, this method may return the wrong table number for the duplicated subclass property (note that SingleTableEntityPersister defines an overloaded form which takes the entity name.
GetSubclassPropertyType ( int i ) : IType
GetSubclassTableName ( int j ) : string
GetVersion ( object obj, EntityMode entityMode ) : object
GuessEntityMode ( object obj ) : EntityMode?
HasUninitializedLazyProperties ( object obj, EntityMode entityMode ) : bool
Hydrate ( IDataReader rs, object id, object obj, ILoadable rootLoadable, string suffixedPropertyColumns, bool allProperties, ISessionImplementor session ) : object[]

Unmarshall the fields of a persistent instance from a result set, without resolving associations or collections

IdentifierSelectFragment ( string name, string suffix ) : string
ImplementsLifecycle ( EntityMode entityMode ) : bool
ImplementsValidatable ( EntityMode entityMode ) : bool
InitializeLazyProperty ( string fieldName, object entity, ISessionImplementor session ) : object
Insert ( object fields, object obj, ISessionImplementor session ) : object
Insert ( object id, object fields, object obj, ISessionImplementor session ) : void
Instantiate ( object id, EntityMode entityMode ) : object
IsDefinedOnSubclass ( int i ) : bool
IsInstance ( object entity, EntityMode entityMode ) : bool

Determines whether the specified entity is an instance of the class managed by this persister.

IsInstrumented ( EntityMode entityMode ) : bool
IsModifiableEntity ( EntityEntry entry ) : bool
IsSubclassEntityName ( string entityName ) : bool
IsSubclassPropertyNullable ( int i ) : bool
IsTransient ( object entity, ISessionImplementor session ) : bool?
IsUnsavedVersion ( object version ) : bool?
Load ( object id, object optionalObject, LockMode lockMode, ISessionImplementor session ) : object

Load an instance using the appropriate loader (as determined by GetAppropriateLoader

LoadByUniqueKey ( string propertyName, object uniqueKey, ISessionImplementor session ) : object
Lock ( object id, object version, object obj, LockMode lockMode, ISessionImplementor session ) : void
OneToManyFilterFragment ( string alias ) : string
PostInstantiate ( ) : void
ProcessInsertGeneratedProperties ( object id, object entity, object state, ISessionImplementor session ) : void
ProcessUpdateGeneratedProperties ( object id, object entity, object state, ISessionImplementor session ) : void
PropertySelectFragment ( string name, string suffix, bool allProperties ) : string
ResetIdentifier ( object entity, object currentId, object currentVersion, EntityMode entityMode ) : void
SelectFragment ( IJoinable rhs, string rhsAlias, string lhsAlias, string entitySuffix, string collectionSuffix, bool includeCollectionColumns ) : string
SelectFragment ( string alias, string suffix ) : string
SetIdentifier ( object obj, object id, EntityMode entityMode ) : void
SetPropertyValue ( object obj, int i, object value, EntityMode entityMode ) : void
SetPropertyValue ( object obj, string propertyName, object value, EntityMode entityMode ) : void
SetPropertyValues ( object obj, object values, EntityMode entityMode ) : void
ToColumns ( string propertyName ) : string[]
ToColumns ( string name, int i ) : string[]
ToColumns ( string alias, string propertyName ) : string[]
ToIdentifierColumns ( string name ) : string[]
ToString ( ) : string
ToType ( string propertyName ) : IType
TryToType ( string propertyName, IType &type ) : bool
Update ( object id, object fields, int dirtyFields, bool hasDirtyCollection, object oldFields, object oldVersion, object obj, object rowId, ISessionImplementor session ) : void
WhereJoinFragment ( string alias, bool innerJoin, bool includeSubclasses ) : SqlString

Protected Methods

Method Description
AbstractEntityPersister ( NHibernate.Mapping.PersistentClass persistentClass, ICacheConcurrencyStrategy cache, ISessionFactoryImplementor factory ) : System
AddDiscriminatorToInsert ( NHibernate.SqlCommand.SqlInsertBuilder insert ) : void
AddDiscriminatorToSelect ( NHibernate.SqlCommand.SelectFragment select, string name, string suffix ) : void
Check ( int rows, object id, int tableNumber, IExpectation expectation, IDbCommand statement ) : bool
ConcretePropertySelectFragment ( string alias, IInclusionChecker inclusionChecker ) : string
ConcretePropertySelectFragment ( string alias, ValueInclusion inclusions ) : string
ConcretePropertySelectFragment ( string alias, bool includeProperty ) : string
ConcretePropertySelectFragmentSansLeadingComma ( string alias, bool include ) : string
CreateEntityLoader ( LockMode lockMode ) : IUniqueEntityLoader
CreateEntityLoader ( LockMode lockMode, IFilter>.IDictionary enabledFilters ) : IUniqueEntityLoader
CreateFrom ( int tableNumber, String alias ) : string
CreateQueryLoader ( ) : void
CreateSelect ( int subclassColumnNumbers, int subclassFormulaNumbers ) : NHibernate.SqlCommand.SelectFragment
CreateUniqueKeyLoaders ( ) : void
CreateWhereByKey ( int tableNumber, string alias ) : NHibernate.SqlCommand.SqlString
Dehydrate ( object id, object fields, bool includeProperty, bool includeColumns, int j, IDbCommand st, ISessionImplementor session ) : int
Dehydrate ( object id, object fields, object rowId, bool includeProperty, bool includeColumns, int table, IDbCommand statement, ISessionImplementor session, int index ) : int

Marshall the fields of a persistent instance to a prepared statement

GenerateDeleteString ( int j ) : NHibernate.SqlCommand.SqlCommandInfo
GenerateIdentityInsertString ( bool includeProperty ) : NHibernate.SqlCommand.SqlCommandInfo
GenerateInsertGeneratedValuesSelectString ( ) : NHibernate.SqlCommand.SqlString
GenerateInsertString ( bool identityInsert, bool includeProperty ) : NHibernate.SqlCommand.SqlCommandInfo
GenerateInsertString ( bool identityInsert, bool includeProperty, int j ) : NHibernate.SqlCommand.SqlCommandInfo

Generate the SQL that inserts a row

GenerateInsertString ( bool includeProperty, int j ) : NHibernate.SqlCommand.SqlCommandInfo
GenerateLazySelectString ( ) : NHibernate.SqlCommand.SqlString
GenerateLocker ( LockMode lockMode ) : ILockingStrategy
GenerateSQLDeleteStrings ( object loadedState ) : NHibernate.SqlCommand.SqlCommandInfo[]
GenerateSelectVersionString ( ) : NHibernate.SqlCommand.SqlString

Generate the SQL that selects the version number by id

GenerateSnapshotSelectString ( ) : NHibernate.SqlCommand.SqlString
GenerateUpdateGeneratedValuesSelectString ( ) : NHibernate.SqlCommand.SqlString
GenerateUpdateString ( bool includeProperty, int j, bool useRowId ) : NHibernate.SqlCommand.SqlCommandInfo
GenerateUpdateString ( bool includeProperty, int j, object oldFields, bool useRowId ) : NHibernate.SqlCommand.SqlCommandInfo

Generate the SQL that updates a row by id (and version)

GetIdentiferProperty ( int table ) : Tuple.NHibernate.Mapping.Property
GetJoinIdKeyColumns ( int j ) : string[]
GetJoinTableId ( int j, object fields ) : object
GetJoinTableId ( int table, object obj, EntityMode entityMode ) : object
GetKeyColumns ( int table ) : string[]
GetPropertiesToInsert ( object fields ) : bool[]
GetPropertiesToUpdate ( int dirtyProperties, bool hasDirtyCollection ) : bool[]

Transform the array of property indexes to an array of booleans, true when the property is dirty

GetPropertyColumnSpan ( int i ) : int
GetPropertyUpdateability ( object entity, EntityMode entityMode ) : bool[]

Which properties appear in the SQL update? (Initialized, updateable ones!)

GetRefIdColumnOfTable ( int table ) : int?
GetSQLWhereString ( string alias ) : string
GetSequentialSelect ( string entityName ) : NHibernate.SqlCommand.SqlString
GetSubclassPropertyTableNumber ( int i ) : int
GetSubclassTableKeyColumns ( int j ) : string[]
GetTableName ( int table ) : string
GetTableUpdateNeeded ( int dirtyProperties, bool hasDirtyCollection ) : bool[]

Decide which tables need to be updated

The return here is an array of boolean values with each index corresponding to a given table in the scope of this persister.

GetTuplizer ( EntityMode entityMode ) : IEntityTuplizer
GetTuplizer ( ISessionImplementor session ) : IEntityTuplizer
InitLockers ( ) : void
InitSubclassPropertyAliasesMap ( NHibernate.Mapping.PersistentClass model ) : void

Must be called by subclasses, at the end of their constructors

Insert ( object fields, bool notNull, NHibernate.SqlCommand.SqlCommandInfo sql, object obj, ISessionImplementor session ) : object

Perform an SQL INSERT, and then retrieve a generated identifier.

This form is used for PostInsertIdentifierGenerator-style ids (IDENTITY, select, etc).

Insert ( object id, object fields, bool notNull, int j, NHibernate.SqlCommand.SqlCommandInfo sql, object obj, ISessionImplementor session ) : void

Perform an SQL INSERT.

This for is used for all non-root tables as well as the root table in cases where the identifier value is known before the insert occurs.

IsClassOrSuperclassTable ( int j ) : bool
IsDeleteCallable ( int j ) : bool
IsIdOfTable ( int property, int table ) : bool
IsInsertCallable ( int j ) : bool
IsInverseSubclassTable ( int j ) : bool
IsInverseTable ( int j ) : bool
IsNullableSubclassTable ( int j ) : bool
IsNullableTable ( int j ) : bool
IsPropertyOfTable ( int property, int table ) : bool
IsSubclassPropertyDeferred ( string propertyName, string entityName ) : bool
IsSubclassTableLazy ( int j ) : bool
IsSubclassTableSequentialSelect ( int table ) : bool
IsTableCascadeDeleteEnabled ( int j ) : bool
IsUpdateCallable ( int j ) : bool
LogStaticSQL ( ) : void
PostConstruct ( IMapping mapping ) : void
RenderSelect ( int tableNumbers, int columnNumbers, int formulaNumbers ) : SqlString
Update ( object id, object fields, object oldFields, object rowId, bool includeProperty, int j, object oldVersion, object obj, SqlCommandInfo sql, ISessionImplementor session ) : bool
UpdateOrInsert ( object id, object fields, object oldFields, object rowId, bool includeProperty, int j, object oldVersion, object obj, SqlCommandInfo sql, ISessionImplementor session ) : void

Perform an SQL UPDATE or SQL INSERT

UseGetGeneratedKeys ( ) : bool
UseInsertSelectIdentity ( ) : bool

Private Methods

Method Description
CheckVersion ( bool includeProperty ) : bool
CreateJoin ( int tableNumbers, string drivingAlias ) : NHibernate.SqlCommand.JoinFragment
CreateJoin ( string name, bool innerjoin, bool includeSubclasses ) : NHibernate.SqlCommand.JoinFragment
CreateLoaders ( ) : void
CreateUniqueKeyLoader ( IType uniqueKeyType, string columns, IFilter>.IDictionary enabledFilters ) : NHibernate.Loader.Entity.EntityLoader
GenerateGeneratedValuesSelectString ( ValueInclusion inclusions ) : NHibernate.SqlCommand.SqlString
GenerateVersionIncrementUpdateString ( ) : NHibernate.SqlCommand.SqlCommandInfo
GetAppropriateLoader ( LockMode lockMode, ISessionImplementor session ) : IUniqueEntityLoader
GetAppropriateUniqueKeyLoader ( string propertyName, IFilter>.IDictionary enabledFilters ) : NHibernate.Loader.Entity.EntityLoader
GetColumnsToTableAliasMap ( string rootAlias ) : string>.IDictionary
GetLocker ( LockMode lockMode ) : ILockingStrategy
GetSubclassEntityName ( System clazz ) : string
GetSubclassPropertyIndex ( string propertyName ) : int
GetUpdateStrings ( bool byRowId, bool lazy ) : NHibernate.SqlCommand.SqlCommandInfo[]
HasIdentifierMapper ( ) : bool
InitDiscriminatorPropertyPath ( ) : void
InitIdentifierPropertyPaths ( IMapping mapping ) : void
InitOrdinaryPropertyPaths ( IMapping mapping ) : void
InitPropertyPaths ( IMapping mapping ) : void
InitializeLazyPropertiesFromCache ( string fieldName, object entity, ISessionImplementor session, EntityEntry entry, CacheEntry cacheEntry ) : object
InitializeLazyPropertiesFromDatastore ( string fieldName, object entity, ISessionImplementor session, object id, EntityEntry entry ) : object
InitializeLazyProperty ( string fieldName, object entity, ISessionImplementor session, object snapshot, int j, object propValue ) : bool
InternalInitSubclassPropertyAliasesMap ( string path, IEnumerable col ) : void
IsAllNull ( object array, int tableNumber ) : bool
LocateVersionType ( ) : IVersionType
LogDirtyProperties ( int props ) : void
ProcessGeneratedPropertiesWithGeneratedSql ( object id, object entity, object state, ISessionImplementor session, NHibernate.SqlCommand.SqlString selectionSQL, ValueInclusion generationInclusions ) : void
ProcessGeneratedPropertiesWithLoader ( object id, object entity, ISessionImplementor session ) : void

Method Details

AbstractEntityPersister() protected method

protected AbstractEntityPersister ( NHibernate.Mapping.PersistentClass persistentClass, ICacheConcurrencyStrategy cache, ISessionFactoryImplementor factory ) : System
persistentClass NHibernate.Mapping.PersistentClass
cache ICacheConcurrencyStrategy
factory ISessionFactoryImplementor
return System

AddDiscriminatorToInsert() protected method

protected AddDiscriminatorToInsert ( NHibernate.SqlCommand.SqlInsertBuilder insert ) : void
insert NHibernate.SqlCommand.SqlInsertBuilder
return void

AddDiscriminatorToSelect() protected method

protected AddDiscriminatorToSelect ( NHibernate.SqlCommand.SelectFragment select, string name, string suffix ) : void
select NHibernate.SqlCommand.SelectFragment
name string
suffix string
return void

AfterInitialize() public method

public AfterInitialize ( object entity, bool lazyPropertiesAreUnfetched, ISessionImplementor session ) : void
entity object
lazyPropertiesAreUnfetched bool
session ISessionImplementor
return void

AfterReassociate() public method

public AfterReassociate ( object entity, ISessionImplementor session ) : void
entity object
session ISessionImplementor
return void

Check() protected method

protected Check ( int rows, object id, int tableNumber, IExpectation expectation, IDbCommand statement ) : bool
rows int
id object
tableNumber int
expectation IExpectation
statement IDbCommand
return bool

ConcretePropertySelectFragment() protected method

protected ConcretePropertySelectFragment ( string alias, IInclusionChecker inclusionChecker ) : string
alias string
inclusionChecker IInclusionChecker
return string

ConcretePropertySelectFragment() protected method

protected ConcretePropertySelectFragment ( string alias, ValueInclusion inclusions ) : string
alias string
inclusions ValueInclusion
return string

ConcretePropertySelectFragment() protected method

protected ConcretePropertySelectFragment ( string alias, bool includeProperty ) : string
alias string
includeProperty bool
return string

ConcretePropertySelectFragmentSansLeadingComma() protected method

protected ConcretePropertySelectFragmentSansLeadingComma ( string alias, bool include ) : string
alias string
include bool
return string

ConsumesCollectionAlias() public method

public ConsumesCollectionAlias ( ) : bool
return bool

ConsumesEntityAlias() public method

public ConsumesEntityAlias ( ) : bool
return bool

CountSubclassProperties() public method

public CountSubclassProperties ( ) : int
return int

CreateEntityLoader() protected method

protected CreateEntityLoader ( LockMode lockMode ) : IUniqueEntityLoader
lockMode LockMode
return IUniqueEntityLoader

CreateEntityLoader() protected method

protected CreateEntityLoader ( LockMode lockMode, IFilter>.IDictionary enabledFilters ) : IUniqueEntityLoader
lockMode LockMode
enabledFilters IFilter>.IDictionary
return IUniqueEntityLoader

CreateFrom() protected method

protected CreateFrom ( int tableNumber, String alias ) : string
tableNumber int
alias String
return string

CreateProxy() public method

public CreateProxy ( object id, ISessionImplementor session ) : object
id object
session ISessionImplementor
return object

CreateQueryLoader() protected method

protected CreateQueryLoader ( ) : void
return void

CreateSelect() protected method

protected CreateSelect ( int subclassColumnNumbers, int subclassFormulaNumbers ) : NHibernate.SqlCommand.SelectFragment
subclassColumnNumbers int
subclassFormulaNumbers int
return NHibernate.SqlCommand.SelectFragment

CreateUniqueKeyLoaders() protected method

protected CreateUniqueKeyLoaders ( ) : void
return void

CreateWhereByKey() protected method

protected CreateWhereByKey ( int tableNumber, string alias ) : NHibernate.SqlCommand.SqlString
tableNumber int
alias string
return NHibernate.SqlCommand.SqlString

Dehydrate() protected method

protected Dehydrate ( object id, object fields, bool includeProperty, bool includeColumns, int j, IDbCommand st, ISessionImplementor session ) : int
id object
fields object
includeProperty bool
includeColumns bool
j int
st IDbCommand
session ISessionImplementor
return int

Dehydrate() protected method

Marshall the fields of a persistent instance to a prepared statement
protected Dehydrate ( object id, object fields, object rowId, bool includeProperty, bool includeColumns, int table, IDbCommand statement, ISessionImplementor session, int index ) : int
id object
fields object
rowId object
includeProperty bool
includeColumns bool
table int
statement IDbCommand
session ISessionImplementor
index int
return int

Delete() public method

Perform an SQL DELETE
public Delete ( object id, object version, int j, object obj, NHibernate.SqlCommand.SqlCommandInfo sql, ISessionImplementor session, object loadedState ) : void
id object
version object
j int
obj object
sql NHibernate.SqlCommand.SqlCommandInfo
session ISessionImplementor
loadedState object
return void

Delete() public method

public Delete ( object id, object version, object obj, ISessionImplementor session ) : void
id object
version object
obj object
session ISessionImplementor
return void

FilterFragment() public abstract method

public abstract FilterFragment ( string alias ) : string
alias string
return string

FilterFragment() public method

public FilterFragment ( string alias, IFilter>.IDictionary enabledFilters ) : string
alias string
enabledFilters IFilter>.IDictionary
return string

FindDirty() public method

public FindDirty ( object currentState, object previousState, object entity, ISessionImplementor session ) : int[]
currentState object
previousState object
entity object
session ISessionImplementor
return int[]

FindModified() public method

public FindModified ( object old, object current, object entity, ISessionImplementor session ) : int[]
old object
current object
entity object
session ISessionImplementor
return int[]

ForceVersionIncrement() public method

public ForceVersionIncrement ( object id, object currentVersion, ISessionImplementor session ) : object
id object
currentVersion object
session ISessionImplementor
return object

FromJoinFragment() public method

public FromJoinFragment ( string alias, bool innerJoin, bool includeSubclasses ) : NHibernate.SqlCommand.SqlString
alias string
innerJoin bool
includeSubclasses bool
return NHibernate.SqlCommand.SqlString

FromTableFragment() public abstract method

public abstract FromTableFragment ( string alias ) : string
alias string
return string

GenerateDeleteString() protected method

protected GenerateDeleteString ( int j ) : NHibernate.SqlCommand.SqlCommandInfo
j int
return NHibernate.SqlCommand.SqlCommandInfo

GenerateFilterConditionAlias() public method

public GenerateFilterConditionAlias ( string rootAlias ) : string
rootAlias string
return string

GenerateIdentityInsertString() protected method

protected GenerateIdentityInsertString ( bool includeProperty ) : NHibernate.SqlCommand.SqlCommandInfo
includeProperty bool
return NHibernate.SqlCommand.SqlCommandInfo

GenerateInsertGeneratedValuesSelectString() protected method

protected GenerateInsertGeneratedValuesSelectString ( ) : NHibernate.SqlCommand.SqlString
return NHibernate.SqlCommand.SqlString

GenerateInsertString() protected method

protected GenerateInsertString ( bool identityInsert, bool includeProperty ) : NHibernate.SqlCommand.SqlCommandInfo
identityInsert bool
includeProperty bool
return NHibernate.SqlCommand.SqlCommandInfo

GenerateInsertString() protected method

Generate the SQL that inserts a row
protected GenerateInsertString ( bool identityInsert, bool includeProperty, int j ) : NHibernate.SqlCommand.SqlCommandInfo
identityInsert bool
includeProperty bool
j int
return NHibernate.SqlCommand.SqlCommandInfo

GenerateInsertString() protected method

protected GenerateInsertString ( bool includeProperty, int j ) : NHibernate.SqlCommand.SqlCommandInfo
includeProperty bool
j int
return NHibernate.SqlCommand.SqlCommandInfo

GenerateLazySelectString() protected method

protected GenerateLazySelectString ( ) : NHibernate.SqlCommand.SqlString
return NHibernate.SqlCommand.SqlString

GenerateLocker() protected method

protected GenerateLocker ( LockMode lockMode ) : ILockingStrategy
lockMode LockMode
return ILockingStrategy

GenerateSQLDeleteStrings() protected method

protected GenerateSQLDeleteStrings ( object loadedState ) : NHibernate.SqlCommand.SqlCommandInfo[]
loadedState object
return NHibernate.SqlCommand.SqlCommandInfo[]

GenerateSelectVersionString() protected method

Generate the SQL that selects the version number by id
protected GenerateSelectVersionString ( ) : NHibernate.SqlCommand.SqlString
return NHibernate.SqlCommand.SqlString

GenerateSnapshotSelectString() protected method

protected GenerateSnapshotSelectString ( ) : NHibernate.SqlCommand.SqlString
return NHibernate.SqlCommand.SqlString

GenerateTableAlias() public method

public GenerateTableAlias ( string rootAlias, int tableNumber ) : string
rootAlias string
tableNumber int
return string

GenerateTableAliasForColumn() public method

public GenerateTableAliasForColumn ( string rootAlias, string column ) : string
rootAlias string
column string
return string

GenerateUpdateGeneratedValuesSelectString() protected method

protected GenerateUpdateGeneratedValuesSelectString ( ) : NHibernate.SqlCommand.SqlString
return NHibernate.SqlCommand.SqlString

GenerateUpdateString() protected method

protected GenerateUpdateString ( bool includeProperty, int j, bool useRowId ) : NHibernate.SqlCommand.SqlCommandInfo
includeProperty bool
j int
useRowId bool
return NHibernate.SqlCommand.SqlCommandInfo

GenerateUpdateString() protected method

Generate the SQL that updates a row by id (and version)
protected GenerateUpdateString ( bool includeProperty, int j, object oldFields, bool useRowId ) : NHibernate.SqlCommand.SqlCommandInfo
includeProperty bool
j int
oldFields object
useRowId bool
return NHibernate.SqlCommand.SqlCommandInfo

GetCascadeStyle() public method

public GetCascadeStyle ( int i ) : CascadeStyle
i int
return NHibernate.Engine.CascadeStyle

GetConcreteProxyClass() public method

public GetConcreteProxyClass ( EntityMode entityMode ) : Type
entityMode EntityMode
return System.Type

GetCurrentVersion() public method

Retrieve the version number
public GetCurrentVersion ( object id, ISessionImplementor session ) : object
id object
session ISessionImplementor
return object

GetDatabaseSnapshot() public method

public GetDatabaseSnapshot ( object id, ISessionImplementor session ) : object[]
id object
session ISessionImplementor
return object[]

GetDiscriminatorAlias() public method

public GetDiscriminatorAlias ( string suffix ) : string
suffix string
return string

GetFetchMode() public method

public GetFetchMode ( int i ) : FetchMode
i int
return FetchMode

GetIdentiferProperty() protected method

protected GetIdentiferProperty ( int table ) : Tuple.NHibernate.Mapping.Property
table int
return Tuple.NHibernate.Mapping.Property

GetIdentifier() public method

public GetIdentifier ( object obj, EntityMode entityMode ) : object
obj object
entityMode EntityMode
return object

GetIdentifierAliases() public method

public GetIdentifierAliases ( string suffix ) : string[]
suffix string
return string[]

GetIdentifierType() public method

public GetIdentifierType ( int j ) : IType
j int
return IType

GetInfoString() public method

public GetInfoString ( ) : string
return string

GetJoinIdKeyColumns() protected method

protected GetJoinIdKeyColumns ( int j ) : string[]
j int
return string[]

GetJoinTableId() protected method

protected GetJoinTableId ( int j, object fields ) : object
j int
fields object
return object

GetJoinTableId() protected method

protected GetJoinTableId ( int table, object obj, EntityMode entityMode ) : object
table int
obj object
entityMode EntityMode
return object

GetKeyColumns() protected abstract method

protected abstract GetKeyColumns ( int table ) : string[]
table int
return string[]

GetMappedClass() public method

public GetMappedClass ( EntityMode entityMode ) : Type
entityMode EntityMode
return System.Type

GetNaturalIdentifierSnapshot() public method

public GetNaturalIdentifierSnapshot ( object id, ISessionImplementor session ) : object[]
id object
session ISessionImplementor
return object[]

GetPropertiesToInsert() protected method

protected GetPropertiesToInsert ( object fields ) : bool[]
fields object
return bool[]

GetPropertiesToUpdate() protected method

Transform the array of property indexes to an array of booleans, true when the property is dirty
protected GetPropertiesToUpdate ( int dirtyProperties, bool hasDirtyCollection ) : bool[]
dirtyProperties int
hasDirtyCollection bool
return bool[]

GetPropertyAliases() public method

public GetPropertyAliases ( string suffix, int i ) : string[]
suffix string
i int
return string[]

GetPropertyColumnNames() public method

Get the column names for the numbered property of this class
public GetPropertyColumnNames ( int i ) : string[]
i int
return string[]

GetPropertyColumnNames() public method

public GetPropertyColumnNames ( string propertyName ) : string[]
propertyName string
return string[]

GetPropertyColumnSpan() protected method

protected GetPropertyColumnSpan ( int i ) : int
i int
return int

GetPropertyIndex() public method

public GetPropertyIndex ( string propertyName ) : int
propertyName string
return int

GetPropertyTableName() public abstract method

public abstract GetPropertyTableName ( string propertyName ) : string
propertyName string
return string

GetPropertyType() public method

public GetPropertyType ( string path ) : IType
path string
return IType

GetPropertyUpdateability() protected method

Which properties appear in the SQL update? (Initialized, updateable ones!)
protected GetPropertyUpdateability ( object entity, EntityMode entityMode ) : bool[]
entity object
entityMode EntityMode
return bool[]

GetPropertyValue() public method

public GetPropertyValue ( object obj, int i, EntityMode entityMode ) : object
obj object
i int
entityMode EntityMode
return object

GetPropertyValue() public method

public GetPropertyValue ( object obj, string propertyName, EntityMode entityMode ) : object
obj object
propertyName string
entityMode EntityMode
return object

GetPropertyValues() public method

public GetPropertyValues ( object obj, EntityMode entityMode ) : object[]
obj object
entityMode EntityMode
return object[]

GetPropertyValuesToInsert() public method

public GetPropertyValuesToInsert ( object obj, IDictionary mergeMap, ISessionImplementor session ) : object[]
obj object
mergeMap IDictionary
session ISessionImplementor
return object[]

GetRefIdColumnOfTable() protected method

protected GetRefIdColumnOfTable ( int table ) : int?
table int
return int?

GetRootTableAlias() public method

public GetRootTableAlias ( string drivingAlias ) : string
drivingAlias string
return string

GetSQLWhereString() protected method

protected GetSQLWhereString ( string alias ) : string
alias string
return string

GetSelectByUniqueKeyString() public method

public GetSelectByUniqueKeyString ( string propertyName ) : NHibernate.SqlCommand.SqlString
propertyName string
return NHibernate.SqlCommand.SqlString

GetSequentialSelect() protected method

protected GetSequentialSelect ( string entityName ) : NHibernate.SqlCommand.SqlString
entityName string
return NHibernate.SqlCommand.SqlString

GetSubclassEntityPersister() public method

public GetSubclassEntityPersister ( object instance, ISessionFactoryImplementor factory, EntityMode entityMode ) : IEntityPersister
instance object
factory ISessionFactoryImplementor
entityMode EntityMode
return IEntityPersister

GetSubclassForDiscriminatorValue() public abstract method

public abstract GetSubclassForDiscriminatorValue ( object value ) : string
value object
return string

GetSubclassPropertyColumnAliases() public method

public GetSubclassPropertyColumnAliases ( string propertyName, string suffix ) : string[]
propertyName string
suffix string
return string[]

GetSubclassPropertyColumnNames() public method

public GetSubclassPropertyColumnNames ( int i ) : string[]
i int
return string[]

GetSubclassPropertyColumnNames() public method

public GetSubclassPropertyColumnNames ( string propertyName ) : string[]
propertyName string
return string[]

GetSubclassPropertyDeclarer() public method

public GetSubclassPropertyDeclarer ( string propertyPath ) : Declarer
propertyPath string
return Declarer

GetSubclassPropertyName() public method

public GetSubclassPropertyName ( int i ) : string
i int
return string

GetSubclassPropertyTableName() public abstract method

public abstract GetSubclassPropertyTableName ( int i ) : string
i int
return string

GetSubclassPropertyTableNumber() protected abstract method

protected abstract GetSubclassPropertyTableNumber ( int i ) : int
i int
return int

GetSubclassPropertyTableNumber() public method

Warning: When there are duplicated property names in the subclasses of the class, this method may return the wrong table number for the duplicated subclass property (note that SingleTableEntityPersister defines an overloaded form which takes the entity name.
public GetSubclassPropertyTableNumber ( string propertyPath ) : int
propertyPath string
return int

GetSubclassPropertyType() public method

public GetSubclassPropertyType ( int i ) : IType
i int
return IType

GetSubclassTableKeyColumns() protected abstract method

protected abstract GetSubclassTableKeyColumns ( int j ) : string[]
j int
return string[]

GetSubclassTableName() public abstract method

public abstract GetSubclassTableName ( int j ) : string
j int
return string

GetTableName() protected abstract method

protected abstract GetTableName ( int table ) : string
table int
return string

GetTableUpdateNeeded() protected method

Decide which tables need to be updated
The return here is an array of boolean values with each index corresponding to a given table in the scope of this persister.
protected GetTableUpdateNeeded ( int dirtyProperties, bool hasDirtyCollection ) : bool[]
dirtyProperties int The indices of all the entity properties considered dirty.
hasDirtyCollection bool Whether any collections owned by the entity which were considered dirty.
return bool[]

GetTuplizer() protected method

protected GetTuplizer ( EntityMode entityMode ) : IEntityTuplizer
entityMode EntityMode
return IEntityTuplizer

GetTuplizer() protected method

protected GetTuplizer ( ISessionImplementor session ) : IEntityTuplizer
session ISessionImplementor
return IEntityTuplizer

GetVersion() public method

public GetVersion ( object obj, EntityMode entityMode ) : object
obj object
entityMode EntityMode
return object

GuessEntityMode() public method

public GuessEntityMode ( object obj ) : EntityMode?
obj object
return EntityMode?

HasUninitializedLazyProperties() public method

public HasUninitializedLazyProperties ( object obj, EntityMode entityMode ) : bool
obj object
entityMode EntityMode
return bool

Hydrate() public method

Unmarshall the fields of a persistent instance from a result set, without resolving associations or collections
public Hydrate ( IDataReader rs, object id, object obj, ILoadable rootLoadable, string suffixedPropertyColumns, bool allProperties, ISessionImplementor session ) : object[]
rs IDataReader
id object
obj object
rootLoadable ILoadable
suffixedPropertyColumns string
allProperties bool
session ISessionImplementor
return object[]

IdentifierSelectFragment() public method

public IdentifierSelectFragment ( string name, string suffix ) : string
name string
suffix string
return string

ImplementsLifecycle() public method

public ImplementsLifecycle ( EntityMode entityMode ) : bool
entityMode EntityMode
return bool

ImplementsValidatable() public method

public ImplementsValidatable ( EntityMode entityMode ) : bool
entityMode EntityMode
return bool

InitLockers() protected method

protected InitLockers ( ) : void
return void

InitSubclassPropertyAliasesMap() protected method

Must be called by subclasses, at the end of their constructors
protected InitSubclassPropertyAliasesMap ( NHibernate.Mapping.PersistentClass model ) : void
model NHibernate.Mapping.PersistentClass
return void

InitializeLazyProperty() public method

public InitializeLazyProperty ( string fieldName, object entity, ISessionImplementor session ) : object
fieldName string
entity object
session ISessionImplementor
return object

Insert() protected method

Perform an SQL INSERT, and then retrieve a generated identifier.
This form is used for PostInsertIdentifierGenerator-style ids (IDENTITY, select, etc).
protected Insert ( object fields, bool notNull, NHibernate.SqlCommand.SqlCommandInfo sql, object obj, ISessionImplementor session ) : object
fields object
notNull bool
sql NHibernate.SqlCommand.SqlCommandInfo
obj object
session ISessionImplementor
return object

Insert() public method

public Insert ( object fields, object obj, ISessionImplementor session ) : object
fields object
obj object
session ISessionImplementor
return object

Insert() protected method

Perform an SQL INSERT.
This for is used for all non-root tables as well as the root table in cases where the identifier value is known before the insert occurs.
protected Insert ( object id, object fields, bool notNull, int j, NHibernate.SqlCommand.SqlCommandInfo sql, object obj, ISessionImplementor session ) : void
id object
fields object
notNull bool
j int
sql NHibernate.SqlCommand.SqlCommandInfo
obj object
session ISessionImplementor
return void

Insert() public method

public Insert ( object id, object fields, object obj, ISessionImplementor session ) : void
id object
fields object
obj object
session ISessionImplementor
return void

Instantiate() public method

public Instantiate ( object id, EntityMode entityMode ) : object
id object
entityMode EntityMode
return object

IsClassOrSuperclassTable() protected abstract method

protected abstract IsClassOrSuperclassTable ( int j ) : bool
j int
return bool

IsDefinedOnSubclass() public method

public IsDefinedOnSubclass ( int i ) : bool
i int
return bool

IsDeleteCallable() protected method

protected IsDeleteCallable ( int j ) : bool
j int
return bool

IsIdOfTable() protected method

protected IsIdOfTable ( int property, int table ) : bool
property int
table int
return bool

IsInsertCallable() protected method

protected IsInsertCallable ( int j ) : bool
j int
return bool

IsInstance() public method

Determines whether the specified entity is an instance of the class managed by this persister.
public IsInstance ( object entity, EntityMode entityMode ) : bool
entity object The entity.
entityMode EntityMode The entity mode.
return bool

IsInstrumented() public method

public IsInstrumented ( EntityMode entityMode ) : bool
entityMode EntityMode
return bool

IsInverseSubclassTable() protected method

protected IsInverseSubclassTable ( int j ) : bool
j int
return bool

IsInverseTable() protected method

protected IsInverseTable ( int j ) : bool
j int
return bool

IsModifiableEntity() public method

public IsModifiableEntity ( EntityEntry entry ) : bool
entry EntityEntry
return bool

IsNullableSubclassTable() protected method

protected IsNullableSubclassTable ( int j ) : bool
j int
return bool

IsNullableTable() protected method

protected IsNullableTable ( int j ) : bool
j int
return bool

IsPropertyOfTable() protected abstract method

protected abstract IsPropertyOfTable ( int property, int table ) : bool
property int
table int
return bool

IsSubclassEntityName() public method

public IsSubclassEntityName ( string entityName ) : bool
entityName string
return bool

IsSubclassPropertyDeferred() protected method

protected IsSubclassPropertyDeferred ( string propertyName, string entityName ) : bool
propertyName string
entityName string
return bool

IsSubclassPropertyNullable() public method

public IsSubclassPropertyNullable ( int i ) : bool
i int
return bool

IsSubclassTableLazy() protected method

protected IsSubclassTableLazy ( int j ) : bool
j int
return bool

IsSubclassTableSequentialSelect() protected method

protected IsSubclassTableSequentialSelect ( int table ) : bool
table int
return bool

IsTableCascadeDeleteEnabled() protected abstract method

protected abstract IsTableCascadeDeleteEnabled ( int j ) : bool
j int
return bool

IsTransient() public method

public IsTransient ( object entity, ISessionImplementor session ) : bool?
entity object
session ISessionImplementor
return bool?

IsUnsavedVersion() public method

public IsUnsavedVersion ( object version ) : bool?
version object
return bool?

IsUpdateCallable() protected method

protected IsUpdateCallable ( int j ) : bool
j int
return bool

Load() public method

Load an instance using the appropriate loader (as determined by GetAppropriateLoader
public Load ( object id, object optionalObject, LockMode lockMode, ISessionImplementor session ) : object
id object
optionalObject object
lockMode LockMode
session ISessionImplementor
return object

LoadByUniqueKey() public method

public LoadByUniqueKey ( string propertyName, object uniqueKey, ISessionImplementor session ) : object
propertyName string
uniqueKey object
session ISessionImplementor
return object

Lock() public method

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

LogStaticSQL() protected method

protected LogStaticSQL ( ) : void
return void

OneToManyFilterFragment() public method

public OneToManyFilterFragment ( string alias ) : string
alias string
return string

PostConstruct() protected method

protected PostConstruct ( IMapping mapping ) : void
mapping IMapping
return void

PostInstantiate() public method

public PostInstantiate ( ) : void
return void

ProcessInsertGeneratedProperties() public method

public ProcessInsertGeneratedProperties ( object id, object entity, object state, ISessionImplementor session ) : void
id object
entity object
state object
session ISessionImplementor
return void

ProcessUpdateGeneratedProperties() public method

public ProcessUpdateGeneratedProperties ( object id, object entity, object state, ISessionImplementor session ) : void
id object
entity object
state object
session ISessionImplementor
return void

PropertySelectFragment() public method

public PropertySelectFragment ( string name, string suffix, bool allProperties ) : string
name string
suffix string
allProperties bool
return string

RenderSelect() protected method

protected RenderSelect ( int tableNumbers, int columnNumbers, int formulaNumbers ) : SqlString
tableNumbers int
columnNumbers int
formulaNumbers int
return SqlString

ResetIdentifier() public method

public ResetIdentifier ( object entity, object currentId, object currentVersion, EntityMode entityMode ) : void
entity object
currentId object
currentVersion object
entityMode EntityMode
return void

SelectFragment() public method

public SelectFragment ( IJoinable rhs, string rhsAlias, string lhsAlias, string entitySuffix, string collectionSuffix, bool includeCollectionColumns ) : string
rhs IJoinable
rhsAlias string
lhsAlias string
entitySuffix string
collectionSuffix string
includeCollectionColumns bool
return string

SelectFragment() public method

public SelectFragment ( string alias, string suffix ) : string
alias string
suffix string
return string

SetIdentifier() public method

public SetIdentifier ( object obj, object id, EntityMode entityMode ) : void
obj object
id object
entityMode EntityMode
return void

SetPropertyValue() public method

public SetPropertyValue ( object obj, int i, object value, EntityMode entityMode ) : void
obj object
i int
value object
entityMode EntityMode
return void

SetPropertyValue() public method

public SetPropertyValue ( object obj, string propertyName, object value, EntityMode entityMode ) : void
obj object
propertyName string
value object
entityMode EntityMode
return void

SetPropertyValues() public method

public SetPropertyValues ( object obj, object values, EntityMode entityMode ) : void
obj object
values object
entityMode EntityMode
return void

ToColumns() public method

public ToColumns ( string propertyName ) : string[]
propertyName string
return string[]

ToColumns() public method

public ToColumns ( string name, int i ) : string[]
name string
i int
return string[]

ToColumns() public method

public ToColumns ( string alias, string propertyName ) : string[]
alias string
propertyName string
return string[]

ToIdentifierColumns() public method

public ToIdentifierColumns ( string name ) : string[]
name string
return string[]

ToString() public method

public ToString ( ) : string
return string

ToType() public method

public ToType ( string propertyName ) : IType
propertyName string
return IType

TryToType() public method

public TryToType ( string propertyName, IType &type ) : bool
propertyName string
type IType
return bool

Update() protected method

protected Update ( object id, object fields, object oldFields, object rowId, bool includeProperty, int j, object oldVersion, object obj, SqlCommandInfo sql, ISessionImplementor session ) : bool
id object
fields object
oldFields object
rowId object
includeProperty bool
j int
oldVersion object
obj object
sql SqlCommandInfo
session ISessionImplementor
return bool

Update() public method

public Update ( object id, object fields, int dirtyFields, bool hasDirtyCollection, object oldFields, object oldVersion, object obj, object rowId, ISessionImplementor session ) : void
id object
fields object
dirtyFields int
hasDirtyCollection bool
oldFields object
oldVersion object
obj object
rowId object
session ISessionImplementor
return void

UpdateOrInsert() protected method

Perform an SQL UPDATE or SQL INSERT
protected UpdateOrInsert ( object id, object fields, object oldFields, object rowId, bool includeProperty, int j, object oldVersion, object obj, SqlCommandInfo sql, ISessionImplementor session ) : void
id object
fields object
oldFields object
rowId object
includeProperty bool
j int
oldVersion object
obj object
sql SqlCommandInfo
session ISessionImplementor
return void

UseGetGeneratedKeys() protected method

protected UseGetGeneratedKeys ( ) : bool
return bool

UseInsertSelectIdentity() protected method

protected UseInsertSelectIdentity ( ) : bool
return bool

WhereJoinFragment() public method

public WhereJoinFragment ( string alias, bool innerJoin, bool includeSubclasses ) : SqlString
alias string
innerJoin bool
includeSubclasses bool
return SqlString

Property Details

customSQLDelete protected_oe property

protected SqlString[] customSQLDelete
return SqlString[]

customSQLInsert protected_oe property

protected SqlString[] customSQLInsert
return SqlString[]

customSQLUpdate protected_oe property

protected SqlString[] customSQLUpdate
return SqlString[]

deleteCallable protected_oe property

protected bool[] deleteCallable
return bool[]

deleteResultCheckStyles protected_oe property

protected ExecuteUpdateResultCheckStyle[] deleteResultCheckStyles
return ExecuteUpdateResultCheckStyle[]

insertCallable protected_oe property

protected bool[] insertCallable
return bool[]

insertResultCheckStyles protected_oe property

protected ExecuteUpdateResultCheckStyle[] insertResultCheckStyles
return ExecuteUpdateResultCheckStyle[]

propertyDefinedOnSubclass protected_oe property

protected bool[] propertyDefinedOnSubclass
return bool[]

propertyMapping protected_oe property

protected BasicEntityPropertyMapping propertyMapping
return BasicEntityPropertyMapping

rowIdName protected_oe property

protected string rowIdName
return string

updateCallable protected_oe property

protected bool[] updateCallable
return bool[]

updateResultCheckStyles protected_oe property

protected ExecuteUpdateResultCheckStyle[] updateResultCheckStyles
return ExecuteUpdateResultCheckStyle[]