String statement = node.getProperty(resolver.getJCRName(NameConstants.JCR_STATEMENT)).getString();
String language = node.getProperty(resolver.getJCRName(NameConstants.JCR_LANGUAGE)).getString();
if (Query.JCR_JQOM.equals(language)) {
QueryObjectModelFactory qomFactory = new QOMFactory(node, resolver);
QueryObjectModelBuilder builder = QueryObjectModelBuilderRegistry.getQueryObjectModelBuilder(language);
return builder.createQueryObjectModel(statement, qomFactory, valueFactory);
} else {
return new QueryImpl(session, mgrProvider, itemMgr, wspManager,
statement, language, node);
}
}