SessionImpl

Implementation of HibernateD session

Constructors

this
this(SessionFactoryImpl sessionFactory, EntityMetaData metaData, Dialect dialect, DataSource connectionPool)
Undocumented in source.

Members

Functions

beginTransaction
Transaction beginTransaction()
Undocumented in source. Be warned that the author may not have intended to support it.
cancelQuery
void cancelQuery()
Undocumented in source. Be warned that the author may not have intended to support it.
clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
close
Connection close()

End the session by releasing the JDBC connection and cleaning up.

contains
bool contains(Object object)

Check if this instance is associated with this Session

createQuery
Query createQuery(string queryString)

Create a new instance of Query for the given HQL query string

getCache
EntityCache getCache(string entityName)
Undocumented in source. Be warned that the author may not have intended to support it.
getEntityName
string getEntityName(Object object)
Undocumented in source. Be warned that the author may not have intended to support it.
getEntityName
string getEntityName(TypeInfo_Class type)
Undocumented in source. Be warned that the author may not have intended to support it.
getFromCache
Object getFromCache(string entityName, Variant key)
Undocumented in source. Be warned that the author may not have intended to support it.
getMetaData
EntityMetaData getMetaData()
Undocumented in source. Be warned that the author may not have intended to support it.
getObject
Object getObject(string entityName, Variant id)
Undocumented in source. Be warned that the author may not have intended to support it.
getObject
Object getObject(EntityInfo info, Object obj, Variant id)

Read the persistent state associated with the given identifier into the given transient instance

getSessionFactory
SessionFactory getSessionFactory()
Undocumented in source. Be warned that the author may not have intended to support it.
isConnected
bool isConnected()

Check if the session is currently connected.

isDirty
bool isDirty()

Does this session contain any changes which must be synchronized with the database? In other words, would any DML operations be executed if we flushed this session?

isOpen
bool isOpen()

Check if the session is still open.

keyInCache
bool keyInCache(string entityName, Variant key)
Undocumented in source. Be warned that the author may not have intended to support it.
loadObject
Object loadObject(string entityName, Variant id)

Read the persistent state associated with the given identifier into the given transient instance.

loadObject
void loadObject(Object obj, Variant id)

Read the persistent state associated with the given identifier into the given transient instance

loadReferencedObjects
Object[] loadReferencedObjects(EntityInfo info, string referencePropertyName, Variant fk)

Read entities referenced by property

lookupCache
Object[] lookupCache(string entityName, Variant[] keys, Variant[] unknownKeys)
Undocumented in source. Be warned that the author may not have intended to support it.
peekFromCache
Object peekFromCache(string entityName, Variant key)
Undocumented in source. Be warned that the author may not have intended to support it.
persist
void persist(Object obj)

Persist the given transient instance.

putToCache
void putToCache(string entityName, Variant key, Object value)
Undocumented in source. Be warned that the author may not have intended to support it.
refresh
void refresh(Object obj)

Re-read the state of the given instance from the underlying database.

remove
void remove(Object obj)
Undocumented in source. Be warned that the author may not have intended to support it.
save
Variant save(Object obj)

Persist the given transient instance, first assigning a generated identifier if not assigned; returns generated value

update
void update(Object obj)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

accessor
SessionAccessor accessor [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

cache
EntityCache[string] cache;
Undocumented in source.
conn
Connection conn;
Undocumented in source.
connectionPool
DataSource connectionPool;
Undocumented in source.
dialect
Dialect dialect;
Undocumented in source.
sessionFactory
SessionFactoryImpl sessionFactory;
Undocumented in source.

Inherited Members

From Session

getMetaData
EntityMetaData getMetaData()

returns metadata

beginTransaction
Transaction beginTransaction()

not supported in current implementation

cancelQuery
void cancelQuery()

not supported in current implementation

clear
void clear()

not supported in current implementation

close
Connection close()

closes session

isDirty
bool isDirty()

Does this session contain any changes which must be synchronized with the database? In other words, would any DML operations be executed if we flushed this session?

isOpen
bool isOpen()

Check if the session is still open.

isConnected
bool isConnected()

Check if the session is currently connected.

contains
bool contains(Object object)

Check if this instance is associated with this Session.

getSessionFactory
SessionFactory getSessionFactory()

Retrieve session factory used to create this session

getEntityName
string getEntityName(Object object)

Lookup metadata to find entity name for object.

getEntityName
string getEntityName(TypeInfo_Class type)

Lookup metadata to find entity name for class type info.

get
T get(ID id)

Return the persistent instance of the given named entity with the given identifier, or null if there is no such persistent instance.

load
T load(ID id)

Read the persistent state associated with the given identifier into the given transient instance.

load
void load(T obj, ID id)

Read the persistent state associated with the given identifier into the given transient instance.

getObject
Object getObject(string entityName, Variant id)

Return the persistent instance of the given named entity with the given identifier, or null if there is no such persistent instance.

loadObject
Object loadObject(string entityName, Variant id)

Read the persistent state associated with the given identifier into the given transient instance.

loadObject
void loadObject(Object obj, Variant id)

Read the persistent state associated with the given identifier into the given transient instance

refresh
void refresh(Object obj)

Re-read the state of the given instance from the underlying database.

save
Variant save(Object obj)

Persist the given transient instance, first assigning a generated identifier.

persist
void persist(Object obj)

Persist the given transient instance.

update
void update(Object object)

Update the persistent instance with the identifier of the given detached instance.

remove
void remove(Object object)

remove object from DB (renamed from original Session.delete - it's keyword in D)

createQuery
Query createQuery(string queryString)

Create a new instance of Query for the given HQL query string

Meta