use of com.vladmihalcea.hibernate.model.util.EntityGraphBuilder in project vladmihalcea.wordpress.com by vladmihalcea.
the class HibernateBagMultiLevelFetchTest method reconstructForest.
protected BagForest reconstructForest(List<BagLeaf> leaves, Long forestId) {
EntityGraphBuilder entityGraphBuilder = new EntityGraphBuilder(new EntityVisitor[] { BagLeaf.ENTITY_VISITOR, BagBranch.ENTITY_VISITOR, BagTree.ENTITY_VISITOR, BagForest.ENTITY_VISITOR }).build(leaves);
ClassId<BagForest> forestClassId = new ClassId<BagForest>(BagForest.class, forestId);
return entityGraphBuilder.getEntityContext().getObject(forestClassId);
}
Aggregations