use of com.blazebit.persistence.view.ListEntityViewBuilderListener in project blaze-persistence by Blazebit.
the class EntityViewBuilderBaseImpl method withListBuilder.
public <E> EntityViewNestedBuilder<E, ? extends BuilderType, ?> withListBuilder(AbstractAttribute<?, ?> attr, int index) {
checkAttribute(attr, ListAttribute.class, "List");
checkType(attr.getElementType(), "element", attr);
Map<ManagedViewType<? extends E>, String> inheritanceSubtypeMappings = ((PluralAttribute<?, ?, E>) attr).getElementInheritanceSubtypeMappings();
return new EntityViewNestedBuilderImpl<>(evm, (ManagedViewTypeImplementor<E>) attr.getElementType(), inheritanceSubtypeMappings, optionalParameters, (BuilderType) this, new ListEntityViewBuilderListener((List<Object>) getCollection(attr), index));
}
use of com.blazebit.persistence.view.ListEntityViewBuilderListener in project blaze-persistence by Blazebit.
the class EntityViewBuilderBaseImpl method withBuilder.
@Override
public <E> EntityViewNestedBuilder<E, ? extends BuilderType, ?> withBuilder(ListAttribute<ViewType, E> attribute, int index) {
AbstractAttribute<?, ?> attr = getAttribute(attribute);
checkType(attr.getElementType(), "element", attr);
Map<ManagedViewType<? extends E>, String> inheritanceSubtypeMappings = ((PluralAttribute<?, ?, E>) attr).getElementInheritanceSubtypeMappings();
return new EntityViewNestedBuilderImpl<>(evm, (ManagedViewTypeImplementor<E>) attr.getElementType(), inheritanceSubtypeMappings, optionalParameters, (BuilderType) this, new ListEntityViewBuilderListener((List<Object>) getCollection(attr), index));
}
Aggregations