public void setFilterMany(String prop, ExpressionList<?> filterMany){ if (filterMany != null){ OrmQueryProperties chunk = detail.getChunk(prop, true); chunk.setFilterMany((SpiExpressionList<?>)filterMany); } }
public ExpressionList<T> filterMany(String prop){ OrmQueryProperties chunk = detail.getChunk(prop, true); return chunk.filterMany(this); }
public void setFilterMany(String prop, ExpressionList<?> filterMany){ if (filterMany != null){ OrmQueryProperties chunk = detail.getChunk(prop, true); chunk.setFilterMany((SpiExpressionList<?>)filterMany); } }
@Override public ExpressionList<T> filterMany(String prop) { OrmQueryProperties chunk = detail.getChunk(prop, true); return chunk.filterMany(this); }
@Override public void setFilterMany(String prop, ExpressionList<?> filterMany) { if (filterMany != null) { OrmQueryProperties chunk = detail.getChunk(prop, true); chunk.setFilterMany((SpiExpressionList<?>) filterMany); } }
/** * Add the explicit bean join. * <p> * This is also used to Exclude the matching property from the parent select * (aka remove the foreign key) because it is now included in it's on node * in the SqlTree. * </p> */ public void includeBeanJoin(String parentPath, String propertyName) { OrmQueryProperties parentChunk = getChunk(parentPath, true); parentChunk.includeBeanJoin(propertyName); }
/** * Add the explicit bean join. * <p> * This is also used to Exclude the matching property from the parent select (aka remove the * foreign key) because it is now included in it's on node in the SqlTree. * </p> */ public void includeBeanJoin(String parentPath, String propertyName) { OrmQueryProperties parentChunk = getChunk(parentPath, true); parentChunk.includeBeanJoin(propertyName); }
/** * Add the explicit bean join. * <p> * This is also used to Exclude the matching property from the parent select * (aka remove the foreign key) because it is now included in it's on node * in the SqlTree. * </p> */ public void includeBeanJoin(String parentPath, String propertyName) { OrmQueryProperties parentChunk = getChunk(parentPath, true); parentChunk.includeBeanJoin(propertyName); }
public ExpressionList<T> filterMany(String prop){ OrmQueryProperties chunk = detail.getChunk(prop, true); return chunk.filterMany(this); }
boolean tuneFetchProperties(OrmQueryDetail tunedDetail) { boolean tuned = false; OrmQueryProperties tunedRoot = tunedDetail.getChunk(null, false); if (tunedRoot != null) { tuned = true; baseProps = tunedRoot; for (OrmQueryProperties tunedChunk : tunedDetail.fetchPaths.values()) { fetch(tunedChunk.copy()); } } return tuned; }
/** * Return true if equal in terms of autoTune (select and fetch without property ordering). */ public boolean isAutoTuneEqual(OrmQueryDetail otherDetail) { if (!isSameByAutoTune(baseProps, otherDetail.baseProps)) { return false; } if (fetchPaths == null) { return otherDetail.fetchPaths == null; } if (fetchPaths.size() != otherDetail.fetchPaths.size()) { return false; } // check without regard to ordering for (Map.Entry<String, OrmQueryProperties> entry : fetchPaths.entrySet()) { OrmQueryProperties chunk = otherDetail.getChunk(entry.getKey(), false); if (!isSameByAutoTune(entry.getValue(), chunk)) { return false; } } return true; }
/** * Set the fetch properties and configuration for a given path. * * @param path * the property to join * @param partialProps * the properties on the join property to include */ public OrmQueryProperties addFetch(String path, String partialProps, FetchConfig fetchConfig) { OrmQueryProperties chunk = getChunk(path, true); chunk.setProperties(partialProps); chunk.setFetchConfig(fetchConfig); return chunk; }
/** * Set the fetch properties and configuration for a given path. * * @param path * the property to join * @param partialProps * the properties on the join property to include */ public OrmQueryProperties addFetch(String path, String partialProps, FetchConfig fetchConfig) { OrmQueryProperties chunk = getChunk(path, true); chunk.setProperties(partialProps); chunk.setFetchConfig(fetchConfig); return chunk; }
public String[] getSelectedProperties() { OrmQueryProperties chunk = query.getDetail().getChunk(null, false); if (chunk.allProperties()) { return null; } // convert to array of String[] for setReturningAttributes(); ArrayList<String> ldapSelectProps = new ArrayList<String>(); Iterator<String> selectProperties = chunk.getSelectProperties(); while (selectProperties.hasNext()) { String propName = selectProperties.next(); BeanProperty p = desc.getBeanProperty(propName); if (p != null) { propName = p.getDbColumn(); } ldapSelectProps.add(propName); } return ldapSelectProps.toArray(new String[ldapSelectProps.size()]); }
public String[] getSelectedProperties() { OrmQueryProperties chunk = query.getDetail().getChunk(null, false); if (chunk.allProperties()) { return null; } // convert to array of String[] for setReturningAttributes(); ArrayList<String> ldapSelectProps = new ArrayList<String>(); Iterator<String> selectProperties = chunk.getSelectProperties(); while (selectProperties.hasNext()) { String propName = selectProperties.next(); BeanProperty p = desc.getBeanProperty(propName); if (p != null) { propName = p.getDbColumn(); } ldapSelectProps.add(propName); } return ldapSelectProps.toArray(new String[ldapSelectProps.size()]); }
public boolean tuneFetchProperties(OrmQueryDetail tunedDetail) { boolean tuned = false; OrmQueryProperties tunedRoot = tunedDetail.getChunk(null, false); if (tunedRoot != null && tunedRoot.hasProperties()) { tuned = true; baseProps.setTunedProperties(tunedRoot); for (OrmQueryProperties tunedChunk : tunedDetail.fetchPaths.values()) { OrmQueryProperties chunk = getChunk(tunedChunk.getPath(), false); if (chunk != null) { // set the properties to select chunk.setTunedProperties(tunedChunk); } else { // add a missing join putFetchPath(tunedChunk.copy()); } } } return tuned; }
public boolean tuneFetchProperties(OrmQueryDetail tunedDetail) { boolean tuned = false; OrmQueryProperties tunedRoot = tunedDetail.getChunk(null, false); if (tunedRoot != null && tunedRoot.hasProperties()) { tuned = true; baseProps.setTunedProperties(tunedRoot); for (OrmQueryProperties tunedChunk : tunedDetail.fetchPaths.values()) { OrmQueryProperties chunk = getChunk(tunedChunk.getPath(), false); if (chunk != null) { // set the properties to select chunk.setTunedProperties(tunedChunk); } else { // add a missing join putFetchPath(tunedChunk.copy()); } } } return tuned; }
private SqlTreeNode buildNode(String prefix, BeanPropertyAssoc<?> prop, BeanDescriptor<?> desc, List<SqlTreeNode> myList) { OrmQueryProperties queryProps = queryDetail.getChunk(prefix, false); SqlTreeProperties props = getBaseSelect(desc, queryProps); if (prefix == null) { buildExtraJoins(desc, myList); return new SqlTreeNodeRoot(desc, props, myList, !subQuery, includeJoin); } else if (prop instanceof BeanPropertyAssocMany<?>) { return new SqlTreeNodeManyRoot(prefix, (BeanPropertyAssocMany<?>) prop, props, myList); } else { return new SqlTreeNodeBean(prefix, prop, props, myList, true); } }
private SqlTreeNode buildNode(String prefix, BeanPropertyAssoc<?> prop, BeanDescriptor<?> desc, List<SqlTreeNode> myList) { OrmQueryProperties queryProps = queryDetail.getChunk(prefix, false); SqlTreeProperties props = getBaseSelect(desc, queryProps); if (prefix == null) { buildExtraJoins(desc, myList); return new SqlTreeNodeRoot(desc, props, myList, !subQuery, includeJoin); } else if (prop instanceof BeanPropertyAssocMany<?>) { return new SqlTreeNodeManyRoot(prefix, (BeanPropertyAssocMany<?>) prop, props, myList); } else { return new SqlTreeNodeBean(prefix, prop, props, myList, true); } }
OrmQueryProperties chunk = query.getDetail().getChunk(manyProperty.getName(), false); SpiExpressionList<?> filterManyExpr = chunk.getFilterMany(); if (filterManyExpr != null) {