/** * Set the implicit types of the given values based on the fact that * they're used together, and based on the operator type. */ protected void setImplicitTypes(Value val1, Value val2, Class<?> expected) { setImplicitTypes(val1, val2, expected, resolver); } protected static void setImplicitTypes(Value val1, Value val2,
/** * Set the implicit types of the given values based on the fact that * they're used together, and based on the operator type. */ protected void setImplicitTypes(Value val1, Value val2, Class<?> expected) { setImplicitTypes(val1, val2, expected, resolver); } protected static void setImplicitTypes(Value val1, Value val2,
/** * Set the implicit types of the given values based on the fact that * they're used together, and based on the operator type. */ protected void setImplicitTypes(Value val1, Value val2, Class<?> expected) { setImplicitTypes(val1, val2, expected, resolver); } protected static void setImplicitTypes(Value val1, Value val2,
/** * Set the implicit types of the given values based on the fact that * they're used together, and based on the operator type. */ protected void setImplicitTypes(Value val1, Value val2, Class<?> expected) { setImplicitTypes(val1, val2, expected, resolver); } protected static void setImplicitTypes(Value val1, Value val2,
public static void setImplicitTypes(Value val1, Value val2, Class<?> expected, Resolver resolver, OrderedMap<Object,Class<?>> parameterTypes, String currentQuery) { AbstractExpressionBuilder.setImplicitTypes(val1, val2, expected, resolver); // as well as setting the types for conversions, we also need to // ensure that any parameters are declared with the correct type, // since the JPA spec expects that these will be validated Parameter param = val1 instanceof Parameter ? (Parameter) val1 : val2 instanceof Parameter ? (Parameter) val2 : null; Path path = val1 instanceof Path ? (Path) val1 : val2 instanceof Path ? (Path) val2 : null; // we only check for parameter-to-path comparisons if (param == null || path == null || parameterTypes == null) return; FieldMetaData fmd = path.last(); if (fmd == null) return; if (expected == null) checkEmbeddable(path, currentQuery); Class<?> type = path.getType(); if (type == null) return; Object paramKey = param.getParameterKey(); if (paramKey == null) return; // make sure we have already declared the parameter if (parameterTypes.containsKey(paramKey)) parameterTypes.put(paramKey, type); }
public static void setImplicitTypes(Value val1, Value val2, Class<?> expected, Resolver resolver, OrderedMap<Object,Class<?>> parameterTypes, String currentQuery) { AbstractExpressionBuilder.setImplicitTypes(val1, val2, expected, resolver); // as well as setting the types for conversions, we also need to // ensure that any parameters are declared with the correct type, // since the JPA spec expects that these will be validated Parameter param = val1 instanceof Parameter ? (Parameter) val1 : val2 instanceof Parameter ? (Parameter) val2 : null; Path path = val1 instanceof Path ? (Path) val1 : val2 instanceof Path ? (Path) val2 : null; // we only check for parameter-to-path comparisons if (param == null || path == null || parameterTypes == null) return; FieldMetaData fmd = path.last(); if (fmd == null) return; if (expected == null) checkEmbeddable(path, currentQuery); Class<?> type = path.getType(); if (type == null) return; Object paramKey = param.getParameterKey(); if (paramKey == null) return; // make sure we have already declared the parameter if (parameterTypes.containsKey(paramKey)) parameterTypes.put(paramKey, type); }
public static void setImplicitTypes(Value val1, Value val2, Class<?> expected, Resolver resolver, OrderedMap<Object,Class<?>> parameterTypes, String currentQuery) { AbstractExpressionBuilder.setImplicitTypes(val1, val2, expected, resolver); // as well as setting the types for conversions, we also need to // ensure that any parameters are declared with the correct type, // since the JPA spec expects that these will be validated Parameter param = val1 instanceof Parameter ? (Parameter) val1 : val2 instanceof Parameter ? (Parameter) val2 : null; Path path = val1 instanceof Path ? (Path) val1 : val2 instanceof Path ? (Path) val2 : null; // we only check for parameter-to-path comparisons if (param == null || path == null || parameterTypes == null) return; FieldMetaData fmd = path.last(); if (fmd == null) return; if (expected == null) checkEmbeddable(path, currentQuery); Class<?> type = path.getType(); if (type == null) return; Object paramKey = param.getParameterKey(); if (paramKey == null) return; // make sure we have already declared the parameter if (parameterTypes.containsKey(paramKey)) parameterTypes.put(paramKey, type); }
public static void setImplicitTypes(Value val1, Value val2, Class<?> expected, Resolver resolver, OrderedMap<Object,Class<?>> parameterTypes, String currentQuery) { AbstractExpressionBuilder.setImplicitTypes(val1, val2, expected, resolver); // as well as setting the types for conversions, we also need to // ensure that any parameters are declared with the correct type, // since the JPA spec expects that these will be validated Parameter param = val1 instanceof Parameter ? (Parameter) val1 : val2 instanceof Parameter ? (Parameter) val2 : null; Path path = val1 instanceof Path ? (Path) val1 : val2 instanceof Path ? (Path) val2 : null; // we only check for parameter-to-path comparisons if (param == null || path == null || parameterTypes == null) return; FieldMetaData fmd = path.last(); if (fmd == null) return; if (expected == null) checkEmbeddable(path, currentQuery); Class<?> type = path.getType(); if (type == null) return; Object paramKey = param.getParameterKey(); if (paramKey == null) return; // make sure we have already declared the parameter if (parameterTypes.containsKey(paramKey)) parameterTypes.put(paramKey, type); }
protected void setImplicitTypes(Value val1, Value val2, Class expected) { super.setImplicitTypes(val1, val2, expected); // as well as setting the types for conversions, we also need to // ensure that any parameters are declared with the correct type, // since the JPA spec expects that these will be validated Parameter param = val1 instanceof Parameter ? (Parameter) val1 : val2 instanceof Parameter ? (Parameter) val2 : null; Path path = val1 instanceof Path ? (Path) val1 : val2 instanceof Path ? (Path) val2 : null; // we only check for parameter-to-path comparisons if (param == null || path == null || parameterTypes == null) return; FieldMetaData fmd = path.last(); if (fmd == null) return; Class type = path.isXPath() ? path.getType() : fmd.getType(); if (type == null) return; String paramName = param.getParameterName(); if (paramName == null) return; // make sure we have already declared the parameter if (parameterTypes.containsKey(paramName)) parameterTypes.put(paramName, type); }