public Expression contains(Value map, Value arg) { if (map instanceof Const) return new InExpression((Val) arg, (Const) map); if (map instanceof SubQ) return new InSubQExpression((Val) arg, (SubQ) map); return new ContainsExpression((Val) map, (Val) arg); }
public Expression bindVariable(Value var, Value val) { // handle the strange case of using a constant path to bind a // variable; in these cases the variable acts like an unbound // variable that we limit by using an IN clause on the constant // value collection if (val instanceof Const) { PCPath path = new PCPath(_type, (Variable) var); path.setMetaData(var.getMetaData()); return new InExpression(path, (Const) val); } return new BindVariableExpression((Variable) var, (PCPath) val, false); }
public Expression bindVariable(Value var, Value val) { // handle the strange case of using a constant path to bind a // variable; in these cases the variable acts like an unbound // variable that we limit by using an IN clause on the constant // value collection if (val instanceof Const) { PCPath path = new PCPath(_type, (Variable) var); path.setMetaData(var.getMetaData()); return new InExpression(path, (Const) val); } return new BindVariableExpression((Variable) var, (PCPath) val, false); }
public Expression bindVariable(Value var, Value val) { // handle the strange case of using a constant path to bind a // variable; in these cases the variable acts like an unbound // variable that we limit by using an IN clause on the constant // value collection if (val instanceof Const) { PCPath path = new PCPath(_type, (Variable) var); path.setMetaData(var.getMetaData()); return new InExpression(path, (Const) val); } return new BindVariableExpression((Variable) var, (PCPath) val, false); }
public Expression bindVariable(Value var, Value val) { // handle the strange case of using a constant path to bind a // variable; in these cases the variable acts like an unbound // variable that we limit by using an IN clause on the constant // value collection if (val instanceof Const) { PCPath path = new PCPath(_type, (Variable) var); path.setMetaData(var.getMetaData()); return new InExpression(path, (Const) val); } return new BindVariableExpression((Variable) var, (PCPath) val, false); }
public Expression bindVariable(Value var, Value val) { // handle the strange case of using a constant path to bind a // variable; in these cases the variable acts like an unbound // variable that we limit by using an IN clause on the constant // value collection if (val instanceof Const) { PCPath path = new PCPath(_type, (Variable) var); path.setMetaData(var.getMetaData()); return new InExpression(path, (Const) val); } return new BindVariableExpression((Variable) var, (PCPath) val, false); }
public Expression contains(Value map, Value arg) { if (map instanceof Const) { if (arg instanceof Type) { // limited support for table per class inheritance verifyTypeOperation(arg, map, false); if (((ClassMapping) arg.getMetaData()).getDiscriminator().getColumns().length == 0) return new EqualTypeExpression((Val) arg, (Val) map); } return new InExpression((Val) arg, (Const) map); } if (map instanceof SubQ) return new InSubQExpression((Val) arg, (SubQ) map); return new ContainsExpression((Val) map, (Val) arg); }
public Expression contains(Value map, Value arg) { if (map instanceof Const) { if (arg instanceof Type) { // limited support for table per class inheritance verifyTypeOperation(arg, map, false); if (((ClassMapping) arg.getMetaData()).getDiscriminator().getColumns().length == 0) return new EqualTypeExpression((Val) arg, (Val) map); } return new InExpression((Val) arg, (Const) map); } if (map instanceof SubQ) return new InSubQExpression((Val) arg, (SubQ) map); return new ContainsExpression((Val) map, (Val) arg); }
public Expression contains(Value map, Value arg) { if (map instanceof Const) { if (arg instanceof Type) { // limited support for table per class inheritance verifyTypeOperation(arg, map, false); if (((ClassMapping) arg.getMetaData()).getDiscriminator().getColumns().length == 0) return new EqualTypeExpression((Val) arg, (Val) map); } return new InExpression((Val) arg, (Const) map); } if (map instanceof SubQ) return new InSubQExpression((Val) arg, (SubQ) map); return new ContainsExpression((Val) map, (Val) arg); }
public Expression contains(Value map, Value arg) { if (map instanceof Const) { if (arg instanceof Type) { // limited support for table per class inheritance verifyTypeOperation(arg, map, false); if (((ClassMapping) arg.getMetaData()).getDiscriminator().getColumns().length == 0) return new EqualTypeExpression((Val) arg, (Val) map); } return new InExpression((Val) arg, (Const) map); } if (map instanceof SubQ) return new InSubQExpression((Val) arg, (SubQ) map); return new ContainsExpression((Val) map, (Val) arg); }