/** * Define the select and joins for this query. */ @SuppressWarnings("unchecked") public void configureBeanQuery(SpiQuery<?> query) { if (trimmedProperties != null && trimmedProperties.length() > 0) { query.select(trimmedProperties); if (filterMany != null){ query.setFilterMany(path, filterMany); } } if (secondaryChildren != null) { int trimPath = path.length() + 1; for (int i = 0; i < secondaryChildren.size(); i++) { OrmQueryProperties p = secondaryChildren.get(i); String path = p.getPath(); path = path.substring(trimPath); query.fetch(path, p.getProperties(), p.getFetchConfig()); query.setFilterMany(path, p.getFilterManyTrimPath(trimPath)); } } if (orderBy != null){ List<Property> orderByProps = orderBy.getProperties(); for (int i = 0; i < orderByProps.size(); i++) { orderByProps.get(i).trim(path); } query.setOrder(orderBy); } }
/** * Define the select and joins for this query. */ @SuppressWarnings("unchecked") public void configureBeanQuery(SpiQuery<?> query) { if (trimmedProperties != null && trimmedProperties.length() > 0) { query.select(trimmedProperties); if (filterMany != null){ query.setFilterMany(path, filterMany); } } if (secondaryChildren != null) { int trimPath = path.length() + 1; for (int i = 0; i < secondaryChildren.size(); i++) { OrmQueryProperties p = secondaryChildren.get(i); String path = p.getPath(); path = path.substring(trimPath); query.fetch(path, p.getProperties(), p.getFetchConfig()); query.setFilterMany(path, p.getFilterManyTrimPath(trimPath)); } } if (orderBy != null){ List<Property> orderByProps = orderBy.getProperties(); for (int i = 0; i < orderByProps.size(); i++) { orderByProps.get(i).trim(path); } query.setOrder(orderBy); } }