6 - SQM based on JPA type system
This commit is contained in:
parent
05724fc19a
commit
e8f22dc2ef
|
@ -9,11 +9,17 @@ package org.hibernate.metamodel.model.domain.internal;
|
|||
import java.util.Set;
|
||||
|
||||
import org.hibernate.metamodel.model.domain.SetPersistentAttribute;
|
||||
import org.hibernate.query.sqm.produce.spi.SqmCreationState;
|
||||
import org.hibernate.query.sqm.tree.SqmJoinType;
|
||||
import org.hibernate.query.sqm.tree.domain.SqmSetJoin;
|
||||
import org.hibernate.query.sqm.tree.from.SqmAttributeJoin;
|
||||
import org.hibernate.query.sqm.tree.from.SqmFrom;
|
||||
|
||||
/**
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
public class SetAttributeImpl<X, E> extends AbstractPluralAttribute<X, Set<E>, E> implements SetPersistentAttribute<X, E> {
|
||||
public class SetAttributeImpl<X, E> extends AbstractPluralAttribute<X, Set<E>, E>
|
||||
implements SetPersistentAttribute<X, E> {
|
||||
public SetAttributeImpl(PluralAttributeBuilder<X, Set<E>, E, ?> xceBuilder) {
|
||||
super( xceBuilder );
|
||||
}
|
||||
|
@ -22,4 +28,17 @@ public class SetAttributeImpl<X, E> extends AbstractPluralAttribute<X, Set<E>, E
|
|||
public CollectionType getCollectionType() {
|
||||
return CollectionType.SET;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SqmAttributeJoin createSqmJoin(
|
||||
SqmFrom lhs, SqmJoinType joinType, String alias, boolean fetched, SqmCreationState creationState) {
|
||||
return new SqmSetJoin(
|
||||
lhs,
|
||||
this,
|
||||
alias,
|
||||
joinType,
|
||||
fetched,
|
||||
creationState.getCreationContext().getNodeBuilder()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue