/** * Return true if this many node should be included in the query. */ private boolean isIncludeMany(String prefix, String propName, BeanPropertyAssocMany<?> manyProp) { if (queryDetail.isJoinsEmpty()) { return false; } if (queryDetail.includes(propName)) { if (manyProperty != null) { // only one many associated allowed to be included in fetch if (logger.isLoggable(Level.FINE)) { String msg = "Not joining [" + propName + "] as already joined to a Many[" + manyProperty + "]."; logger.fine(msg); } return false; } manyProperty = manyProp; manyPropertyName = propName; summary.append(" +many:").append(propName); return true; } return false; }
/** * Return true if this many node should be included in the query. */ private boolean isIncludeMany(String prefix, String propName, BeanPropertyAssocMany<?> manyProp) { if (queryDetail.isJoinsEmpty()) { return false; } if (queryDetail.includes(propName)) { if (manyProperty != null) { // only one many associated allowed to be included in fetch if (logger.isLoggable(Level.FINE)) { String msg = "Not joining [" + propName + "] as already joined to a Many[" + manyProperty + "]."; logger.fine(msg); } return false; } manyProperty = manyProp; manyPropertyName = propName; summary.append(" +many:").append(propName); return true; } return false; }
/** * Return the many property included in the query or null if one is not. */ public BeanPropertyAssocMany<?> getManyProperty(SpiQuery<?> query) { OrmQueryDetail detail = query.getDetail(); for (int i = 0; i < propertiesMany.length; i++) { if (detail.includes(propertiesMany[i].getName())) { return propertiesMany[i]; } } return null; }
/** * Test to see if we are including this node into the query. * <p> * Return true if this node is FULLY included resulting in table join. If * the node is not included but its parent has been included then a "bean * proxy" is added and false is returned. * </p> */ private boolean isIncludeBean(String prefix, BeanPropertyAssocOne<?> prop) { if (queryDetail.includes(prefix)) { // explicitly included summary.append(", ").append(prefix); String[] splitNames = SplitName.split(prefix); queryDetail.includeBeanJoin(splitNames[0], splitNames[1]); return true; } return false; }
/** * Return the many property included in the query or null if one is not. */ public BeanPropertyAssocMany<?> getManyProperty(SpiQuery<?> query) { OrmQueryDetail detail = query.getDetail(); for (int i = 0; i < propertiesMany.length; i++) { if (detail.includes(propertiesMany[i].getName())) { return propertiesMany[i]; } } return null; }
/** * Test to see if we are including this node into the query. * <p> * Return true if this node is FULLY included resulting in table join. If * the node is not included but its parent has been included then a "bean * proxy" is added and false is returned. * </p> */ private boolean isIncludeBean(String prefix, BeanPropertyAssocOne<?> prop) { if (queryDetail.includes(prefix)) { // explicitly included summary.append(", ").append(prefix); String[] splitNames = SplitName.split(prefix); queryDetail.includeBeanJoin(splitNames[0], splitNames[1]); return true; } return false; }