/** * Set any default select clauses for the main bean and any joins that have * not explicitly defined a select clause. * <p> * That is this will use FetchType.LAZY to exclude some properties by * default. * </p> */ public void setDefaultSelectClause(BeanDescriptor<?> desc) { if (desc.hasDefaultSelectClause() && !hasSelectClause()) { if (baseProps == null) { baseProps = new OrmQueryProperties(); } baseProps.setDefaultProperties(desc.getDefaultSelectClause(), desc.getDefaultSelectClauseSet()); } for (OrmQueryProperties joinProps : fetchPaths.values()) { if (!joinProps.hasSelectClause()) { BeanDescriptor<?> assocDesc = desc.getBeanDescriptor(joinProps.getPath()); if (assocDesc.hasDefaultSelectClause()) { // use the default select clause joinProps.setDefaultProperties(assocDesc.getDefaultSelectClause(), assocDesc.getDefaultSelectClauseSet()); } } } }
/** * Set any default select clauses for the main bean and any joins that have * not explicitly defined a select clause. * <p> * That is this will use FetchType.LAZY to exclude some properties by * default. * </p> */ public void setDefaultSelectClause(BeanDescriptor<?> desc) { if (desc.hasDefaultSelectClause() && !hasSelectClause()) { if (baseProps == null) { baseProps = new OrmQueryProperties(); } baseProps.setDefaultProperties(desc.getDefaultSelectClause(), desc.getDefaultSelectClauseSet()); } for (OrmQueryProperties joinProps : fetchPaths.values()) { if (!joinProps.hasSelectClause()) { BeanDescriptor<?> assocDesc = desc.getBeanDescriptor(joinProps.getPath()); if (assocDesc.hasDefaultSelectClause()) { // use the default select clause joinProps.setDefaultProperties(assocDesc.getDefaultSelectClause(), assocDesc.getDefaultSelectClauseSet()); } } } }
String path = pathIt.next(); Set<String> props = pathProps.get(path); detail.getChunk(path, true).setDefaultProperties(null, props);
String path = pathIt.next(); Set<String> props = pathProps.get(path); detail.getChunk(path, true).setDefaultProperties(null, props);