Search in sources :

Example 1 with EntityClassInfo

use of com.haulmont.cuba.core.sys.EntityClassInfo in project cuba by cuba-platform.

the class TestMetadataLoader method loadMetadata.

@Override
public void loadMetadata() {
    initDatatypes(null);
    MetaModelLoader modelLoader = createModelLoader(session);
    for (Map.Entry<String, List<String>> entry : packages.entrySet()) {
        List<EntityClassInfo> classInfos = entry.getValue().stream().map(name -> new EntityClassInfo(null, name, false)).collect(Collectors.toList());
        modelLoader.loadModel(entry.getKey(), classInfos);
    }
    for (MetaClass metaClass : session.getClasses()) {
        postProcessClass(metaClass);
        initMetaAnnotations(metaClass);
    }
}
Also used : List(java.util.List) MetaModelLoader(com.haulmont.cuba.core.sys.MetaModelLoader) Map(java.util.Map) EntityClassInfo(com.haulmont.cuba.core.sys.EntityClassInfo) MetadataLoader(com.haulmont.cuba.core.sys.MetadataLoader) Element(org.dom4j.Element) DatatypeRegistry(com.haulmont.chile.core.datatypes.DatatypeRegistry) Collectors(java.util.stream.Collectors) MetaClass(com.haulmont.chile.core.model.MetaClass) Session(com.haulmont.chile.core.model.Session) MetaClass(com.haulmont.chile.core.model.MetaClass) MetaModelLoader(com.haulmont.cuba.core.sys.MetaModelLoader) List(java.util.List) Map(java.util.Map) EntityClassInfo(com.haulmont.cuba.core.sys.EntityClassInfo)

Aggregations

DatatypeRegistry (com.haulmont.chile.core.datatypes.DatatypeRegistry)1 MetaClass (com.haulmont.chile.core.model.MetaClass)1 Session (com.haulmont.chile.core.model.Session)1 EntityClassInfo (com.haulmont.cuba.core.sys.EntityClassInfo)1 MetaModelLoader (com.haulmont.cuba.core.sys.MetaModelLoader)1 MetadataLoader (com.haulmont.cuba.core.sys.MetadataLoader)1 List (java.util.List)1 Map (java.util.Map)1 Collectors (java.util.stream.Collectors)1 Element (org.dom4j.Element)1