private EntityMapper getRootMapper(Class<? extends AttributedType> aClass) { return getMapperFor(aClass).get(0); }
for (EntityMapper finalMapper : this.store.getMapperFor(attributedType.getClass())) { if (!finalMapper.isRoot()) { for (Object child : getAssociatedEntities(attributedType, finalMapper, entityManager)) {
private EntityMapper getRootMapper(Class<? extends AttributedType> aClass) { return getMapperFor(aClass).get(0); }
for (EntityMapper finalMapper : this.store.getMapperFor(attributedType.getClass())) { if (!finalMapper.isRoot()) { for (Object child : getAssociatedEntities(attributedType, finalMapper, entityManager)) {
private EntityMapper getEntityMapperForProperty(Class<? extends AttributedType> attributedType, String propertyName) { for (EntityMapper entityMapper : getMapperFor(attributedType)) { Entry<Property, Property> property = entityMapper.getProperty(attributedType, propertyName); if (property != null) { return entityMapper; } } return null; }
private EntityMapper getEntityMapperForProperty(Class<? extends AttributedType> attributedType, String propertyName) { for (EntityMapper entityMapper : getMapperFor(attributedType)) { Entry<Property, Property> property = entityMapper.getProperty(attributedType, propertyName); if (property != null) { return entityMapper; } } return null; }
private void removeAssociatedEntities(final AttributedType attributedType, final EntityManager entityManager, final EntityMapper rootMapper) { for (EntityMapper childMapper : getMapperFor(attributedType.getClass())) { if (!childMapper.isRoot()) { for (Object child : rootMapper.getAssociatedEntities(attributedType, childMapper, entityManager)) { entityManager.remove(child); } } } }
private void removeAssociatedEntities(final AttributedType attributedType, final EntityManager entityManager, final EntityMapper rootMapper) { for (EntityMapper childMapper : getMapperFor(attributedType.getClass())) { if (!childMapper.isRoot()) { for (Object child : rootMapper.getAssociatedEntities(attributedType, childMapper, entityManager)) { entityManager.remove(child); } } } }
@Override public void updateAttributedType(IdentityContext context, AttributedType attributedType) { EntityManager entityManager = getEntityManager(context); for (EntityMapper entityMapper : getMapperFor(attributedType.getClass())) { entityMapper.updateEntity(attributedType, entityManager); } }
@Override public void updateAttributedType(IdentityContext context, AttributedType attributedType) { EntityManager entityManager = getEntityManager(context); for (EntityMapper entityMapper : getMapperFor(attributedType.getClass())) { entityMapper.updateEntity(attributedType, entityManager); } }
@Override public void addAttributedType(IdentityContext context, AttributedType attributedType) { EntityManager entityManager = getEntityManager(context); for (EntityMapper entityMapper : getMapperFor(attributedType.getClass())) { entityMapper.persist(attributedType, entityManager); if (Relationship.class.isInstance(attributedType)) { if (entityMapper.isRoot()) { storeRelationshipMembers((Relationship) attributedType, entityManager); } } } }
@Override public void addAttributedType(IdentityContext context, AttributedType attributedType) { EntityManager entityManager = getEntityManager(context); for (EntityMapper entityMapper : getMapperFor(attributedType.getClass())) { entityMapper.persist(attributedType, entityManager); if (Relationship.class.isInstance(attributedType)) { if (entityMapper.isRoot()) { storeRelationshipMembers((Relationship) attributedType, entityManager); } } } }
EntityMapper secondaryMapper = null; for (EntityMapper entityMapper : getMapperFor(attributedType)) { for (EntityMapper mapper : attributeMappers) { Class<?> entityType = entityMapper.getEntityType();
EntityMapper secondaryMapper = null; for (EntityMapper entityMapper : getMapperFor(attributedType)) { for (EntityMapper mapper : attributeMappers) { Class<?> entityType = entityMapper.getEntityType();