Class QBean<T>

Type Parameters:
T - bean type
All Implemented Interfaces:
Expression<T>, FactoryExpression<T>, Serializable

public 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();
 
 
Author:
tiwe
See Also:
  • Constructor Details

    • QBean

      protected QBean(Class<? extends T> type, Map<String,? extends Expression<?>> bindings)
      Create a new QBean instance
      Parameters:
      type - type of bean
      bindings - bindings
    • QBean

      protected QBean(Class<? extends T> type, Expression<?>... args)
      Create a new QBean instance
      Parameters:
      type - type of bean
      args - properties to be populated
    • QBean

      protected QBean(Class<? extends T> type, boolean fieldAccess, Expression<?>... args)
      Create a new QBean instance
      Parameters:
      type - type of bean
      fieldAccess - true, for field access and false, for property access
      args - fields or properties to be populated
    • QBean

      protected QBean(Class<? extends T> type, boolean fieldAccess, Map<String,? extends Expression<?>> bindings)
      Create a new QBean instance
      Parameters:
      type - type of bean
      fieldAccess - true, for field access and false, for property access
      bindings - bindings
  • Method Details