public class CriteriaMatcherInMemory<T> extends Object
Constructor and Description |
---|
CriteriaMatcherInMemory() |
Modifier and Type | Method and Description |
---|---|
protected static Object |
extractValue(String fieldPath,
Object infoObject) |
Collection<T> |
findMatching(Collection<T> all)
finds all of the supplied objects that match the specified criteria
|
QueryByCriteria |
getCriteria() |
boolean |
matches(T infoObject)
Checks if an object matches the criteria
|
protected boolean |
matches(T infoObject,
Predicate predicate)
protected for testing
|
static boolean |
matchesEqual(Object dataValue,
Object criteriaValue) |
static boolean |
matchesGreaterThan(Object dataValue,
Object criteriaValue) |
static boolean |
matchesLessThan(Object dataValue,
Object criteriaValue) |
boolean |
matchesLike(Object dataValue,
Object criteriaValue) |
static boolean |
matchesLike(String str,
String expr)
This was taken from
http://stackoverflow.com/questions/898405/how-to-implement-a-sql-like-like-operator-in-java
|
boolean |
matchesLikeCachingPattern(String str,
String expr)
this was taken from
http://stackoverflow.com/questions/898405/how-to-implement-a-sql-like-like-operator-in-java
|
void |
setCriteria(QueryByCriteria criteria) |
public CriteriaMatcherInMemory()
public QueryByCriteria getCriteria()
public void setCriteria(QueryByCriteria criteria)
public Collection<T> findMatching(Collection<T> all)
all
- public boolean matches(T infoObject)
infoObject
- protected static Object extractValue(String fieldPath, Object infoObject)
public static boolean matchesEqual(Object dataValue, Object criteriaValue)
public static boolean matchesLessThan(Object dataValue, Object criteriaValue)
public static boolean matchesGreaterThan(Object dataValue, Object criteriaValue)
public boolean matchesLike(Object dataValue, Object criteriaValue)
public boolean matchesLikeCachingPattern(String str, String expr)
public static boolean matchesLike(String str, String expr)
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.