Skip to end of metadata
Go to start of metadata

Introduction

System search can be implemented through the DetachedCriteria class from the Hibernate library.

Examples

Search for a user with the given name
 DetachedCriteria dc = DetachedCriteria.forClass( User.class );
 dc.add( Restrictions.eq( "lastName", "Kowalski" ) );
Search for files from the given period
  DetachedCriteria dc = DetachedCriteria.forClass( WfFile.class );
  Date d1=...
  Date d2=...
  dc.add( Restrictions.between( "fileDate", d1,d2 ) );
Useful resources:

  • No labels