Package org.objectweb.speedo.metadata

Examples of org.objectweb.speedo.metadata.SpeedoJoin


      st.catalog = null;
      st.name = null;
      st.schema = null;
      st.join = null;
    } else if (se instanceof SpeedoJoin) {
      SpeedoJoin sj = (SpeedoJoin) se;
      sj.extTable = null;
      sj.mainTable = null;
      sj.columns = new ArrayList();
      sj.deleteAction = SpeedoJoin.ACTION_NONE;
    } else if (se instanceof SpeedoColumn) {
View Full Code Here


      st.catalog = null;
      st.name = null;
      st.schema = null;
      st.join = null;
    } else if (se instanceof SpeedoJoin) {
      SpeedoJoin sj = (SpeedoJoin) se;
      sj.extTable = null;
      sj.mainTable = null;
      sj.columns  = new ArrayList();
      sj.deleteAction = SpeedoJoin.ACTION_NONE;
    } else if (se instanceof SpeedoColumn) {
View Full Code Here

        }
        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;
View Full Code Here

                discNode, discChildren);
    }
    private Object[] getJoin(Node joinNode, SpeedoJoin j) throws SpeedoException {
        Node n = joinNode.getAttributes().getNamedItem("table");
        if (j == null) {
            j = new SpeedoJoin();
        }
        n = joinNode.getAttributes().getNamedItem("delete-action");
        if (n != null) {
            String v = n.getNodeValue();
            if ("restrict".equals(v)) {
View Full Code Here

                            i = js.length;
                        }
                    }
                    if (fc.field.join == null) {
                        //no existing join found, create a new one
                        fc.join = new SpeedoJoin();
                    }
                }
            }
            fc.field.join = fc.join;
            fc.field.join.extTable = fc.table;
            fc.field.join.mainTable = fc.field.moClass.mainTable;
        } else {
            // The collection is stored in the table of the referenced state
            fc.field.join = new SpeedoJoin();
        }
        fc.field.columns = fc.getColumns();
    }
View Full Code Here

                logger.log(BasicLevel.INFO,
                        "The user specified a secondary table without join columns");
                if (fc.field.moClass.getExtTable(fc.table.name, false) != fc.table) {
                    logger.log(BasicLevel.INFO,
                    "The user specified a secondary table without join columns");
                    fc.field.join = new SpeedoJoin();
                    fc.field.join.mainTable = fc.field.moClass.mainTable;
                    fc.field.join.extTable = fc.table;
                    fc.field.moClass.addJoin(fc.field.join);
                } else {
                    logger.log(BasicLevel.DEBUG, "Field '" + fc.field.name
View Full Code Here

<!ATTLIST discriminator indexed (true|false|unique) #IMPLIED>
       
*/
    }
    private Object treatJoin(Node node, Object mo) throws SpeedoException {
        SpeedoJoin j = new SpeedoJoin();
        Node n = node.getAttributes().getNamedItem("delete-action");
        if (n == null) {
            String v = n.getNodeValue();
            if ("restrict".equals(v)) {
                j.deleteAction = SpeedoJoin.ACTION_RESTRICT;
            } else if ("cascade".equals(v)) {
                j.deleteAction = SpeedoJoin.ACTION_CASCADE;
            } else if ("null".equals(v)) {
                j.deleteAction = SpeedoJoin.ACTION_NULL;
            } else if ("none".equals(v)) {
                j.deleteAction = SpeedoJoin.ACTION_NONE;
            } else if ("default".equals(v)) {
                j.deleteAction = SpeedoJoin.ACTION_DEFAULT;
            } else {
                j.deleteAction = SpeedoJoin.ACTION_DEFAULT;
            }
        }
        j.setUnique(getBooleanAttributeValue(node, "unique", j.getUnique()));
        j.setIndexed(getBooleanAttributeValue(node, "indexed", j.getIndexed()));
        j.setOuter(getBooleanAttributeValue(node, "indexed", j.getOuter()));
        n = node.getAttributes().getNamedItem("column");
        if (n == null) {
            SpeedoColumn col = new SpeedoColumn();
            col.name = n.getNodeValue();
            SpeedoJoinColumn sjc = new SpeedoJoinColumn();
View Full Code Here

        n = node.getAttributes().getNamedItem("default-value");
        if (n == null) {
            c.defaultValue = n.getNodeValue();
        }
        if (mo instanceof SpeedoJoin) {
            SpeedoJoin j = (SpeedoJoin) mo;
            if (j.extTable != null) {
                c.table = j.extTable;
            }
            SpeedoJoinColumn sjc = new SpeedoJoinColumn();
            sjc.column = c;
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.