Package org.objectweb.speedo.metadata

Examples of org.objectweb.speedo.metadata.SpeedoJoin


      return;
    }
    if (a2.value().length == 1) {
      a1 = a2.value()[0];
    }
    sc.inheritance.join = new SpeedoJoin();
    sc.inheritance.join.mainTable = sc.mainTable;
    sc.inheritance.join.extTable = sc.getSuper().mainTable;
    // First parse PrimaryKeyJoinColumn
    if (a1 != null) {
      SpeedoJoinColumn jcol = new SpeedoJoinColumn();
View Full Code Here


      logger.log(BasicLevel.ERROR, sc.getSourceDescShort()
          + ": mapping is supposed to be defined by the reverse field for field ("
          + sf.name + ") - mapping information ignored.");
      return;
    }
    sf.join = new SpeedoJoin();
    /*TODO sf.join.extTable = parseTable(jt.table(), sc, null);*/
    sf.join.mainTable = sc.mainTable;
    // Parse joinColumns from JoinTable (may be empty)
    for (JoinColumn jc : jt.joinColumns()) {
      SpeedoJoinColumn sjcol = new SpeedoJoinColumn();
View Full Code Here

          + ": mapping is supposed to be defined by the reverse field for field ("
          + sf.name + ") - mapping information ignored.");
      return;
    }
    if (sf.relationType == SpeedoField.MANY_REFERENCE) {
      sf.join = new SpeedoJoin();
    }
    for (JoinColumn jc : jcs) {
      SpeedoColumn scol = new SpeedoColumn();
      scol.targetColumn = jc.referencedColumnName();
      if (scol.targetColumn.equals("")) {
View Full Code Here

          //visit identity column of the persistent class
          visitIdentityColumn(sc);
            //visit secondary tables (not the join associated)
            if (sc.joinToExtTables != null) {
                for (int i = 0; i < sc.joinToExtTables.length; i++) {
                    SpeedoJoin join = sc.joinToExtTables[i];
                    if (join.mainTable == null) {
                        join.mainTable = sc.mainTable;
                    }
                    if (join.extTable == null) {
                        join.extTable = new SpeedoTable();
View Full Code Here

            } else if (sc.inheritance.isHorizontalMapping()) {
                sc.mainTable = new SpeedoTable();
            } else if (sc.inheritance.isVerticalMapping()) {
                SpeedoClass parent = sc.getSuper();
                if (sc.inheritance.join == null) {
                    sc.inheritance.join = new SpeedoJoin();
                }
                SpeedoJoin join = sc.inheritance.join;
                if (join.mainTable == null) {
                    join.mainTable = getRootTable(parent);
                }
                if (sc.mainTable == null) {
                  if (join.extTable == null) {
View Full Code Here

    /**
     * Computes field mapping from its reverse field.
     */
    private void computeFieldFromReverse(SpeedoField sf)throws SpeedoException {
        SpeedoField rField = sf.getReverseField();
        sf.join = new SpeedoJoin();
        sf.join.mainTable = sf.moClass.mainTable;
        if (rField.join == null) {
            //compute the sf.column from the pk column of the referenced class
            sf.join.extTable = rField.moClass.mainTable;
            sf.columns = getFKColumn(rField.moClass, "", sf.join.extTable);
View Full Code Here

            return;
        }
        boolean joinCreated = sf.join == null;
        if (joinCreated) {
            //create the join between mainTable and the genClass table
            sf.join = new SpeedoJoin();
            //sf.moClass.addJoin(sf.join);
            if (logger.isLoggable(BasicLevel.DEBUG)) {
                logger.log(BasicLevel.DEBUG, "\t\t\tCreate SpeedoJoin");
            }
        }
View Full Code Here

        if (sif.columns == null) {
            //Use the same column for the genclass value
            sif.columns = sf.columns;
        }
        if (sif.join == null) {
            sif.join = new SpeedoJoin();
            sif.join.extTable = sf.join.extTable;
            sif.join.mainTable = sf.moClass.mainTable;
            // Use the same join column name but with the targeted column
            // of the current table. We suppose than the id has the same
            // structure
View Full Code Here

                }
            } else {
                sf.columns = cols;
            }
        } else if (sfk != null) { //backward reference
            sf.join = new SpeedoJoin();
            sf.join.mainTable = sf.moClass.mainTable;
            sf.join.extTable = rclass.mainTable;
            //compute the sf.column from the pk column of the referenced class
            Collection pkFields = rclass.getPKFields();
            if (pkFields.isEmpty()) {
View Full Code Here

        if (sfk != null && tfk == null && jt == null
                && sf.relationType == SpeedoField.ONE_MANY_BI_RELATION) {
            //The relation is mapped by the field having the foreign key
            return;
        }
        sf.join = new SpeedoJoin();
        sf.join.mainTable = sf.moClass.mainTable;
        //sf.moClass.addJoin(sf.join);
        if (jt != null) {
            sf.join.extTable = new SpeedoTable();
            sf.join.extTable.name = jt;
View Full Code Here

TOP

Related Classes of org.objectweb.speedo.metadata.SpeedoJoin

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.