com.gisgraphy.hibernate.criterion
Class PartialWordSearchRestriction

java.lang.Object
  extended by com.gisgraphy.hibernate.criterion.PartialWordSearchRestriction
All Implemented Interfaces:
java.io.Serializable, org.hibernate.criterion.Criterion

public class PartialWordSearchRestriction
extends java.lang.Object
implements org.hibernate.criterion.Criterion

An implementation of the Criterion interface that implements Partial word search, it must be coupled with the DAO to have a common format =>the DAO store a special string and this criteria search for that string (the searchterms have to be transform too)

Author:
David Masclet
See Also:
Serialized Form

Constructor Summary
PartialWordSearchRestriction(java.lang.String ts_vectorColumnName, java.lang.String searchedText)
           
 
Method Summary
 org.hibernate.engine.TypedValue[] getTypedValues(org.hibernate.Criteria criteria, org.hibernate.criterion.CriteriaQuery criteriaQuery)
           
 java.lang.String toSqlString(org.hibernate.Criteria criteria, org.hibernate.criterion.CriteriaQuery criteriaQuery)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartialWordSearchRestriction

public PartialWordSearchRestriction(java.lang.String ts_vectorColumnName,
                                    java.lang.String searchedText)
Parameters:
ts_vectorColumnName - The name of the ts_vector column
searchedText - the text to search
Method Detail

getTypedValues

public org.hibernate.engine.TypedValue[] getTypedValues(org.hibernate.Criteria criteria,
                                                        org.hibernate.criterion.CriteriaQuery criteriaQuery)
                                                 throws org.hibernate.HibernateException
Specified by:
getTypedValues in interface org.hibernate.criterion.Criterion
Throws:
org.hibernate.HibernateException

toSqlString

public java.lang.String toSqlString(org.hibernate.Criteria criteria,
                                    org.hibernate.criterion.CriteriaQuery criteriaQuery)
                             throws org.hibernate.HibernateException
Specified by:
toSqlString in interface org.hibernate.criterion.Criterion
Throws:
org.hibernate.HibernateException


Copyright © 2010. All Rights Reserved.