List of usage examples for org.hibernate.persister.collection CollectionPersister hasIndex
boolean hasIndex();
From source file:com.blazebit.persistence.integration.hibernate.base.HibernateJpaProvider.java
License:Apache License
@Override public boolean isBag(EntityType<?> ownerType, String attributeName) { CollectionPersister persister = null; IdentifiableType<?> type = ownerType; String typeName = getTypeName(ownerType); StringBuilder sb = new StringBuilder(typeName.length() + attributeName.length() + 1); while (persister == null && type != null) { sb.setLength(0);//www.ja v a 2 s. com sb.append(getTypeName(type)); sb.append('.'); sb.append(attributeName); persister = collectionPersisters.get(sb.toString()); type = type.getSupertype(); } return persister != null && !persister.hasIndex() && !persister.isInverse() && !(getAttribute(ownerType, attributeName) instanceof SetAttribute<?, ?>); }