Search in sources :

Example 11 with FetchGroup

use of org.eclipse.persistence.queries.FetchGroup in project cuba by cuba-platform.

the class EclipseLinkDescriptorEventListener method postRefresh.

@Override
public void postRefresh(DescriptorEvent event) {
    if (event.getObject() instanceof FetchGroupTracker) {
        FetchGroupTracker entity = (FetchGroupTracker) event.getObject();
        FetchGroup fetchGroup = entity._persistence_getFetchGroup();
        if (fetchGroup != null && !(fetchGroup instanceof CubaEntityFetchGroup))
            entity._persistence_setFetchGroup(new CubaEntityFetchGroup(fetchGroup));
    }
}
Also used : FetchGroupTracker(org.eclipse.persistence.queries.FetchGroupTracker) FetchGroup(org.eclipse.persistence.queries.FetchGroup)

Aggregations

FetchGroup (org.eclipse.persistence.queries.FetchGroup)11 FetchGroupTracker (org.eclipse.persistence.queries.FetchGroupTracker)8 MetaClass (com.haulmont.chile.core.model.MetaClass)3 MetaProperty (com.haulmont.chile.core.model.MetaProperty)3 AttributeGroup (org.eclipse.persistence.queries.AttributeGroup)3 LoadGroup (org.eclipse.persistence.queries.LoadGroup)3 BaseGenericIdEntity (com.haulmont.cuba.core.entity.BaseGenericIdEntity)2 Entity (com.haulmont.cuba.core.entity.Entity)2 Method (java.lang.reflect.Method)2 Preconditions (com.haulmont.bali.util.Preconditions)1 MetaPropertyPath (com.haulmont.chile.core.model.MetaPropertyPath)1 Range (com.haulmont.chile.core.model.Range)1 BaseUuidEntity (com.haulmont.cuba.core.entity.BaseUuidEntity)1 EmbeddableEntity (com.haulmont.cuba.core.entity.EmbeddableEntity)1 SoftDelete (com.haulmont.cuba.core.entity.SoftDelete)1 com.haulmont.cuba.core.global (com.haulmont.cuba.core.global)1 CubaEntityFetchGroup (com.haulmont.cuba.core.sys.persistence.CubaEntityFetchGroup)1 java.util (java.util)1 Collectors (java.util.stream.Collectors)1 Nullable (javax.annotation.Nullable)1