Package com.mysema.query.types

Examples of com.mysema.query.types.ConstantImpl


        // turn rhs into id collection
        Set ids = new HashSet();
        for (Object entity : (Collection<?>) rhs.getConstant()) {
          ids.add(util.getIdentifier(entity));
        }
        rhs = new ConstantImpl(ids);
        args = Arrays.asList(lhs, rhs);
      }
    }
    super.visitOperation(type, operator, args);
  }
View Full Code Here


    if (hasConstants && numType != null) {
      List<Expression<?>> newArgs = new ArrayList<Expression<?>>(args.size());
      for (Expression<?> arg : args) {
        if (arg instanceof Constant && Number.class.isAssignableFrom(arg.getType()) && !arg.getType().equals(numType)) {
          Number number = (Number) ((Constant) arg).getConstant();
          newArgs.add(new ConstantImpl(MathUtils.cast(number, (Class) numType)));
        } else {
          newArgs.add(arg);
        }
      }
      return newArgs;
View Full Code Here

        Expression<?>[] exprs = new Expression<?>[args.length];
        for (int i = 0; i < args.length; i++) {
            if (args[i] instanceof Expression) {
                exprs[i] = (Expression)args[i];
            } else {
                exprs[i] = new ConstantImpl(args[i]);
            }
        }
        return exprs;
    }
View Full Code Here

TOP

Related Classes of com.mysema.query.types.ConstantImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.