/** INTERNAL: Set the properties needed to be cascaded into the custom query. */ protected void prepareCustomQuery(DatabaseQuery customQuery) { ReadAllQuery customReadQuery = (ReadAllQuery) customQuery; customReadQuery.setContainerPolicy(getContainerPolicy()); customReadQuery.setCascadePolicy(getCascadePolicy()); customReadQuery.setShouldRefreshIdentityMapResult(shouldRefreshIdentityMapResult()); customReadQuery.setShouldMaintainCache(shouldMaintainCache()); customReadQuery.setShouldUseWrapperPolicy(shouldUseWrapperPolicy()); }