@Override
public CompositionDefinition toCompositeDefinition() {
if ( ! getType().isComponentType() ) {
throw new IllegalStateException( "Cannot treat entity collection index type as composite" );
}
return new CompositeCollectionElementDefinition() {
@Override
public String getName() {
return "index";
}