/** * Convert this path to a kernel path (value). */ @Override public Value toValue(ExpressionFactory factory, CriteriaQueryImpl<?> c) { org.apache.openjpa.kernel.exps.Path path = null; SubqueryImpl<?> subquery = c.getDelegator(); PathImpl<?,?> parent = getInnermostParentPath(); Value var = c.getRegisteredVariable(this); if (var != null) { path = factory.newPath(var); } else if (parent.inSubquery(subquery)) { org.apache.openjpa.kernel.exps.Subquery subQ = subquery.getSubQ(); path = factory.newPath(subQ); path.setMetaData(subQ.getMetaData()); path.setSchemaAlias(c.getAlias(this)); } else { path = (org.apache.openjpa.kernel.exps.Path) _parent.toValue(factory, c); path.get(_member.fmd, allowNull); } return path; }
/** * Convert this path to a kernel path (value). */ @Override public Value toValue(ExpressionFactory factory, CriteriaQueryImpl<?> c) { org.apache.openjpa.kernel.exps.Path path = null; SubqueryImpl<?> subquery = c.getDelegator(); PathImpl<?,?> parent = getInnermostParentPath(); Value var = c.getRegisteredVariable(this); if (var != null) { path = factory.newPath(var); } else if (parent.inSubquery(subquery)) { org.apache.openjpa.kernel.exps.Subquery subQ = subquery.getSubQ(); path = factory.newPath(subQ); path.setMetaData(subQ.getMetaData()); path.setSchemaAlias(c.getAlias(this)); } else { path = (org.apache.openjpa.kernel.exps.Path) _parent.toValue(factory, c); path.get(_member.fmd, allowNull); } return path; }
/** * Convert this path to a kernel path (value). */ @Override public Value toValue(ExpressionFactory factory, CriteriaQueryImpl<?> c) { org.apache.openjpa.kernel.exps.Path path = null; SubqueryImpl<?> subquery = c.getDelegator(); PathImpl<?,?> parent = getInnermostParentPath(); Value var = c.getRegisteredVariable(this); if (var != null) { path = factory.newPath(var); } else if (parent.inSubquery(subquery)) { org.apache.openjpa.kernel.exps.Subquery subQ = subquery.getSubQ(); path = factory.newPath(subQ); path.setMetaData(subQ.getMetaData()); path.setSchemaAlias(c.getAlias(this)); } else { path = (org.apache.openjpa.kernel.exps.Path) _parent.toValue(factory, c); path.get(_member.fmd, allowNull); } return path; }
/** * Convert this path to a kernel path (value). */ @Override public Value toValue(ExpressionFactory factory, CriteriaQueryImpl<?> c) { org.apache.openjpa.kernel.exps.Path path = null; SubqueryImpl<?> subquery = c.getDelegator(); PathImpl<?,?> parent = getInnermostParentPath(); Value var = c.getRegisteredVariable(this); if (var != null) { path = factory.newPath(var); } else if (parent.inSubquery(subquery)) { org.apache.openjpa.kernel.exps.Subquery subQ = subquery.getSubQ(); path = factory.newPath(subQ); path.setMetaData(subQ.getMetaData()); path.setSchemaAlias(c.getAlias(this)); } else { path = (org.apache.openjpa.kernel.exps.Path) _parent.toValue(factory, c); path.get(_member.fmd, allowNull); } return path; }
@Override public Value toValue(ExpressionFactory factory, CriteriaQueryImpl<?> c) { ClassMetaData meta = _member.fmd.getDeclaredTypeMetaData(); org.apache.openjpa.kernel.exps.Path path = null; SubqueryImpl<?> subquery = c.getDelegator(); PathImpl<?,?> parent = getInnermostParentPath(); Value val = c.getRegisteredValue(this); if (val != null) return val; else if (parent.inSubquery(subquery)) { org.apache.openjpa.kernel.exps.Subquery subQ = subquery.getSubQ(); path = factory.newPath(subQ); path.setMetaData(subQ.getMetaData()); path.setSchemaAlias(c.getAlias(this)); path.get(_member.fmd, allowNull); } else { path = (org.apache.openjpa.kernel.exps.Path) _parent.toValue(factory, c); path.get(_member.fmd, allowNull); path.setMetaData(meta); path.setImplicitType(meta.getDescribedType()); } return path; }
@Override public Value toValue(ExpressionFactory factory, CriteriaQueryImpl<?> c) { ClassMetaData meta = _member.fmd.getDeclaredTypeMetaData(); org.apache.openjpa.kernel.exps.Path path = null; SubqueryImpl<?> subquery = c.getDelegator(); PathImpl<?,?> parent = getInnermostParentPath(); Value val = c.getRegisteredValue(this); if (val != null) return val; else if (parent.inSubquery(subquery)) { org.apache.openjpa.kernel.exps.Subquery subQ = subquery.getSubQ(); path = factory.newPath(subQ); path.setMetaData(subQ.getMetaData()); path.setSchemaAlias(c.getAlias(this)); path.get(_member.fmd, allowNull); } else { path = (org.apache.openjpa.kernel.exps.Path) _parent.toValue(factory, c); path.get(_member.fmd, allowNull); path.setMetaData(meta); path.setImplicitType(meta.getDescribedType()); } return path; }
/** * Adds a join condition to the given expression. * * @param node the node to check * @param inner whether or not the join should be an inner join * @param exp an existing expression to AND, or null if none * @return the Expression with the join condition added */ private Expression addJoin(JPQLNode node, boolean inner, Expression exp) { // the type will be the declared type for the field Path path = getPath(firstChild(node), false, inner); JPQLNode alias = node.getChildCount() >= 2 ? right(node) : null; // OPENJPA-15 support subquery's from clause do not start with // identification_variable_declaration() if (inner && ctx().subquery != null && ctx().schemaAlias == null) { setCandidate(getFieldType(path.last()), alias.text); Path subpath = factory.newPath(ctx().subquery); subpath.setMetaData(ctx().subquery.getMetaData()); exp = and(exp, factory.equal(path, subpath)); } return addJoin(path, alias, exp); }
@Override public Value toValue(ExpressionFactory factory, CriteriaQueryImpl<?> c) { ClassMetaData meta = _member.fmd.getDeclaredTypeMetaData(); org.apache.openjpa.kernel.exps.Path path = null; SubqueryImpl<?> subquery = c.getDelegator(); PathImpl<?,?> parent = getInnermostParentPath(); Value val = c.getRegisteredValue(this); if (val != null) return val; else if (parent.inSubquery(subquery)) { org.apache.openjpa.kernel.exps.Subquery subQ = subquery.getSubQ(); path = factory.newPath(subQ); path.setMetaData(subQ.getMetaData()); path.setSchemaAlias(c.getAlias(this)); path.get(_member.fmd, allowNull); } else { path = (org.apache.openjpa.kernel.exps.Path) _parent.toValue(factory, c); path.get(_member.fmd, allowNull); path.setMetaData(meta); path.setImplicitType(meta.getDescribedType()); } return path; }
@Override public Value toValue(ExpressionFactory factory, CriteriaQueryImpl<?> c) { ClassMetaData meta = _member.fmd.getDeclaredTypeMetaData(); org.apache.openjpa.kernel.exps.Path path = null; SubqueryImpl<?> subquery = c.getDelegator(); PathImpl<?,?> parent = getInnermostParentPath(); Value val = c.getRegisteredValue(this); if (val != null) return val; else if (parent.inSubquery(subquery)) { org.apache.openjpa.kernel.exps.Subquery subQ = subquery.getSubQ(); path = factory.newPath(subQ); path.setMetaData(subQ.getMetaData()); path.setSchemaAlias(c.getAlias(this)); path.get(_member.fmd, allowNull); } else { path = (org.apache.openjpa.kernel.exps.Path) _parent.toValue(factory, c); path.get(_member.fmd, allowNull); path.setMetaData(meta); path.setImplicitType(meta.getDescribedType()); } return path; }
if (ctx().subquery != null) { path = factory.newPath(ctx().subquery); path.setMetaData(ctx().subquery.getMetaData()); } else { path = factory.newPath();
subpath.setMetaData(ctx().subquery.getMetaData()); return and(exp, factory.equal(path, subpath)); } else {
if (ctx().subquery != null) { path = factory.newPath(ctx().subquery); path.setMetaData(ctx().subquery.getMetaData()); } else { path = factory.newPath();
if (ctx().subquery != null) { path = factory.newPath(ctx().subquery); path.setMetaData(ctx().subquery.getMetaData()); } else { path = factory.newPath();
if (ctx().subquery != null) { path = factory.newPath(ctx().subquery); path.setMetaData(ctx().subquery.getMetaData()); } else { path = factory.newPath();
if (ctx().subquery != null) { path = factory.newPath(ctx().subquery); path.setMetaData(ctx().subquery.getMetaData()); } else { path = factory.newPath();
org.apache.openjpa.kernel.exps.Subquery subQ = subquery.getSubQ(); path = factory.newPath(subQ); path.setMetaData(subQ.getMetaData()); path.setSchemaAlias(q.getAlias(_parent)); traversePath(_parent, path, _member.fmd);
org.apache.openjpa.kernel.exps.Subquery subQ = subquery.getSubQ(); path = factory.newPath(subQ); path.setMetaData(subQ.getMetaData()); path.setSchemaAlias(q.getAlias(_parent)); traversePath(_parent, path, _member.fmd);
org.apache.openjpa.kernel.exps.Subquery subQ = subquery.getSubQ(); path = factory.newPath(subQ); path.setMetaData(subQ.getMetaData()); path.setSchemaAlias(q.getAlias(_parent)); traversePath(_parent, path, _member.fmd);
org.apache.openjpa.kernel.exps.Subquery subQ = subquery.getSubQ(); path = factory.newPath(subQ); path.setMetaData(subQ.getMetaData()); path.setSchemaAlias(q.getAlias(_parent)); traversePath(_parent, path, _member.fmd);