Package org.objectweb.speedo.metadata

Examples of org.objectweb.speedo.metadata.SpeedoTable


      sf.moClass = null;
      sf.columns = null;
      sf.join = null;
      sf.mappedByReversefield = false;
    } else if (se instanceof SpeedoTable) {
      SpeedoTable st = (SpeedoTable) se;
      st.catalog = null;
      st.name = null;
      st.schema = null;
      st.join = null;
    } else if (se instanceof SpeedoJoin) {
View Full Code Here


            c.inheritance.superClassName = n.getNodeValue();
        }
        //attribute table
        n = classNode.getAttributes().getNamedItem("table");
        if (n != null) {
            c.mainTable = new SpeedoTable();
            c.mainTable.name = n.getNodeValue();
        }
        if (c.mainTable == null) {
            if (c.inheritance == null
                    || c.inheritance.strategy == SpeedoInheritance.STRATEGY_NEW_TABLE) {
                c.mainTable = new SpeedoTable();
                c.mainTable.name = c.name.toUpperCase();
            }
        }

        logger.log(BasicLevel.DEBUG, "New class: "
                + "name=" + c.name
                + "  / id = " + c.getIdentityType()
                + "  / idClass = " + c.identity.objectidClass
                + "  / detachable = " + c.isDetachable
        );
       
        Map classChildren = groupChildrenByName(classNode);
        //extension*, implements*, datastore-identity?, inheritance?, version?,
        // join*, foreign-key*, index*, unique*, field*, query*, fetch-group*, extension*
        treatExtensions((List) classChildren.get("extension"), c);
        List l = (List) classChildren.get("datastore-identity");
        if (l != null) {
            treatDataStoreId((Node) l.get(0), c);
        }
        l = (List) classChildren.get("inheritance");
        if (l != null) {
            treatInheritance((Node) l.get(0), c);
        }
        l = (List) classChildren.get("version");
        if (l != null) {
            treatVersion((Node) l.get(0), c);
        }
        l = (List) classChildren.get("join");
        if (l != null) {
            for (int j = 0; j < l.size(); j++) {
                Object[] os = getJoin((Node) l.get(j), null);
                SpeedoJoin join = (SpeedoJoin) os[0];
                String tableName = (String) os[1];
                //define an external/secondary table
                c.addJoin(join);
                if (c.mainTable != null) {
                    join.mainTable = c.mainTable;
                }
                if (tableName != null) {
                    join.extTable = new SpeedoTable();
                    join.extTable.name = tableName;
                    join.extTable.join = join;
                }
            }           
        }
View Full Code Here

              }
              //<!ATTLIST element table CDATA #IMPLIED>
              n = elementNode.getAttributes().getNamedItem("table");
              if (n != null) {
                  if (fc.table == null) {
                      fc.table = new SpeedoTable();
                  } else {
                      logger.log(BasicLevel.WARN, "Specify two tables for the "
                              + fc.field.getSourceDesc()
                              + ": " + fc.table.name + " and " + n.getNodeValue())
                  }
View Full Code Here

        }
        //The field is a primitive field OR a mono valued reference to
        // another persistent class
        if (fc.join != null) { //join sub element specified
            if (fc.table == null) { //no table name specified in field
                fc.table = new SpeedoTable();
                //allocate a defaut name for the secondary table
                fc.table.name = fc.field.moClass.name.toUpperCase()
                  + "_" + fc.field.name.toUpperCase();
            }
            fc.field.join = fc.join;
View Full Code Here

            c.inheritance.superClassName = n.getNodeValue();
        }
        //attribute table
        n = node.getAttributes().getNamedItem("table");
        if (n != null) {
            c.mainTable = new SpeedoTable();
            c.mainTable.name = n.getNodeValue();
        }

        logger.log(BasicLevel.DEBUG, "New class: "
                + "name=" + c.name
View Full Code Here

        if (n != null)
            f.sequence = n.getNodeValue();
       
        //attribute column
        n = node.getAttributes().getNamedItem("table");
        SpeedoTable st = null;
        if (n != null) {
            st = new SpeedoTable();
        }
        //attribute column
        n = node.getAttributes().getNamedItem("column");
        if (n != null) {
            SpeedoColumn sc = new SpeedoColumn();
View Full Code Here

        sc.addJoin(j);
        if (sc.mainTable != null) {
            j.mainTable = sc.mainTable;
        }
        if (joinTableName != null) {
            j.extTable = new SpeedoTable();
            j.extTable.name = joinTableName;
            j.extTable.join = j;
        }
    }
View Full Code Here

TOP

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

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.