private boolean hasInstancesFromPersistenceLayer(final ObjectSpecification specification) {
final String specFullName = specification.getFullIdentifier();
return getTransactionManager().executeWithinTransaction(new TransactionalClosureWithReturnAbstract<Boolean>() {
@Override
public Boolean execute() {
final HasInstancesRequest request = new HasInstancesRequest(getAuthenticationSession(), specFullName);
final HasInstancesResponse response = serverFacade.hasInstances(request);
return response.hasInstances();
}
});
}