Package org.apache.cayenne.util

Examples of org.apache.cayenne.util.CayenneMapEntry


                            + component);
                }

                boolean firstComponent = true;
                while (dbSubpath.hasNext()) {
                    CayenneMapEntry subComponent = (CayenneMapEntry) dbSubpath.next();
                    if (buf.length() > 0) {
                        buf.append(Entity.PATH_SEPARATOR);
                    }

                    buf.append(subComponent.getName());
                    if (firstComponent && component.getJoinType() == JoinType.LEFT_OUTER) {
                        buf.append(OUTER_JOIN_INDICATOR);
                    }
                    firstComponent = false;
                }
View Full Code Here


        }
       
        private void appendPath(
                LinkedList<String> finalPath,
                PathComponent<Attribute, Relationship> pathComponent) {
            CayenneMapEntry mapEntry = pathComponent.getAttribute() != null ?
                pathComponent.getAttribute() :
                pathComponent.getRelationship();
            String name = mapEntry.getName();
            if (pathComponent.getJoinType() == JoinType.LEFT_OUTER) {
                name += OUTER_JOIN_INDICATOR;
            }
           
            finalPath.addLast(name);
View Full Code Here

    /**
     * Returns a DbAttribute mapped by this ObjAttribute.
     */
    public DbAttribute getDbAttribute() {
        Iterator<CayenneMapEntry> pathIterator = getDbPathIterator((ObjEntity) getEntity());
        CayenneMapEntry o = null;
        while (pathIterator.hasNext()) {
            o = pathIterator.next();
        }
        if (o == null) {
            return getParentDbAttribute((ObjEntity) getEntity());
View Full Code Here

    private DbAttribute getParentDbAttribute(ObjEntity entity) {
        if (entity != null) {
            ObjEntity parent = entity.getSuperEntity();
            if (parent != null) {
                Iterator<CayenneMapEntry> pathIterator = getDbPathIterator(parent);
                CayenneMapEntry o = null;
                while (pathIterator.hasNext()) {
                    o = pathIterator.next();
                }
                if (o == null) {
                    return getParentDbAttribute(parent);
View Full Code Here

            StringBuilder newDbAttributePath = new StringBuilder();
           
            Iterator<CayenneMapEntry> dbPathIterator = getDbPathIterator();
           
            while (dbPathIterator.hasNext()) {
                CayenneMapEntry next = dbPathIterator.next();
               
                newDbAttributePath.append(next.getName());
                if (next instanceof DbRelationship) {
                    newDbAttributePath.append('.');
                }
            }
           
View Full Code Here

TOP

Related Classes of org.apache.cayenne.util.CayenneMapEntry

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.