@Override public <T extends X> PluralAttributePath<T> treatAs(Class<T> treatAsType) { throw new UnsupportedOperationException( "Plural attribute path [" + getPathSource().getPathIdentifier() + '.' + attribute.getName() + "] cannot be dereferenced" ); }
@Override @SuppressWarnings({ "unchecked" }) public <E, C extends Collection<E>> Expression<C> get(PluralAttribute<X, C, E> attribute) { if ( ! canBeDereferenced() ) { throw illegalDereference(); } PluralAttributePath<C> path = (PluralAttributePath<C>) resolveCachedAttributePath( attribute.getName() ); if ( path == null ) { path = new PluralAttributePath<C>( criteriaBuilder(), this, attribute ); registerAttributePath( attribute.getName(), path ); } return path; }
private String [] createOriginalAndExpectedKeys(Attribute embeddedAttr, PluralAttribute listAttr) { String originalKey = embeddedAttr.getDeclaringType().getJavaType().getName() + "." + embeddedAttr.getName() + "." + listAttr.getName(); String copyKey = listAttr.getDeclaringType().getJavaType().getName() + "." + listAttr.getName(); String [] keys = { originalKey, copyKey }; return keys; }
private String resolveRole(PluralAttribute attribute) { switch ( attribute.getDeclaringType().getPersistenceType() ) { case ENTITY: { return attribute.getDeclaringType().getJavaType().getName() + '.' + attribute.getName(); (EntityType) getPathSource().getModel() ); return entityTypeNearestDeclaringType.getJavaType().getName() + '.' + attribute.getName(); StringBuilder role = new StringBuilder().append( '.' ).append( attribute.getName() ); PathSource parentPath = getPathSource(); SingularAttribute singularAttribute;
public boolean apply(Object input) { PluralAttribute<?, ?, ?> pa = (PluralAttribute<?, ?, ?>) input; return pa.getName().equals(navProperty); } });
@Override public String toString() { return this.getParentPath().toString() + '.' + this.attribute.getName(); }
/** * {@inheritDoc} * */ @Override public final <Y> FetchImpl<X, Y> fetch(PluralAttribute<? super X, ?, Y> attribute, JoinType jt) { return this.fetch(attribute.getName(), jt); }
/** * {@inheritDoc} * */ @Override public final <Y> FetchImpl<X, Y> fetch(PluralAttribute<? super X, ?, Y> attribute, JoinType jt) { return this.fetch(attribute.getName(), jt); }
/** * {@inheritDoc} * */ @Override public <E, C extends Collection<E>> Expression<C> get(PluralAttribute<? super X, C, E> collection) { throw this.cannotDereference(collection.getName()); }
@Override public <T extends X> PluralAttributePath<T> treatAs(Class<T> treatAsType) { throw new UnsupportedOperationException( "Plural attribute path [" + getBasePath().getPathExpression() + '.' + attribute.getName() + "] cannot be dereferenced" ); }
@Override public <T extends X> PluralAttributePath<T> treatAs(Class<T> treatAsType) { throw new UnsupportedOperationException( "Plural attribute path [" + getBasePath().getPathExpression() + '.' + attribute.getName() + "] cannot be dereferenced" ); }
private static String resolveRole(PluralAttribute attribute) { return attribute.getDeclaringType().getJavaType().getName() + '.' + attribute.getName(); }
@Override @SuppressWarnings({"unchecked"}) public <E, C extends Collection<E>> BlazeExpression<C> get(PluralAttribute<X, C, E> attribute) { checkGet(attribute); PluralAttributePath<C> path = (PluralAttributePath<C>) getAttributePath(attribute.getName()); if (path == null) { path = new PluralAttributePath<C>(criteriaBuilder, this, attribute); putAttributePath(attribute.getName(), path); } return path; }
/** * {@inheritDoc} * */ @Override public final <E, C extends Collection<E>> CollectionExpression<C, E> get(PluralAttribute<? super X, C, E> collection) { return new CollectionExpression<C, E>(this, this.<Collection<E>, E> getMapping(collection.getName())); }
/** * {@inheritDoc} * */ @Override public final <E, C extends Collection<E>> CollectionExpression<C, E> get(PluralAttribute<? super X, C, E> collection) { return new CollectionExpression<C, E>(this, this.<Collection<E>, E> getMapping(collection.getName())); }
@Override @SuppressWarnings({"unchecked"}) public <E, C extends Collection<E>> BlazeExpression<C> get(PluralAttribute<X, C, E> attribute) { checkGet(attribute); PluralAttributePath<C> path = (PluralAttributePath<C>) getAttributePath(attribute.getName()); if (path == null) { path = new PluralAttributePath<C>(criteriaBuilder, this, attribute); putAttributePath(attribute.getName(), path); } return path; }
/** * Gets a new path that represents the given multi-valued attribute from this path. */ public <E, C extends java.util.Collection<E>> Expression<C> get(PluralAttribute<X, C, E> coll) { if (getType() != coll.getDeclaringType()) { coll = (PluralAttribute)((ManagedType)getType()).getAttribute(coll.getName()); } return new PathImpl<X,C>(this, (Members.PluralAttributeImpl<? super X, C, E>)coll, coll.getJavaType()); }
/** * Gets a new path that represents the given multi-valued attribute from this path. */ public <E, C extends java.util.Collection<E>> Expression<C> get(PluralAttribute<X, C, E> coll) { if (getType() != coll.getDeclaringType()) { coll = (PluralAttribute)((ManagedType)getType()).getAttribute(coll.getName()); } return new PathImpl<X,C>(this, (Members.PluralAttributeImpl<? super X, C, E>)coll, coll.getJavaType()); }
/** * Gets a new path that represents the given multi-valued attribute from this path. */ public <E, C extends java.util.Collection<E>> Expression<C> get(PluralAttribute<X, C, E> coll) { if (getType() != coll.getDeclaringType()) { coll = (PluralAttribute)((ManagedType)getType()).getAttribute(coll.getName()); } return new PathImpl<X,C>(this, (Members.PluralAttributeImpl<? super X, C, E>)coll, coll.getJavaType()); }
/** * Gets a new path that represents the given multi-valued attribute from this path. */ public <E, C extends java.util.Collection<E>> Expression<C> get(PluralAttribute<X, C, E> coll) { if (getType() != coll.getDeclaringType()) { coll = (PluralAttribute)((ManagedType)getType()).getAttribute(coll.getName()); } return new PathImpl<X,C>(this, (Members.PluralAttributeImpl<? super X, C, E>)coll, coll.getJavaType()); }