*/
protected final PersistenceQuery createPersistenceQueryFor(final Query<?> query, final QueryCardinality cardinality) {
LOG.debug("createPersistenceQueryFor: " + query.getDescription());
final ObjectSpecification noSpec = specFor(query);
if (query instanceof QueryFindAllInstances) {
return new PersistenceQueryFindAllInstances(noSpec);
}
if (query instanceof QueryFindByTitle) {
final QueryFindByTitle<?> queryByTitle = (QueryFindByTitle<?>) query;
final String title = queryByTitle.getTitle();
return new PersistenceQueryFindByTitle(noSpec, title);