|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.mlw.vlh.adapter.AbstractValueListAdapter net.mlw.vlh.adapter.hibernate3.HibernateAdapter
This adapter wraps the functionality of Hibernate. Add extra functionality such as paging, focusing and validating of current result set. "Hibernate is a powerful, ultra-high performance object/relational persistence and query service for Java. Hibernate lets you develop persistent classes following common Java idiom - including association, inheritance, polymorphism, composition and the Java collections framework. The Hibernate Query Language, designed as a "minimal" object-oriented extension to SQL, provides an elegant bridge between the object and relational worlds. Hibernate also allows you to express queries using native SQL or Java-based Criteria and Example queries. Hibernate is now the most popular object/relational mapping solution for Java." -http://www.hibernate.org/
Field Summary |
Fields inherited from interface net.mlw.vlh.ValueListAdapter |
DO_FILTER, DO_FOCUS, DO_NOTHING, DO_PAGE, DO_SORT |
Constructor Summary | |
HibernateAdapter()
|
Method Summary | |
String |
getDefaultFocusPropertyObjectAlias()
|
String |
getHql()
Gets the hql used to retrieve the data. |
protected ValueList |
getListBackedValueList(ValueListInfo info,
List list)
|
long |
getMaxRowsForFocus()
Maximum rows to search with Focus |
String |
getNamedQuery()
Returns the namedQuery. |
protected org.hibernate.SessionFactory |
getSessionFactory()
Return the Hibernate SessionFactory used by this DAO. |
StatementBuilder |
getStatementBuilder()
|
ValueList |
getValueList(String name,
ValueListInfo info)
Gets a ValueList |
boolean |
isFocusOptimalization()
|
boolean |
isRemoveEmptyStrings()
|
void |
setAllowCreate(boolean allowCreate)
Sets: If a new Session should be created if no thread-bound found. |
void |
setDefaultFocusPropertyObjectAlias(String defaultFocusPropertyObjectAlias)
The name of object use to get focus property in hibernate hql syntax SELECT defaultFocusPropertyObjectAlias.getFocusProperty ... |
void |
setFocusOptimalization(boolean focusOptimalization)
Enable or disable optimalization of the query for focus property. |
void |
setHql(String hql)
Sets the hql used to retrieve the data. |
void |
setHsql(String hql)
Deprecated. use setHql(String) |
void |
setMaxRowsForFocus(long maxRowsForFocus)
Maximum rows to search with Focus |
void |
setNamedQuery(String namedQuery)
Sets the namedQuery. |
void |
setRemoveEmptyStrings(boolean isPrefilterEmpty)
Enable or Disable String length checking of given filters values. |
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Set the Hibernate SessionFactory to be used by this DAO. |
void |
setStatementBuilder(StatementBuilder statementBuilder)
|
void |
setValidator(ObjectValidator validator)
If is set, it use special ScrollableResultsDecorator, that enable or disable to add object in final list. |
Methods inherited from class net.mlw.vlh.adapter.AbstractValueListAdapter |
getAdapterType, getDefaultNumberPerPage, getDefaultSortColumn, getDefaultSortDirectionInteger, setAdapterType, setDefaultNumberPerPage, setDefaultSortColumn, setDefaultSortDirection |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HibernateAdapter()
Method Detail |
public boolean isFocusOptimalization()
public void setFocusOptimalization(boolean focusOptimalization)
focusOptimalization
- true - enable query with short select, false - query with full selectpublic void setValidator(ObjectValidator validator)
If is set, it use special ScrollableResultsDecorator, that enable or disable to add object in final list.
Also, it respects the total count of entries that overlap your paged list.
validator
- The validator to set.public boolean isRemoveEmptyStrings()
public void setRemoveEmptyStrings(boolean isPrefilterEmpty)
isPrefilterEmpty
- true-remove null and empty, false - remove only null filters.public ValueList getValueList(String name, ValueListInfo info)
ValueListAdapter
info
- The ValueList
informationname
- The name of the ValueList
ValueList
ValueListAdapter.getValueList(java.lang.String,
net.mlw.vlh.ValueListInfo)
protected ValueList getListBackedValueList(ValueListInfo info, List list)
info
- list
-
public final void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- The Hibernate SessionFactory to be used by this DAO.protected final org.hibernate.SessionFactory getSessionFactory()
public void setHsql(String hql)
hql
- The hql to set.public void setHql(String hql)
hql
- The hql to set.public String getNamedQuery()
public void setNamedQuery(String namedQuery)
NOTE: by using this you can not enable sorting, filtering, paging of the data, and focusing of rows.
namedQuery
- The namedQuery to set.public String getHql()
public void setAllowCreate(boolean allowCreate)
allowCreate
- The allowCreate to set.public long getMaxRowsForFocus()
public void setMaxRowsForFocus(long maxRowsForFocus)
maxRowsForFocus
- The maxRowsForFocus to set.public String getDefaultFocusPropertyObjectAlias()
public void setDefaultFocusPropertyObjectAlias(String defaultFocusPropertyObjectAlias)
defaultFocusPropertyObjectAlias
- The defaultFocusPropertyObjectAlias to set.public StatementBuilder getStatementBuilder()
public void setStatementBuilder(StatementBuilder statementBuilder)
statementBuilder
- The statementBuilder to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |