Package org.apache.cayenne.map

Examples of org.apache.cayenne.map.Relationship


    public void arcDeleted(Object nodeId, Object targetNodeId, Object arcId) {
        DataObject source = findObject(nodeId);

        // find whether this is to-one or to-many
        ObjEntity sourceEntity = context.getEntityResolver().lookupObjEntity(source);
        Relationship relationship = sourceEntity.getRelationship(arcId.toString());

        DataObject target = findObject(targetNodeId);
        if (relationship.isToMany()) {
            source.removeToManyTarget(relationship.getName(), target, false);
        }
        else {
            source.setToOneTarget(relationship.getName(), null, false);
        }
    }
View Full Code Here


                EJBQLJoin join = new EJBQLOuterJoin(-1);
                join.jjtAddChild(path, 0);
                join.jjtAddChild(joinId, 1);
                getJoinAppender().visitOuterJoin(join);

                Relationship lastRelationship = currentEntity
                        .getRelationship(lastPathComponent);
                ObjEntity targetEntity = (ObjEntity) lastRelationship.getTargetEntity();

                this.lastAlias = context.getTableAlias(fullPath, targetEntity
                        .getDbEntityName());
            }
View Full Code Here

            return false;
        }

        Iterator it = anObjEntity.getRelationships().iterator();
        while (it.hasNext()) {
            Relationship r = (Relationship) it.next();
            if (r.isToMany()) {
                return true;
            }
        }

        return false;
View Full Code Here

            return false;
        }

        Iterator it = anObjEntity.getDeclaredRelationships().iterator();
        while (it.hasNext()) {
            Relationship r = (Relationship) it.next();
            if (r.isToMany()) {
                return true;
            }
        }

        return false;
View Full Code Here

            return false;
        }

        Iterator it = anObjEntity.getRelationships().iterator();
        while (it.hasNext()) {
            Relationship r = (Relationship) it.next();
            if (false == r.isToMany()) {
                return true;
            }
        }

        return false;
View Full Code Here

            return false;
        }

        Iterator it = anObjEntity.getDeclaredRelationships().iterator();
        while (it.hasNext()) {
            Relationship r = (Relationship) it.next();
            if (!r.isToMany()) {
                return true;
            }
        }

        return false;
View Full Code Here

            return false;
        }
       
        Iterator it = entity.getDeclaredRelationships().iterator();
        while(it.hasNext()) {
            Relationship r = (Relationship) it.next();
            if(r.isToMany()) {
                return true;
            }
        }

        return false;
View Full Code Here

            return false;
        }
       
        Iterator it = entity.getRelationships().iterator();
        while(it.hasNext()) {
            Relationship r = (Relationship) it.next();
            if(r.isToMany()) {
                return true;
            }
        }

        return false;
View Full Code Here

            return false;
        }
       
        Iterator it = entity.getDeclaredRelationships().iterator();
        while(it.hasNext()) {
            Relationship r = (Relationship) it.next();
            if(r.isToMany()) {
                return true;
            }
        }

        return false;
View Full Code Here

            return false;
        }
       
        Iterator it = entity.getRelationships().iterator();
        while(it.hasNext()) {
            Relationship r = (Relationship) it.next();
            if(r.isToMany()) {
                return true;
            }
        }

        return false;
View Full Code Here

TOP

Related Classes of org.apache.cayenne.map.Relationship

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.