public class GenericBaseQuery<T> extends QueryConditionImpl implements BaseQuery<T>
Modifier and Type | Field and Description |
---|---|
protected InternalQueryBuilder |
builder |
protected PathItem |
primitiveToBoxPath |
protected Class<?> |
primitiveToBoxType |
protected Object |
primitiveToBoxValue |
protected T |
target |
protected Class<T> |
targetClass |
protected Map<Object,PathItem> |
unproxable |
Constructor and Description |
---|
GenericBaseQuery(InternalQueryBuilder builder,
Class<T> clazz,
Map<Object,PathItem> unproxable,
QueryType queryType) |
Modifier and Type | Method and Description |
---|---|
Boolean |
box(boolean b)
Box a boolean.
|
Byte |
box(byte b)
Box a byte.
|
Character |
box(char c)
Box a char.
|
protected <Z> Z |
box(Class<Z> clazz,
Object value) |
Double |
box(double d)
Box a double.
|
Float |
box(float f)
Box a float.
|
Integer |
box(int i)
Box an int.
|
Long |
box(long l)
Box an long.
|
Short |
box(short s)
Box an short.
|
void |
clear() |
protected PathItem |
extractItem(Object object) |
InternalQueryBuilder |
getBuilder() |
PathItem |
getRootPathItem() |
Class<T> |
getTargetClass() |
Object |
proxy(Class<?> clazz,
PathItem parent,
String name) |
T |
target()
Retrieve the instance to build query.
|
protected T target
protected Class<?> primitiveToBoxType
protected Object primitiveToBoxValue
protected PathItem primitiveToBoxPath
protected InternalQueryBuilder builder
public T target()
BaseQuery
SelectQuery<Person> queryPerson = ....
Person target = queryPerson.target();
public InternalQueryBuilder getBuilder()
public PathItem getRootPathItem()
public Boolean box(boolean b)
BaseQuery
SelectQuery<Person> query = ....
query.eq(query.box(query.target().getBooleanField()),true);
public Byte box(byte b)
BaseQuery
SelectQuery<Person> query = ....
query.eq(query.box(query.target().getByteField()),1b);
public Character box(char c)
BaseQuery
SelectQuery<Person> query = ....
query.eq(query.box(query.target().getCharField()),'A');
public Double box(double d)
BaseQuery
SelectQuery<Person> query = ....
query.eq(query.box(query.target().getDoubleField()),1.0);
public Float box(float f)
BaseQuery
SelectQuery<Person> query = ....
query.eq(query.box(query.target().getFloadField()),1f);
public Integer box(int i)
BaseQuery
SelectQuery<Person> query = ....
query.eq(query.box(query.target().getIntField()),1);
public Long box(long l)
BaseQuery
SelectQuery<Person> query = ....
query.eq(query.box(query.target().getLongField()),1);
public Short box(short s)
BaseQuery
SelectQuery<Person> query = ....
query.eq(query.box(query.target().getShortField()),1);
public void clear()
Copyright © 2014 Object Query. All rights reserved.