public List<ObjectAdapter> loadInstancesAndAdapt(final PersistenceQuery persistenceQuery) {
if (!(persistenceQuery instanceof PersistenceQueryBuiltIn)) {
throw new IllegalArgumentException(MessageFormat.format("Provided PersistenceQuery not supported; was {0}; " + "the XML object store only supports {1}", persistenceQuery.getClass().getName(), PersistenceQueryBuiltIn.class.getName()));
}
final PersistenceQueryBuiltIn builtIn = (PersistenceQueryBuiltIn) persistenceQuery;
final ObjectSpecification objSpec = builtIn.getSpecification();
LOG.debug("getInstances of " + objSpec + " where " + builtIn);
final RootOid oid = RootOidDefault.create(objSpec.getSpecId(), "dummy");
final ObjectData patternData = new ObjectData(oid, null);
return getInstances(patternData, builtIn);
}