Package com.impetus.kundera.client

Examples of com.impetus.kundera.client.EnhanceEntity


        {
            entity = (E) nextResult;
        }

        Object id = PropertyAccessorHelper.getId(entity, m);
        entity = (E) new EnhanceEntity(entity, id, noRelationFound ? null : populateRelations(m.getRelationNames(),
                (Object[]) nextResult));

        if (!m.isRelationViaJoinTable() && (m.getRelationNames() == null || (m.getRelationNames().isEmpty())))
        {
            return entity;
View Full Code Here


        E result = null;
        if (enhanceEntity != null)
        {
            if (!(enhanceEntity instanceof EnhanceEntity))
            {
                enhanceEntity = new EnhanceEntity(enhanceEntity, PropertyAccessorHelper.getId(enhanceEntity, m), null);
            }
            EnhanceEntity ee = (EnhanceEntity) enhanceEntity;

            result = (E) client.getReader().recursivelyFindEntities(ee.getEntity(), ee.getRelations(), m,
                    persistenceDelegator, false);
        }
        return result;
    }
View Full Code Here

            }
            PropertyAccessorHelper.set(entity, (Field) entityMetadata.getIdAttribute().getJavaMember(), key);
        }
        if (!relations.isEmpty())
        {
            return new EnhanceEntity(entity, key, relations);
        }

        return entity;
    }
View Full Code Here

        Class<?> nodeDataClass = nodeStateContext.getDataClass();
        EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(nodeStateContext.getPersistenceDelegator().getKunderaMetadata(), nodeDataClass);
        Object entityId = nodeStateContext.getEntityId();

        EntityReader reader = client.getReader();
        EnhanceEntity ee = reader.findById(entityId, entityMetadata, client);

        if (ee != null && ee.getEntity() != null)
        {
            Object nodeData = ee.getEntity();
            nodeStateContext.setData(nodeData);
        }

        // Cascade refresh operation for all related entities for whom
        // cascade=ALL or REFRESH
View Full Code Here

        if (reader == null)
        {
            return;
        }

        EnhanceEntity ee = reader.findById(entityId, entityMetadata, client);
        // Recursively retrieve relationship entities (if there are any)
        if (ee != null && ee.getEntity() != null)
        {
            Object entity = ee.getEntity();

            if ((entityMetadata.getRelationNames() == null || entityMetadata.getRelationNames().isEmpty())
                    && !entityMetadata.isRelationViaJoinTable())
            {
                // There is no relation (not even via Join Table), Construct
                // Node out of this enhance entity,
                nodeData = entity;
            }

            else
            {
                // This entity has associated entities, find them recursively.
                nodeData = reader.recursivelyFindEntities(ee.getEntity(), ee.getRelations(), entityMetadata,
                        nodeStateContext.getPersistenceDelegator(), false);
            }
        }

        // Construct Node out of this entity and put into Persistence Cache
View Full Code Here

TOP

Related Classes of com.impetus.kundera.client.EnhanceEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.