boolean isAssociation = false; int count = 1; String fieldName = pathExp.getPath(count++); String attName = pathExp.getPath(count++); fieldName = fieldName + "." + attName; attrib = (AbstractAttribute) embeddableType.getAttribute(attName); String attName = pathExp.getPath(count++); fieldName = fieldName + "." + attName; EntityType associatedType = metaModel.entity(attrib.getBindableJavaType()); if (!pathExp.getPath(count - 1).equals(discriminatorColumn))
private void resolveVirtualPath(AbstractPathExpression expression) { String path = expression.getPath(1); localExpression = localExpression.get(path); }
/** * Resolves a database column. * * @param expression The path expression representing an identification variable mapping to a * database table followed by the column name */ private void resolveColumn(AbstractPathExpression expression) { String path = expression.getPath(1); localExpression = localExpression.getField(path); }
/** * Resolves a database column. * * @param expression The path expression representing an identification variable mapping to a * database table followed by the column name */ private void resolveColumn(AbstractPathExpression expression) { String path = expression.getPath(1); localExpression = localExpression.getField(path); }
private void resolveVirtualPath(AbstractPathExpression expression) { String path = expression.getPath(1); localExpression = localExpression.get(path); }
protected void visitAbstractPathExpression(AbstractPathExpression expression) { if (type == LiteralType.PATH_EXPRESSION_IDENTIFICATION_VARIABLE) { expression.getIdentificationVariable().accept(this); } else if (type == LiteralType.PATH_EXPRESSION_ALL_PATH) { literal = expression.toParsedText(); } else if (type == LiteralType.PATH_EXPRESSION_LAST_PATH) { literal = expression.getPath(expression.pathSize() - 1); } } }
protected void visitAbstractPathExpression(AbstractPathExpression expression) { if (type == LiteralType.PATH_EXPRESSION_IDENTIFICATION_VARIABLE) { expression.getIdentificationVariable().accept(this); } else if (type == LiteralType.PATH_EXPRESSION_ALL_PATH) { literal = expression.toParsedText(); } else if (type == LiteralType.PATH_EXPRESSION_LAST_PATH) { literal = expression.getPath(expression.pathSize() - 1); } } }
/** * Attempts to resolve the path expression as a fully qualified enum constant. * * @param expression The {@link AbstractPathExpression} that might represent an enum constant * @return <code>true</code> if the path was a fully qualified enum constant; <code>false</code> * if it's an actual path expression */ protected boolean resolveEnumConstant(AbstractPathExpression expression) { String fullPath = expression.toParsedText(); Class<?> enumType = queryContext.getEnumType(fullPath); if (enumType != null) { // Make sure we keep track of the enum type type[0] = enumType; // Retrieve the enum constant String path = expression.getPath(expression.pathSize() - 1); Enum<?> enumConstant = retrieveEnumConstant(enumType, path); // Create the Expression localExpression = new ConstantExpression(enumConstant, new ExpressionBuilder()); return true; } return false; }
/** * Attempts to resolve the path expression as a fully qualified enum constant. * * @param expression The {@link AbstractPathExpression} that might represent an enum constant * @return <code>true</code> if the path was a fully qualified enum constant; <code>false</code> * if it's an actual path expression */ protected boolean resolveEnumConstant(AbstractPathExpression expression) { String fullPath = expression.toParsedText(); Class<?> enumType = queryContext.getEnumType(fullPath); if (enumType != null) { // Make sure we keep track of the enum type type[0] = enumType; // Retrieve the enum constant String path = expression.getPath(expression.pathSize() - 1); Enum<?> enumConstant = retrieveEnumConstant(enumType, path); // Create the Expression localExpression = new ConstantExpression(enumConstant, new ExpressionBuilder()); return true; } return false; }
String path = expression.getPath(index);
String path = expression.getPath(index); Resolver childResolver = resolver.getChild(path);
String path = expression.getPath(index); mapping = descriptor.getObjectBuilder().getMappingForAttributeName(path);
String path = expression.getPath(index); mapping = descriptor.getObjectBuilder().getMappingForAttributeName(path);
String path = expression.getPath(index); DatabaseMapping mapping = descriptor.getObjectBuilder().getMappingForAttributeName(path); boolean last = (index + 1 == count);
String path = expression.getPath(index); DatabaseMapping mapping = descriptor.getObjectBuilder().getMappingForAttributeName(path); boolean last = (index + 1 == count);