|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectto.etc.webapp.query.QRestrictor<T>
public abstract class QRestrictor<T>
Builds the "where" part of a query, or a part of that "where" part, under construction. The nodes added, when > 1, are combined using either OR or AND.
Constructor Summary | |
---|---|
protected |
QRestrictor(java.lang.Class<T> baseClass,
QOperation combinator)
|
protected |
QRestrictor(ICriteriaTableDef<T> meta,
QOperation combinator)
|
Method Summary | ||
---|---|---|
QRestrictor<T> |
add(QOperatorNode n)
|
|
QRestrictor<T> |
and()
|
|
QRestrictor<T> |
between(java.lang.String property,
java.lang.Object a,
java.lang.Object b)
Compare the value of a property with two literal bounds. |
|
QRestrictor<T> |
eq(java.lang.String property,
double value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
eq(java.lang.String property,
long value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
eq(java.lang.String property,
java.lang.Object value)
Compare a property with some literal object value. |
|
|
exists(java.lang.Class<U> childclass,
java.lang.String childproperty)
Create a joined "exists" subquery on some child list property. |
|
QRestrictor<T> |
ge(java.lang.String property,
double value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
ge(java.lang.String property,
long value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
ge(java.lang.String property,
java.lang.Object value)
Compare a property with some literal object value. |
|
java.lang.Class<T> |
getBaseClass()
Returns the persistent class being queried and returned, if this is a class-based query. |
|
ICriteriaTableDef<T> |
getMetaTable()
Returns the metatable being queried, or null. |
|
abstract QOperatorNode |
getRestrictions()
|
|
java.lang.Class<T> |
getReturnClass()
Return the datatype returned by a principal query using this criteria. |
|
QRestrictor<T> |
gt(java.lang.String property,
double value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
gt(java.lang.String property,
long value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
gt(java.lang.String property,
java.lang.Object value)
Compare a property with some literal object value. |
|
boolean |
hasRestrictions()
Returns T if this has restrictions. |
|
QRestrictor<T> |
ilike(java.lang.String property,
java.lang.Object value)
Do a case-independent 'like' comparison. |
|
protected void |
internalAdd(QOperatorNode r)
Add a new restriction to the list of restrictions on the data. |
|
QRestrictor<T> |
isnotnull(java.lang.String property)
Add the restriction that the property specified must be not-null. |
|
QRestrictor<T> |
isnull(java.lang.String property)
Add the restriction that the property specified must be null. |
|
QRestrictor<T> |
le(java.lang.String property,
double value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
le(java.lang.String property,
long value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
le(java.lang.String property,
java.lang.Object value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
like(java.lang.String property,
java.lang.Object value)
Do a 'like' comparison. |
|
QRestrictor<T> |
lt(java.lang.String property,
double value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
lt(java.lang.String property,
long value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
lt(java.lang.String property,
java.lang.Object value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
ne(java.lang.String property,
double value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
ne(java.lang.String property,
long value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
ne(java.lang.String property,
java.lang.Object value)
Compare a property with some literal object value. |
|
QRestrictor<T> |
or()
Return a thingy that constructs nodes combined with "or". |
|
QRestrictor<T> |
or(QOperatorNode a1,
QOperatorNode a2,
QOperatorNode... rest)
Deprecated. |
|
abstract void |
setRestrictions(QOperatorNode n)
|
|
QRestrictor<T> |
sqlCondition(java.lang.String sql)
Add a restriction specified in bare SQL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected QRestrictor(java.lang.Class<T> baseClass, QOperation combinator)
protected QRestrictor(ICriteriaTableDef<T> meta, QOperation combinator)
Method Detail |
---|
public abstract QOperatorNode getRestrictions()
public abstract void setRestrictions(QOperatorNode n)
@Nullable public java.lang.Class<T> getBaseClass()
@Nullable public ICriteriaTableDef<T> getMetaTable()
public java.lang.Class<T> getReturnClass()
public final boolean hasRestrictions()
protected void internalAdd(QOperatorNode r)
r
- public QRestrictor<T> or()
public QRestrictor<T> and()
public QRestrictor<T> add(QOperatorNode n)
public QRestrictor<T> eq(java.lang.String property, java.lang.Object value)
property
- value
-
public QRestrictor<T> eq(java.lang.String property, long value)
property
- value
-
public QRestrictor<T> eq(java.lang.String property, double value)
property
- value
-
public QRestrictor<T> ne(java.lang.String property, java.lang.Object value)
property
- value
-
public QRestrictor<T> ne(java.lang.String property, long value)
property
- value
-
public QRestrictor<T> ne(java.lang.String property, double value)
property
- value
-
public QRestrictor<T> gt(java.lang.String property, java.lang.Object value)
property
- value
-
public QRestrictor<T> gt(java.lang.String property, long value)
property
- value
-
public QRestrictor<T> gt(java.lang.String property, double value)
property
- value
-
public QRestrictor<T> lt(java.lang.String property, java.lang.Object value)
property
- value
-
public QRestrictor<T> lt(java.lang.String property, long value)
property
- value
-
public QRestrictor<T> lt(java.lang.String property, double value)
property
- value
-
public QRestrictor<T> ge(java.lang.String property, java.lang.Object value)
property
- value
-
public QRestrictor<T> ge(java.lang.String property, long value)
property
- value
-
public QRestrictor<T> ge(java.lang.String property, double value)
property
- value
-
public QRestrictor<T> le(java.lang.String property, java.lang.Object value)
property
- value
-
public QRestrictor<T> le(java.lang.String property, long value)
property
- value
-
public QRestrictor<T> le(java.lang.String property, double value)
property
- value
-
public QRestrictor<T> like(java.lang.String property, java.lang.Object value)
property
- value
-
public QRestrictor<T> between(java.lang.String property, java.lang.Object a, java.lang.Object b)
property
- a
- b
-
public QRestrictor<T> ilike(java.lang.String property, java.lang.Object value)
property
- value
-
@Deprecated public QRestrictor<T> or(QOperatorNode a1, QOperatorNode a2, QOperatorNode... rest)
a
-
public QRestrictor<T> isnull(java.lang.String property)
property
-
public QRestrictor<T> isnotnull(java.lang.String property)
property
-
public QRestrictor<T> sqlCondition(java.lang.String sql)
sql
-
public <U> QRestrictor<U> exists(java.lang.Class<U> childclass, java.lang.String childproperty)
U
- The type of the children.childclass
- The class type of the children, because Java Generics is too bloody stupid to find out itself.childproperty
- The name of the property in the parent class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |