/** * Implements default routing mechanism relying on the EntityResolver to find DataMap * based on the query root. This mechanism should be sufficient for most queries that * "know" their root. * * @since 1.2 */ public void route(QueryRouter router, EntityResolver resolver, Query substitutedQuery) { DataMap map = getMetaData(resolver).getDataMap(); if (map == null) { throw new CayenneRuntimeException("No DataMap found, can't route query %s", this); } router.route(router.engineForDataMap(map), this, substitutedQuery); } }
/** * Implements default routing mechanism relying on the EntityResolver to find DataMap * based on the query root. This mechanism should be sufficient for most queries that * "know" their root. * * @since 1.2 */ public void route(QueryRouter router, EntityResolver resolver, Query substitutedQuery) { DataMap map = getMetaData(resolver).getDataMap(); if (map == null) { throw new CayenneRuntimeException("No DataMap found, can't route query " + this); } router.route(router.engineForDataMap(map), this, substitutedQuery); } }