net.mlw.vlh.adapter.hibernate3.util
Class StatementBuilder

java.lang.Object
  extended bynet.mlw.vlh.adapter.hibernate3.util.StatementBuilder

public class StatementBuilder
extends Object

Utility for working with hibernate.

Version:
$Revision: 1.2 $ $Date: 2005/12/16 15:40:09 $
Author:
Matthew L. Wilson, Andrej Zachar

Constructor Summary
StatementBuilder()
           
 
Method Summary
 org.hibernate.Query generate(org.hibernate.Session session, StringBuffer hql, Map whereClause, boolean isRemoveEmptyStrings)
          Usage of filters: {key} -> :keyName add to query's parameter map keyValue [key] -> keyValue
 org.hibernate.Query generateForFocus(org.hibernate.Session session, StringBuffer hql, Map whereClause, boolean isRemoveEmptyStrings, String defaultFocusPropertyObjectAlias, String focusProperty)
          Generete optimalized query for focusing large amount of data.
 Setter getDefaultSetter()
           
 Setter getSetter(String key)
           
 void setDefaultSetter(Setter defaultSetter)
           
 void setSetters(Map setters)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatementBuilder

public StatementBuilder()
Method Detail

generate

public org.hibernate.Query generate(org.hibernate.Session session,
                                    StringBuffer hql,
                                    Map whereClause,
                                    boolean isRemoveEmptyStrings)
                             throws org.hibernate.HibernateException,
                                    ParseException
Usage of filters: {key} -> :keyName add to query's parameter map keyValue [key] -> keyValue

Parameters:
hql -
whereClause -
Returns:
Query for ordinary list
Throws:
org.hibernate.HibernateException
ParseException

generateForFocus

public org.hibernate.Query generateForFocus(org.hibernate.Session session,
                                            StringBuffer hql,
                                            Map whereClause,
                                            boolean isRemoveEmptyStrings,
                                            String defaultFocusPropertyObjectAlias,
                                            String focusProperty)
                                     throws org.hibernate.HibernateException,
                                            ParseException
Generete optimalized query for focusing large amount of data.

Parameters:
session -
hql -
whereClause -
isRemoveEmptyStrings -
defaultFocusPropertyObjectAlias -
focusProperty -
Returns:
Throws:
org.hibernate.HibernateException
ParseException

setSetters

public void setSetters(Map setters)
Parameters:
setters - The setters to set.

getSetter

public Setter getSetter(String key)

getDefaultSetter

public Setter getDefaultSetter()
Returns:
Returns the defaultSetter.

setDefaultSetter

public void setDefaultSetter(Setter defaultSetter)
Parameters:
defaultSetter - The defaultSetter to set.


Copyright © 2003-2006 mlavilson. All Rights Reserved.