Search in sources :

Example 1 with PojoModelToModelsQuery

use of org.whole.lang.pojo.templates.PojoModelToModelsQuery in project whole by wholeplatform.

the class PojoMappingUtils method getModel.

public static Model getModel(Library library) {
    IBindingManager bindings = BindingManagerFactory.instance.createBindingManager();
    PathExpression pojoModelToModels = new PojoModelToModelsQuery().create();
    Library normalizedLibrary = NormalizerOperation.normalize(EntityUtils.clone(library));
    Model model = BehaviorUtils.<Model>evaluateFirstResult(pojoModelToModels, normalizedLibrary, bindings);
    Matcher.removeVars(model, true);
    return model;
}
Also used : PathExpression(org.whole.lang.queries.model.PathExpression) PojoModelToModelsQuery(org.whole.lang.pojo.templates.PojoModelToModelsQuery) IBindingManager(org.whole.lang.bindings.IBindingManager) Model(org.whole.lang.models.model.Model) Library(org.whole.lang.pojo.model.Library)

Aggregations

IBindingManager (org.whole.lang.bindings.IBindingManager)1 Model (org.whole.lang.models.model.Model)1 Library (org.whole.lang.pojo.model.Library)1 PojoModelToModelsQuery (org.whole.lang.pojo.templates.PojoModelToModelsQuery)1 PathExpression (org.whole.lang.queries.model.PathExpression)1