T
- bean typepublic class QBean<T> extends FactoryExpressionBase<T>
QBean
is a JavaBean populating projection type
Example
QEmployee employee = QEmployee.employee;
List<EmployeeInfo> result = query.from(employee)
.where(employee.valid.eq(true))
.select(Projections.bean(EmployeeInfo.class, employee.firstName, employee.lastName))
.fetch();
Modifier | Constructor and Description |
---|---|
protected |
QBean(Class<? extends T> type,
boolean fieldAccess,
Expression<?>... args)
Create a new QBean instance
|
protected |
QBean(Class<? extends T> type,
boolean fieldAccess,
Map<String,? extends Expression<?>> bindings)
Create a new QBean instance
|
protected |
QBean(Class<? extends T> type,
Expression<?>... args)
Create a new QBean instance
|
protected |
QBean(Class<? extends T> type,
Map<String,? extends Expression<?>> bindings)
Create a new QBean instance
|
Modifier and Type | Method and Description |
---|---|
<R,C> R |
accept(Visitor<R,C> v,
C context)
Accept the visitor with the given context
|
Expression<T> |
as(Path<T> alias)
Create an alias for the expression
|
Expression<T> |
as(String alias)
Create an alias for the expression
|
protected <T> T |
create(Class<T> type) |
boolean |
equals(Object obj) |
List<Expression<?>> |
getArgs()
Get the invocation arguments
|
T |
newInstance(Object... a)
Create a projection with the given arguments
|
protected void |
propertyNotFound(Expression<?> expr,
String property) |
protected void |
typeMismatch(Class<?> type,
Expression<?> expr) |
skipNulls
getType, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getType
protected QBean(Class<? extends T> type, Map<String,? extends Expression<?>> bindings)
type
- type of beanbindings
- bindingsprotected QBean(Class<? extends T> type, Expression<?>... args)
type
- type of beanargs
- properties to be populatedprotected QBean(Class<? extends T> type, boolean fieldAccess, Expression<?>... args)
type
- type of beanfieldAccess
- true, for field access and false, for property accessargs
- fields or properties to be populatedprotected QBean(Class<? extends T> type, boolean fieldAccess, Map<String,? extends Expression<?>> bindings)
type
- type of beanfieldAccess
- true, for field access and false, for property accessbindings
- bindingsprotected void propertyNotFound(Expression<?> expr, String property)
protected void typeMismatch(Class<?> type, Expression<?> expr)
public T newInstance(Object... a)
FactoryExpression
a
- row argumentsprotected <T> T create(Class<T> type) throws IllegalAccessException, InstantiationException
public Expression<T> as(Path<T> alias)
public Expression<T> as(String alias)
public <R,C> R accept(Visitor<R,C> v, C context)
Expression
R
- return typeC
- context typev
- visitorcontext
- context of visitpublic boolean equals(Object obj)
equals
in class FactoryExpressionBase<T>
public List<Expression<?>> getArgs()
FactoryExpression
Copyright © 2007–2016 Querydsl. All rights reserved.