Method | Description | |
---|---|---|
Count ( |
Returns the number of records of the specified type in the database
|
|
Count ( |
Returns the number of records of the specified type in the database
|
|
Create ( object instance ) : void |
Creates (Saves) a new instance to the database.
|
|
CreateAndFlush ( object instance ) : void |
Creates (Saves) a new instance to the database and flushes the session.
|
|
Delete ( object instance ) : void |
Deletes the instance from the database.
|
|
DeleteAll ( |
Deletes all targetType objects, based on the primary keys supplied on pkValues.
|
|
DeleteAll ( |
Deletes all entities of the specified type (and their inheritors)
|
|
DeleteAll ( |
Deletes all entities of specified type that match the HQL where clause
|
|
DeleteAndFlush ( object instance ) : void |
Deletes the instance from the database and flushes the session.
|
|
EnumerateQuery ( IActiveRecordQuery q ) : IEnumerable |
Enumerates the query. Note: Only use if you expect most of the values to be on the second level cache
|
|
Execute ( |
Invokes the specified delegate passing a valid NHibernate session. Used for custom NHibernate queries.
|
|
ExecuteQuery ( IActiveRecordQuery q ) : object |
Executes the query
|
|
Exists ( |
Check if there is any records in the db for the target type
|
|
Exists ( |
Check if any instance matching the criteria exists in the database.
|
|
Exists ( |
Check if the id exists in the database.
|
|
Exists ( |
Check if there is any records in the db for the target type
|
|
FindAll ( |
Returns all instances found for the specified type.
|
|
FindAll ( |
Returns all instances found for the specified type according to the criteria
|
|
FindAll ( |
Returns all instances found for the specified type using sort orders and criterias.
|
|
FindAllByProperty ( |
Finds records based on a property value - automatically converts null values to IS NULL style queries.
|
|
FindAllByProperty ( |
Finds records based on a property value - automatically converts null values to IS NULL style queries.
|
|
FindByPrimaryKey ( |
Finds an object instance by its primary key.
|
|
FindByPrimaryKey ( |
Finds an object instance by its primary key.
|
|
FindFirst ( |
Searches and returns the first row.
|
|
FindFirst ( |
Searches and returns the first row.
|
|
FindFirst ( |
Searches and returns the first row.
|
|
FindOne ( |
Searches and returns the a row. If more than one is found, throws ActiveRecordException
|
|
GetSessionFactoryHolder ( ) : ISessionFactoryHolder |
Testing hock only.
|
|
Refresh ( object instance ) : void |
Refresh the instance from the database.
|
|
Replicate ( object instance, NHibernate.ReplicationMode replicationMode ) : void |
From NHibernate documentation: Persist all reachable transient objects, reusing the current identifier values. Note that this will not trigger the Interceptor of the Session.
|
|
Save ( object instance ) : void |
Saves the instance to the database
|
|
SaveAndFlush ( object instance ) : void |
Saves the instance to the database and flushes the session. If the primary key is unitialized it creates the instance on the database. Otherwise it updates it. If the primary key is assigned, then you must invoke Create(object) or Update(object) instead.
|
|
SaveCopy ( object instance ) : object |
Saves a copy of instance to the database
|
|
SaveCopyAndFlush ( object instance ) : void |
Saves a copy of the instance to the database and flushes the session. If the primary key is unitialized it creates the instance on the database. Otherwise it updates it. If the primary key is assigned, then you must invoke Create(object) or Update(object) instead.
|
|
SlicedFindAll ( |
Returns a portion of the query results (sliced)
|
|
SlicedFindAll ( |
Returns a portion of the query results (sliced)
|
|
SlicedFindAll ( |
Returns a portion of the query results (sliced)
|
|
SlicedFindAll ( |
Returns a portion of the query results (sliced)
|
|
Update ( object instance ) : void |
Persists the modification on the instance state to the database.
|
|
UpdateAndFlush ( object instance ) : void |
Persists the modification on the instance state to the database and flushes the session.
|
Method | Description | |
---|---|---|
Count ( |
Returns the number of records of the specified type in the database
|
|
FindOne ( |
Searches and returns a row. If more than one is found, throws ActiveRecordException
|
protected static Count ( |
||
targetType | Type of the target. | |
return | int |
public static Count ( |
||
targetType | The target type. | |
detachedCriteria | DetachedCriteria | The criteria expression |
return | int |
public static Count ( |
||
targetType | Type of the target. | |
filter | string | A sql where string i.e. Person=? and DOB > ? |
return | int |
public static Create ( object instance ) : void | ||
instance | object | The ActiveRecord instance to be deleted |
return | void |
public static CreateAndFlush ( object instance ) : void | ||
instance | object | The ActiveRecord instance to be created on the database |
return | void |
public static Delete ( object instance ) : void | ||
instance | object | The ActiveRecord instance to be deleted |
return | void |
public static DeleteAll ( |
||
targetType | The target ActiveRecord type | |
pkValues | IEnumerable | A list of primary keys |
return | int |
public static DeleteAll ( |
||
type | The type. | |
return | void |
public static DeleteAll ( |
||
type | The type. | |
where | string | The where. |
return | void |
public static DeleteAndFlush ( object instance ) : void | ||
instance | object | The ActiveRecord instance to be deleted |
return | void |
public static EnumerateQuery ( IActiveRecordQuery q ) : IEnumerable | ||
q | IActiveRecordQuery | The query |
return | IEnumerable |
public static Execute ( |
||
targetType | The target ActiveRecordType | |
call | NHibernateDelegate | The delegate instance |
instance | object | The ActiveRecord instance |
return | object |
public static ExecuteQuery ( IActiveRecordQuery q ) : object | ||
q | IActiveRecordQuery | The query |
return | object |
public static Exists ( |
||
targetType | Type of the target. | |
return | bool |
public static Exists ( |
||
targetType | The target type. | |
detachedCriteria | DetachedCriteria | The criteria expression |
return | bool |
public static Exists ( |
||
targetType | Type of the target. | |
id | object | The id to check on |
return | bool |
public static Exists ( |
||
targetType | Type of the target. | |
filter | string | A sql where string i.e. Person=? and DOB > ? |
return | bool |
public static FindAll ( |
||
targetType | ||
return |
public static FindAll ( |
||
targetType | ||
detachedCriteria | DetachedCriteria | |
return |
public static FindAll ( |
||
targetType | ||
orders | NHibernate.Criterion.Order | |
return |
public static FindAllByProperty ( |
||
targetType | The target type | |
orderByColumn | String | The column name to be ordered ASC |
property | String | A property name (not a column name) |
value | object | The value to be equals to |
return |
public static FindAllByProperty ( |
||
targetType | The target type | |
property | String | A property name (not a column name) |
value | object | The value to be equals to |
return |
public static FindByPrimaryKey ( |
||
targetType | The AR subclass type | |
id | object | ID value |
return | object |
public static FindByPrimaryKey ( |
||
targetType | The AR subclass type | |
id | object | ID value |
throwOnNotFound | bool | |
return | object |
public static FindFirst ( |
||
targetType | The target type | |
return | object |
public static FindFirst ( |
||
targetType | The target type. | |
detachedCriteria | DetachedCriteria | The criteria. |
return | object |
public static FindFirst ( |
||
targetType | The target type | |
orders | NHibernate.Criterion.Order | The sort order - used to determine which record is the first one |
return | object |
public static FindOne ( |
||
targetType | The target type | |
return | object |
protected static FindOne ( |
||
targetType | The target type | |
criteria | DetachedCriteria | The criteria |
return | object |
public static GetSessionFactoryHolder ( ) : ISessionFactoryHolder | ||
return | ISessionFactoryHolder |
public static Refresh ( object instance ) : void | ||
instance | object | The ActiveRecord instance to be reloaded |
return | void |
public static Replicate ( object instance, NHibernate.ReplicationMode replicationMode ) : void | ||
instance | object | The instance. |
replicationMode | NHibernate.ReplicationMode | The replication mode. |
return | void |
public static Save ( object instance ) : void | ||
instance | object | The ActiveRecord instance to be deleted |
return | void |
public static SaveAndFlush ( object instance ) : void | ||
instance | object | The ActiveRecord instance to be saved |
return | void |
public static SaveCopy ( object instance ) : object | ||
instance | object | The transient instance to be copied |
return | object |
public static SaveCopyAndFlush ( object instance ) : void | ||
instance | object | The transient instance to be copied |
return | void |
public static SlicedFindAll ( |
||
targetType | ||
firstResult | int | |
maxresults | int | |
return |
public static SlicedFindAll ( |
||
targetType | ||
firstResult | int | |
maxResults | int | |
criteria | DetachedCriteria | |
return |
public static SlicedFindAll ( |
||
targetType | ||
firstResult | int | |
maxresults | int | |
orders | NHibernate.Criterion.Order | |
return |
public static SlicedFindAll ( |
||
targetType | ||
firstResult | int | |
maxResults | int | |
orders | NHibernate.Criterion.Order | |
criteria | DetachedCriteria | |
return |
public static Update ( object instance ) : void | ||
instance | object | The ActiveRecord instance to be deleted |
return | void |
public static UpdateAndFlush ( object instance ) : void | ||
instance | object | The ActiveRecord instance to be updated on the database |
return | void |