public CollectionType getDefaultCollectionType() { if ( isSorted() ) { return getMetadata().getTypeResolver() .getTypeFactory() .sortedSet( getRole(), getReferencedPropertyName(), getComparator() ); } else if ( hasOrder() ) { return getMetadata().getTypeResolver() .getTypeFactory() .orderedSet( getRole(), getReferencedPropertyName() ); } else { return getMetadata().getTypeResolver() .getTypeFactory() .set( getRole(), getReferencedPropertyName() ); } }
public CollectionType getDefaultCollectionType() { return isSorted() ? TypeFactory.sortedSet( getRole(), getReferencedPropertyName(), isEmbedded(), getComparator() ) : TypeFactory.set( getRole(), getReferencedPropertyName(), isEmbedded() ); }
public CollectionType getDefaultCollectionType() { if ( isSorted() ) { return TypeFactory.sortedSet( getRole(), getReferencedPropertyName(), isEmbedded(), getComparator() ); } else if ( hasOrder() ) { return TypeFactory.orderedSet( getRole(), getReferencedPropertyName(), isEmbedded() ); } else { return TypeFactory.set( getRole(), getReferencedPropertyName(), isEmbedded() ); } }
private Type determineDefaultCollectionInformation(AbstractPluralAttributeBinding attributeBinding) { final TypeFactory typeFactory = metadata.getTypeResolver().getTypeFactory(); switch ( attributeBinding.getAttribute().getNature() ) { case SET: { return typeFactory.set( attributeBinding.getAttribute().getName(), attributeBinding.getReferencedPropertyName(), attributeBinding.getCollectionElement().getCollectionElementNature() == CollectionElementNature.COMPOSITE ); } case BAG: { return typeFactory.bag( attributeBinding.getAttribute().getName(), attributeBinding.getReferencedPropertyName(), attributeBinding.getCollectionElement() .getCollectionElementNature() == CollectionElementNature.COMPOSITE ); } default: { throw new UnsupportedOperationException( "Collection type not supported yet:" + attributeBinding.getAttribute().getNature() ); } } }
private Type determineDefaultCollectionInformation(AbstractPluralAttributeBinding attributeBinding) { final TypeFactory typeFactory = metadata.getTypeResolver().getTypeFactory(); switch ( attributeBinding.getAttribute().getNature() ) { case SET: { return typeFactory.set( attributeBinding.getAttribute().getName(), attributeBinding.getReferencedPropertyName(), attributeBinding.getCollectionElement().getCollectionElementNature() == CollectionElementNature.COMPOSITE ); } case BAG: { return typeFactory.bag( attributeBinding.getAttribute().getName(), attributeBinding.getReferencedPropertyName(), attributeBinding.getCollectionElement() .getCollectionElementNature() == CollectionElementNature.COMPOSITE ); } default: { throw new UnsupportedOperationException( "Collection type not supported yet:" + attributeBinding.getAttribute().getNature() ); } } }
public CollectionType getDefaultCollectionType() { if ( isSorted() ) { return getMappings().getTypeResolver() .getTypeFactory() .sortedSet( getRole(), getReferencedPropertyName(), isEmbedded(), getComparator() ); } else if ( hasOrder() ) { return getMappings().getTypeResolver() .getTypeFactory() .orderedSet( getRole(), getReferencedPropertyName(), isEmbedded() ); } else { return getMappings().getTypeResolver() .getTypeFactory() .set( getRole(), getReferencedPropertyName(), isEmbedded() ); } }
public CollectionType getDefaultCollectionType() { if ( isSorted() ) { return getMappings().getTypeResolver() .getTypeFactory() .sortedSet( getRole(), getReferencedPropertyName(), isEmbedded(), getComparator() ); } else if ( hasOrder() ) { return getMappings().getTypeResolver() .getTypeFactory() .orderedSet( getRole(), getReferencedPropertyName(), isEmbedded() ); } else { return getMappings().getTypeResolver() .getTypeFactory() .set( getRole(), getReferencedPropertyName(), isEmbedded() ); } }