|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.core.InputWrapper
org.mentawai.filter.HibernateFilter
public class HibernateFilter
Use this filter to place an opened and connected Hibernate session in the action input. There is no need to close the session. The filter does it automatically when the action ends. The action is injected using the pull.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary | |
|---|---|
static String |
KEY
The default key name to use when placing the session in the action input. |
static String |
TRANS_KEY
The default key name to use when placing a hibernate transaction in the action input. |
| Constructor Summary | |
|---|---|
HibernateFilter()
|
|
HibernateFilter(boolean transactional)
|
|
HibernateFilter(boolean transactional,
Document document)
|
|
HibernateFilter(boolean transactional,
File file)
|
|
HibernateFilter(boolean transactional,
org.hibernate.SessionFactory sessionFactory)
|
|
HibernateFilter(boolean transactional,
String string)
|
|
HibernateFilter(boolean transactional,
URL url)
|
|
HibernateFilter(Document document)
|
|
HibernateFilter(File file)
|
|
HibernateFilter(org.hibernate.SessionFactory sessionFactory)
|
|
HibernateFilter(String string)
|
|
HibernateFilter(URL url)
|
|
| Method Summary | |
|---|---|
void |
addResultsForRollback(String... results)
|
void |
afterConsequence(Action action,
Consequence c,
boolean conseqExecuted,
boolean actionExecuted,
String result)
|
void |
destroy()
Gives a chance to the filter to deallocalte any resources before it is destroyed. |
String |
filter(InvocationChain chain)
Sets the action to get an Hibernate Session using the pull model. |
Object |
getValue(String key)
Verifies if the requested object is a Hibernate Session, return a Hibernate Session if it is and return the content of the action's input if not. |
protected org.hibernate.Session |
openSessionHibernate(org.hibernate.SessionFactory sessionFactory)
|
void |
setKey(String key)
Sets the action input key to use. |
void |
setTransactional(boolean transactional)
|
void |
setTransactional(boolean transactional,
String transactionKey)
|
String |
toString()
|
| Methods inherited from class org.mentawai.core.InputWrapper |
|---|
clear, containsKey, containsValue, entries, entrySet, get, getBoolean, getBoolean, getBooleanValue, getBooleanValue, getDate, getDate, getDate, getDouble, getDouble, getDoubleValue, getDoubleValue, getEnum, getEnums, getFloat, getFloat, getFloatValue, getFloatValue, getHeader, getHeaderKeys, getInt, getInt, getInts, getIntValue, getIntValue, getIntValues, getLong, getLong, getLongs, getLongValue, getLongValue, getObject, getObject, getProperty, getRoot, getString, getStrings, getStringValue, getStringValues, has, hasValue, inject, inject, isEmpty, keys, keySet, put, putAll, remove, removeInput, removeValue, setInput, setValue, size, values |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Field Detail |
|---|
public static final String KEY
public static final String TRANS_KEY
| Constructor Detail |
|---|
public HibernateFilter()
public HibernateFilter(boolean transactional)
public HibernateFilter(Document document)
public HibernateFilter(boolean transactional,
Document document)
public HibernateFilter(File file)
public HibernateFilter(boolean transactional,
File file)
public HibernateFilter(URL url)
public HibernateFilter(boolean transactional,
URL url)
public HibernateFilter(String string)
public HibernateFilter(boolean transactional,
String string)
public HibernateFilter(org.hibernate.SessionFactory sessionFactory)
public HibernateFilter(boolean transactional,
org.hibernate.SessionFactory sessionFactory)
| Method Detail |
|---|
public void setTransactional(boolean transactional)
public void addResultsForRollback(String... results)
public void setTransactional(boolean transactional,
String transactionKey)
public String toString()
toString in class Objectpublic void setKey(String key)
key - The action input key.
public String filter(InvocationChain chain)
throws Exception
filter in interface Filterchain - The InvocationChain for the action this filter is being applied to.
Exception
public void afterConsequence(Action action,
Consequence c,
boolean conseqExecuted,
boolean actionExecuted,
String result)
afterConsequence in interface AfterConsequenceFilterpublic void destroy()
Filter
destroy in interface Filterpublic Object getValue(String key)
getValue in interface InputgetValue in class InputWrapperkey - the name of the parameter
protected org.hibernate.Session openSessionHibernate(org.hibernate.SessionFactory sessionFactory)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||