Package javax.persistence.criteria

Examples of javax.persistence.criteria.Join


    }

    @Override
    public List<Predicate> build(CriteriaBuilder builder, Path<P> path)
    {
        Join join = null;
        if (singular != null)
        {
            join = joinSingular((From) path);
        }
        else if (list != null)
View Full Code Here


    public boolean isCorrelated() {
        return _corrJoins != null;
    }
   
    public <X,Y> CollectionJoin<X,Y> correlate(CollectionJoin<X,Y> parentJoin) {
        Join corrJoin = Joins.clone((Joins.Collection)parentJoin);
        ((PathImpl<?,?>)corrJoin).setCorrelatedPath((PathImpl<?,?>)parentJoin);
        if (_corrJoins == null)
            _corrJoins = new ArrayList<Join<?,?>>();
        _corrJoins.add(corrJoin);
        return (CollectionJoin<X,Y>)corrJoin;
View Full Code Here

        _corrJoins.add(corrJoin);
        return (CollectionJoin<X,Y>)corrJoin;
    }
   
    public <X,Y> SetJoin<X,Y> correlate(SetJoin<X,Y> parentJoin) {
        Join corrJoin = Joins.clone((Joins.Set)parentJoin);
        ((PathImpl<?,?>)corrJoin).setCorrelatedPath((PathImpl<?,?>)parentJoin);
        if (_corrJoins == null)
            _corrJoins = new ArrayList<Join<?,?>>();
        _corrJoins.add(corrJoin);
        return (SetJoin<X,Y>)corrJoin;
View Full Code Here

        _corrJoins.add(corrJoin);
        return (SetJoin<X,Y>)corrJoin;
    }
   
    public <X,Y> ListJoin<X,Y> correlate(ListJoin<X,Y> parentJoin) {
        Join corrJoin = Joins.clone((Joins.List)parentJoin);
        ((PathImpl<?,?>)corrJoin).setCorrelatedPath((PathImpl<?,?>)parentJoin);
        if (_corrJoins == null)
            _corrJoins = new ArrayList<Join<?,?>>();
        _corrJoins.add(corrJoin);
        return (ListJoin<X,Y>)corrJoin;
View Full Code Here

        _corrJoins.add(corrJoin);
        return (ListJoin<X,Y>)corrJoin;
    }
   
    public <X,K,V> MapJoin<X,K,V> correlate(MapJoin<X,K,V> parentJoin) {
        Join corrJoin = Joins.clone((Joins.Map)parentJoin);
        ((PathImpl<?,?>)corrJoin).setCorrelatedPath((PathImpl<?,?>)parentJoin);
        if (_corrJoins == null)
            _corrJoins = new ArrayList<Join<?,?>>();
        _corrJoins.add(corrJoin);
        return (MapJoin<X,K,V>)corrJoin;
View Full Code Here

        this.isLeaf = false;
        if (att.getPersistentAttributeType().equals(PersistentAttributeType.BASIC)){
            return new PathImpl<Y>(this, this.metamodel, att.getBindableJavaType(),this.currentNode.get(att.getName()), att);
        }else{
            Class<Y> clazz = att.getBindableJavaType();
            Join join = new JoinImpl<X, Y>(this, this.metamodel.managedType(clazz), this.metamodel, clazz,this.currentNode.get(att.getName()), att);
            this.joins.add(join);
            return join;
        }
    }
View Full Code Here

   
    @Override
    public <Y> Path<Y> get(String attName) {
        this.isLeaf = false;
        Attribute attribute = this.managedType.getAttribute(attName);
        Join join;
        if (attribute.isCollection()) {
            if (!((PluralAttribute) attribute).getElementType().getPersistenceType().equals(PersistenceType.BASIC)) {
                if (((PluralAttribute) attribute).getCollectionType().equals(CollectionType.COLLECTION)) {
                    join = new CollectionJoinImpl<X, Y>(this, metamodel.managedType(((PluralAttribute) attribute).getBindableJavaType()), this.metamodel, ((PluralAttribute) attribute).getBindableJavaType(), this.currentNode.anyOf(attribute.getName()), (Bindable) attribute);
                } else if (((PluralAttribute) attribute).getCollectionType().equals(CollectionType.LIST)) {
View Full Code Here

            } else if (jt.equals(JoinType.RIGHT)) {
                throw new UnsupportedOperationException(ExceptionLocalization.buildMessage("RIGHT_JOIN_NOT_SUPPORTED"));
            } else {
                node = this.currentNode.anyOfAllowingNone(((PluralAttribute) attribute).getName());
            }
            Join join;
            if (((PluralAttribute) attribute).getElementType().getPersistenceType().equals(PersistenceType.BASIC)) {
                if (((PluralAttribute) attribute).getCollectionType().equals(CollectionType.COLLECTION)) {
                    join = new BasicCollectionJoinImpl(this, this.metamodel, ((PluralAttribute) attribute).getBindableJavaType(), node, (Bindable) attribute);
                } else if (((PluralAttribute) attribute).getCollectionType().equals(CollectionType.LIST)) {
                    join = new BasicListJoinImpl(this, this.metamodel, ((PluralAttribute) attribute).getBindableJavaType(), node, (Bindable) attribute);
View Full Code Here

        java.util.List<Members.Member> members = new ArrayList<Members.Member>();
        java.util.List<JoinType> jts = new ArrayList<JoinType>();
        FromImpl<?, ?> root = getMembers((PathImpl)join, members, jts);
        Members.Member<?, ?> member = members.get(0);
        JoinType jt = jts.get(0);
        Join join1 = makeJoin(root, member, jt);
        for (int i = 1; i < members.size(); i++)
            join1 = makeJoin((FromImpl<?, ?>) join1, members.get(i), jts.get(i));

        return join1;
    }
View Full Code Here

    public boolean isCorrelated() {
        return _corrJoins != null;
    }
   
    public <X,Y> CollectionJoin<X,Y> correlate(CollectionJoin<X,Y> parentJoin) {
        Join corrJoin = Joins.clone((Joins.Collection)parentJoin);
        ((PathImpl<?,?>)corrJoin).setCorrelatedPath((PathImpl<?,?>)parentJoin);
        if (_corrJoins == null)
            _corrJoins = new ArrayList<Join<?,?>>();
        _corrJoins.add(corrJoin);
        return (CollectionJoin<X,Y>)corrJoin;
View Full Code Here

TOP

Related Classes of javax.persistence.criteria.Join

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.