Examples of addJoin()


Examples of org.apache.torque.util.Criteria.addJoin()

        book.setAuthor(author);
        book.setIsbn("unknown");
        book.save();

        Criteria criteria = new Criteria();
        criteria.addJoin(BookPeer.TITLE, AuthorPeer.NAME);
        BookPeer.addSelectColumns(criteria);
        AuthorPeer.addSelectColumns(criteria);
        // basically a BaseBookPeer.setDbName(criteria);
        // and BasePeer.doSelect(criteria);
        List villageRecords = BookPeer.doSelectVillageRecords(criteria);
View Full Code Here

Examples of org.apache.turbine.util.db.Criteria.addJoin()

        criteria.add(up.getFullColumnName(UserPeer.USERNAME),
                     user.getUserName());
        criteria.add(UserGroupRolePeer.GROUP_ID,
                     ((Persistent)group).getPrimaryKey());

        criteria.addJoin(up.getFullColumnName(UserPeer.USER_ID),
                         UserGroupRolePeer.USER_ID);
        criteria.addJoin(UserGroupRolePeer.ROLE_ID, RolePeer.ROLE_ID);
        return retrieveSet(criteria);
    }
View Full Code Here

Examples of org.datanucleus.metadata.AbstractClassMetaData.addJoin()

                if (joins != null && joins.length > 0)
                {
                    // Joins
                    for (int i=0;i<joins.length;i++)
                    {
                        cmd.addJoin(joins[i]);
                    }
                }
                if (queries != null && queries.length > 0)
                {
                    // Named Queries
View Full Code Here

Examples of org.datanucleus.metadata.ClassMetaData.addJoin()

                ClassMetaData cmd = (ClassMetaData)getStack();
                JoinMetaData joinmd = new JoinMetaData();
                joinmd.setTable(getAttr(attrs, "name"));
                joinmd.setCatalog(getAttr(attrs, "catalog"));
                joinmd.setSchema(getAttr(attrs, "schema"));
                cmd.addJoin(joinmd);
                pushStack(joinmd);
            }
            else if (localName.equals("primary-key-join-column"))
            {
                MetaData md = getStack();
View Full Code Here

Examples of org.h2.table.TableFilter.addJoin()

                if (readIf("ON")) {
                    on = readExpression();
                }
                if (nestedJoins) {
                    top = getNested(top);
                    newTop.addJoin(top, true, false, on);
                } else {
                    newTop.addJoin(top, true, false, on);
                }
                top = newTop;
                last = newTop;
View Full Code Here

Examples of org.h2.table.TableFilter.addJoin()

                }
                if (nestedJoins) {
                    top = getNested(top);
                    newTop.addJoin(top, true, false, on);
                } else {
                    newTop.addJoin(top, true, false, on);
                }
                top = newTop;
                last = newTop;
            } else if (readIf("LEFT")) {
                readIf("OUTER");
View Full Code Here

Examples of org.h2.table.TableFilter.addJoin()

    }

    private TableFilter getNested(TableFilter n) {
        String joinTable = Constants.PREFIX_JOIN + parseIndex;
        TableFilter top = new TableFilter(session, getDualTable(true), joinTable, rightsChecked, currentSelect);
        top.addJoin(n, false, true, null);
        return top;
    }

    private Prepared parseExecute() {
        ExecuteProcedure command = new ExecuteProcedure(session);
View Full Code Here

Examples of org.hibernate.engine.JoinSequence.addJoin()

        ? fromElement.getTableAlias()
        : fromClause.getAliasGenerator().createName( collectionFilterRole );
    JoinSequence join = sessionFactoryHelper.createJoinSequence();
    join.setRoot( persister, fkTableAlias );
    if ( !persister.isOneToMany() ) {
      join.addJoin( ( AssociationType ) persister.getElementType(),
          fromElement.getTableAlias(),
          JoinFragment.INNER_JOIN,
          persister.getElementColumnNames( fkTableAlias ) );
    }
    join.addCondition( fkTableAlias, keyColumnNames, " = ?" );
View Full Code Here

Examples of org.hibernate.engine.JoinSequence.addJoin()

      // idea of the destination is the destination table.
      String tableAlias = fromClause.getAliasGenerator().createName( entityPersister.getEntityName() );
      String[] secondJoinColumns = sfh.getCollectionElementColumns( role, roleAlias );
      // Add the second join, the one that ends in the destination table.
      JoinSequence joinSequence = createJoinSequence( roleAlias, joinType );
      joinSequence.addJoin( sfh.getElementAssociationType( collectionType ), tableAlias, joinType, secondJoinColumns );
      elem = createJoin( associatedEntityName, tableAlias, joinSequence, type, false );
      elem.setUseFromFragment( true );
    }
    return elem;
  }
View Full Code Here

Examples of org.hibernate.engine.JoinSequence.addJoin()

    join.setRoot( persister, collectionName );
    if ( !persister.isOneToMany() ) {
      //many-to-many
      addCollection( collectionName, collectionRole );
      try {
        join.addJoin( ( AssociationType ) persister.getElementType(),
            elementName,
            JoinFragment.INNER_JOIN,
            persister.getElementColumnNames(collectionName) );
      }
      catch ( MappingException me ) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.