| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
public interface StatelessSessionextends SerializableMethod Summary | |
Transaction |
|
void |
|
Connection |
|
Criteria |
|
Criteria |
|
Criteria |
|
Criteria |
|
Query |
|
SQLQuery |
|
void |
|
void |
|
Object |
|
Object | |
Object |
|
Object | |
Query |
|
Transaction |
|
Serializable |
|
Serializable |
|
void |
|
void | |
void |
|
void | |
void |
|
void |
|
public void close()
Close the stateless session and release the JDBC connection.
public Connection connection()
Returns the current JDBC connection associated with this instance.
If the session is using aggressive connection release (as in a CMT environment), it is the application's responsibility to close the connection returned by this call. Otherwise, the application should not close the connection.
public Criteria createCriteria(Class persistentClass)
Create a new Criteria instance, for the given entity class, or a superclass of an entity class. Entities returned by the query are detached.
- Parameters:
persistentClass- a class, which is persistent, or has persistent subclasses
- Returns:
- Criteria
public Criteria createCriteria(Class persistentClass, String alias)
Create a new Criteria instance, for the given entity class, or a superclass of an entity class, with the given alias. Entities returned by the query are detached.
- Parameters:
persistentClass- a class, which is persistent, or has persistent subclasses
- Returns:
- Criteria
public Criteria createCriteria(String entityName)
Create a new Criteria instance, for the given entity name. Entities returned by the query are detached.
- Parameters:
entityName-
- Returns:
- Criteria
public Criteria createCriteria(String entityName, String alias)
Create a new Criteria instance, for the given entity name, with the given alias. Entities returned by the query are detached.
- Parameters:
entityName-
- Returns:
- Criteria
public Query createQuery(String queryString)
Create a new instance of Query for the given HQL query string. Entities returned by the query are detached.
public SQLQuery createSQLQuery(String queryString) throws HibernateException
Create a new instance of SQLQuery for the given SQL query string. Entities returned by the query are detached.
- Parameters:
queryString- a SQL query
- Returns:
- SQLQuery
- Throws:
HibernateException-
public void delete(Object entity)
Delete a row.
- Parameters:
entity- a detached entity instance
public void delete(String entityName,
Object entity)Delete a row.
- Parameters:
entityName- The entityName for the entity to be deletedentity- a detached entity instance
public Object get(Class entityClass,
Serializable id)Retrieve a row.
- Returns:
- a detached entity instance
public Object get(Class entityClass,
Serializable id,
LockMode lockMode)Retrieve a row, obtaining the specified lock mode.
- Returns:
- a detached entity instance
public Object get(String entityName,
Serializable id)Retrieve a row.
- Returns:
- a detached entity instance
public Object get(String entityName,
Serializable id,
LockMode lockMode)Retrieve a row, obtaining the specified lock mode.
- Returns:
- a detached entity instance
public Query getNamedQuery(String queryName)
Obtain an instance of Query for a named query string defined in the mapping file. Entities returned by the query are detached.
public Serializable insert(Object entity)
Insert a row.
- Parameters:
entity- a new transient instance
public Serializable insert(String entityName,
Object entity)Insert a row.
- Parameters:
entityName- The entityName for the entity to be insertedentity- a new transient instance
- Returns:
- the identifier of the instance
public void refresh(Object entity)
Refresh the entity instance state from the database.
- Parameters:
entity- The entity to be refreshed.
public void refresh(Object entity,
LockMode lockMode)Refresh the entity instance state from the database.
- Parameters:
entity- The entity to be refreshed.lockMode- The LockMode to be applied.
public void refresh(String entityName,
Object entity)Refresh the entity instance state from the database.
- Parameters:
entityName- The entityName for the entity to be refreshed.entity- The entity to be refreshed.
public void refresh(String entityName,
Object entity,
LockMode lockMode)Refresh the entity instance state from the database.
- Parameters:
entityName- The entityName for the entity to be refreshed.entity- The entity to be refreshed.lockMode- The LockMode to be applied.
public void update(Object entity)
Update a row.
- Parameters:
entity- a detached entity instance
public void update(String entityName,
Object entity)Update a row.
- Parameters:
entityName- The entityName for the entity to be updatedentity- a detached entity instance