protected void traversePath(PathImpl<?,?> parent, org.apache.openjpa.kernel.exps.Path path, FieldMetaData fmd) { boolean allowNull = parent == null ? false : parent instanceof Join && ((Join<?,?>)parent).getJoinType() != JoinType.INNER; FieldMetaData fmd1 = parent._member == null ? null : parent._member.fmd; PathImpl<?,?> parent1 = parent._parent; if (parent1 == null || parent1.getCorrelatedPath() != null) { if (fmd != null) path.get(fmd, allowNull); return; } traversePath(parent1, path, fmd1); if (fmd != null) path.get(fmd, allowNull); }
protected Value traverseXPath(Path path, String field) { XMLMetaData meta = path.getXmlMapping(); if (meta.getFieldMapping(field) == null) { throw parseException(EX_USER, "no-field", new Object[]{ meta.getType(), field }, null); } else { // collection-valued xpath is not allowed int type = meta.getFieldMapping(field).getTypeCode(); switch (type) { case JavaTypes.ARRAY: case JavaTypes.COLLECTION: case JavaTypes.MAP: throw new UserException(_loc.get("collection-valued-path", field)); } } path.get(meta, field); return path; }
protected Value traverseXPath(Path path, String field) { XMLMetaData meta = path.getXmlMapping(); if (meta.getFieldMapping(field) == null) { throw parseException(EX_USER, "no-field", new Object[]{ meta.getType(), field }, null); } else { // collection-valued xpath is not allowed int type = meta.getFieldMapping(field).getTypeCode(); switch (type) { case JavaTypes.ARRAY: case JavaTypes.COLLECTION: case JavaTypes.MAP: throw new UserException(_loc.get("collection-valued-path", field)); } } path.get(meta, field); return path; }
protected void traversePath(PathImpl<?,?> parent, org.apache.openjpa.kernel.exps.Path path, FieldMetaData fmd) { boolean allowNull = parent == null ? false : parent instanceof Join && ((Join<?,?>)parent).getJoinType() != JoinType.INNER; FieldMetaData fmd1 = parent._member == null ? null : parent._member.fmd; PathImpl<?,?> parent1 = parent._parent; if (parent1 == null || parent1.getCorrelatedPath() != null) { if (fmd != null) path.get(fmd, allowNull); return; } traversePath(parent1, path, fmd1); if (fmd != null) path.get(fmd, allowNull); }
protected Value traverseXPath(Path path, String field) { XMLMetaData meta = path.getXmlMapping(); if (meta.getFieldMapping(field) == null) { throw parseException(EX_USER, "no-field", new Object[]{ meta.getType(), field }, null); } else { // collection-valued xpath is not allowed int type = meta.getFieldMapping(field).getTypeCode(); switch (type) { case JavaTypes.ARRAY: case JavaTypes.COLLECTION: case JavaTypes.MAP: throw new UserException(_loc.get("collection-valued-path", field)); } } path.get(meta, field); return path; }
protected void traversePath(PathImpl<?,?> parent, org.apache.openjpa.kernel.exps.Path path, FieldMetaData fmd) { boolean allowNull = parent == null ? false : parent instanceof Join && ((Join<?,?>)parent).getJoinType() != JoinType.INNER; FieldMetaData fmd1 = parent._member == null ? null : parent._member.fmd; PathImpl<?,?> parent1 = parent._parent; if (parent1 == null || parent1.getCorrelatedPath() != null) { if (fmd != null) path.get(fmd, allowNull); return; } traversePath(parent1, path, fmd1); if (fmd != null) path.get(fmd, allowNull); }
protected Value traverseXPath(Path path, String field) { XMLMetaData meta = path.getXmlMapping(); if (meta.getFieldMapping(field) == null) { throw parseException(EX_USER, "no-field", new Object[]{ meta.getType(), field }, null); } else { // collection-valued xpath is not allowed int type = meta.getFieldMapping(field).getTypeCode(); switch (type) { case JavaTypes.ARRAY: case JavaTypes.COLLECTION: case JavaTypes.MAP: throw new UserException(_loc.get("collection-valued-path", field)); } } path.get(meta, field); return path; }
protected void traversePath(PathImpl<?,?> parent, org.apache.openjpa.kernel.exps.Path path, FieldMetaData fmd) { boolean allowNull = parent == null ? false : parent instanceof Join && ((Join<?,?>)parent).getJoinType() != JoinType.INNER; FieldMetaData fmd1 = parent._member == null ? null : parent._member.fmd; PathImpl<?,?> parent1 = parent._parent; if (parent1 == null || parent1.getCorrelatedPath() != null) { if (fmd != null) path.get(fmd, allowNull); return; } traversePath(parent1, path, fmd1); if (fmd != null) path.get(fmd, allowNull); }
protected Value traverseXPath(Path path, String field) { XMLMetaData meta = path.getXmlMapping(); if (meta.getFieldMapping(field) == null) { throw parseException(EX_USER, "no-field", new Object[]{ meta.getType(), field }, null); } else { // collection-valued xpath is not allowed int type = meta.getFieldMapping(field).getTypeCode(); switch (type) { case JavaTypes.ARRAY: case JavaTypes.COLLECTION: case JavaTypes.MAP: throw new UserException(_loc.get("collection-valued-path", field)); } } path.get(meta, field); 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; }
@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; }
/** * 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; }
path = factory.newPath(q.getRegisteredVariable(_parent)); path.setSchemaAlias(q.getAlias(_parent)); path.get(_member.fmd, allowNull); } else if (_parent != null && _parent._correlatedPath != null && q.isRegistered(_parent._correlatedPath)){ path = factory.newPath(q.getRegisteredVariable(_parent._correlatedPath)); path.setSchemaAlias(q.getAlias(_parent._correlatedPath)); path.get(_member.fmd, allowNull); } else if (corrJoin != null || corrRoot != null) { org.apache.openjpa.kernel.exps.Subquery subQ = subquery.getSubQ(); if (val instanceof org.apache.openjpa.kernel.exps.Path) { path = (org.apache.openjpa.kernel.exps.Path)val; path.get(_member.fmd, allowNull); } else { val.setAlias(q.getAlias(this));