List of usage examples for org.hibernate.type CompositeType getFetchMode
FetchMode getFetchMode(int index);
From source file:org.babyfish.hibernate.internal.ImplicitCollectionJoins.java
License:Open Source License
private boolean hasImplicitCollectionJoins0(CompositeType compositeType, Map<String, Boolean> contextMap) { Type[] subtypes = compositeType.getSubtypes(); for (int i = subtypes.length - 1; i >= 0; i--) { Type subtype = subtypes[i]; if (compositeType.getFetchMode(i) == FetchMode.JOIN) { if (subtype.isCollectionType()) { //find collection with {fetch = "join"} return true; }/* www .j ava 2s.c o m*/ if (subtype instanceof AssociationType) { String childEntityName = ((AssociationType) subtype).getAssociatedEntityName(this.factory); if (this.hasImplicitCollectionJoins0(childEntityName, contextMap)) { return true; } } } else if (subtype instanceof CompositeType) { if (this.hasImplicitCollectionJoins0((CompositeType) subtype, contextMap)) { return true; } } } return false; }