it.openutils.hibernate.example
Class FilterMetadataSupport

java.lang.Object
  extended by it.openutils.hibernate.example.FilterMetadataSupport

public class FilterMetadataSupport
extends Object

legacy support for filter metadata.

Author:
gcatania

Constructor Summary
FilterMetadataSupport(Object entity, Map<String,? extends FilterMetadata> filterMetadata)
          builds an instance of ExampleTree associated with the input entity
 
Method Summary
 org.hibernate.Criteria appendTo(org.hibernate.Criteria crit, org.hibernate.Session ses)
          appends examples and subcriteria, created for the entity this example tree was initialized with, to the input criteria, and then returns it
 org.hibernate.Criteria create(org.hibernate.Session ses)
          creates a criteria with the input session, adds to it an example for the input entity, and creates subcriteria and related examples for non-null property values on the filter entity that correspond to associations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterMetadataSupport

public FilterMetadataSupport(Object entity,
                             Map<String,? extends FilterMetadata> filterMetadata)
builds an instance of ExampleTree associated with the input entity

Parameters:
entity - the example entity
Method Detail

create

public org.hibernate.Criteria create(org.hibernate.Session ses)
creates a criteria with the input session, adds to it an example for the input entity, and creates subcriteria and related examples for non-null property values on the filter entity that correspond to associations

Parameters:
ses - the session
Returns:
a criteria for this example tree

appendTo

public org.hibernate.Criteria appendTo(org.hibernate.Criteria crit,
                                       org.hibernate.Session ses)
appends examples and subcriteria, created for the entity this example tree was initialized with, to the input criteria, and then returns it

Parameters:
crit - the criteria to append to
ses - the session
Returns:
the input criteria with the added subcriteria and examples


Copyright © 2005-2011 Openmind. All Rights Reserved.