Query createQuery(String jpaQuery, final String persistenceUnit)
{
Client client = getClient(persistenceUnit);
EntityMetadata metadata = KunderaMetadataManager.getMetamodel(kunderaMetadata, client.getPersistenceUnit())
.getEntityMetadataMap().values().iterator().next();
Query query = new QueryResolver().getQueryImplementation(jpaQuery, getClient(persistenceUnit)
.getQueryImplementor(), this, metadata);
return query;
}