Package org.apache.turbine.torque.engine.database.model

Examples of org.apache.turbine.torque.engine.database.model.ForeignKey


        next();
        if (!token.getStr().toUpperCase().equals("("))
            err ("( expected");
        next();

        ForeignKey fk = new ForeignKey();
        Vector localColumns = new Vector();
        tbl.addForeignKey(fk);

        String colName = token.getStr();
        localColumns.add(colName);
        next();
        while (token.getStr().equals(","))
        {
            next();
            colName = token.getStr();
            localColumns.add(colName);
            next();
        }
        if (!token.getStr().toUpperCase().equals(")"))
            err (") expected");

        next();

        if (!token.getStr().toUpperCase().equals("REFERENCES"))
            err ("REFERENCES expected");

        next();

        fk.setForeignTableName(token.getStr());

        next();

        if (token.getStr().toUpperCase().equals("("))
        {
            next();
            int i=0;
            fk.addReference((String)localColumns.get(i++),token.getStr());
            next();
            while (token.getStr().equals(","))
            {
                next();
                fk.addReference((String)localColumns.get(i++),token.getStr());
                next();
            }
            if (!token.getStr().toUpperCase().equals(")"))
                err (") expected");
            next();
View Full Code Here


        next();
        if (!token.getStr().toUpperCase().equals("("))
            err ("( expected");
        next();

        ForeignKey fk = new ForeignKey();
        Vector localColumns = new Vector();
        tbl.addForeignKey(fk);

        String colName = token.getStr();
        localColumns.add(colName);
        next();
        while (token.getStr().equals(","))
        {
            next();
            colName = token.getStr();
            localColumns.add(colName);
            next();
        }
        if (!token.getStr().toUpperCase().equals(")"))
            err (") expected");

        next();

        if (!token.getStr().toUpperCase().equals("REFERENCES"))
            err ("REFERENCES expected");

        next();

        fk.setForeignTableName(token.getStr());

        next();

        if (token.getStr().toUpperCase().equals("("))
        {
            next();
            int i=0;
            fk.addReference((String)localColumns.get(i++),token.getStr());
            next();
            while (token.getStr().equals(","))
            {
                next();
                fk.addReference((String)localColumns.get(i++),token.getStr());
                next();
            }
            if (!token.getStr().toUpperCase().equals(")"))
                err (") expected");
            next();
View Full Code Here

                            attributes.getValue("foreignTable") + "!");
                    }
                }
                else if (rawName.equals("reference"))
                {
                    ForeignKey fk = currTable
                        .getForeignKey(attributes.getValue("local"));
                    List referrers = foreignTable.getReferrers();
                    if (referrers == null || !referrers.contains(fk))
                    {
                        foreignTable.addReferrer(fk);
View Full Code Here

        next();
        if (!token.getStr().toUpperCase().equals("("))
            err ("( expected");
        next();

        ForeignKey fk = new ForeignKey();
        Vector localColumns = new Vector();
        tbl.addForeignKey(fk);

        String colName = token.getStr();
        localColumns.add(colName);
        next();
        while (token.getStr().equals(","))
        {
            next();
            colName = token.getStr();
            localColumns.add(colName);
            next();
        }
        if (!token.getStr().toUpperCase().equals(")"))
            err (") expected");

        next();

        if (!token.getStr().toUpperCase().equals("REFERENCES"))
            err ("REFERENCES expected");

        next();

        fk.setForeignTableName(token.getStr());

        next();

        if (token.getStr().toUpperCase().equals("("))
        {
            next();
            int i=0;
            fk.addReference((String)localColumns.get(i++),token.getStr());
            next();
            while (token.getStr().equals(","))
            {
                next();
                fk.addReference((String)localColumns.get(i++),token.getStr());
                next();
            }
            if (!token.getStr().toUpperCase().equals(")"))
                err (") expected");
            next();
View Full Code Here

        next();
        if (!token.getStr().toUpperCase().equals("("))
            err ("( expected");
        next();

        ForeignKey fk = new ForeignKey();
        Vector localColumns = new Vector();
        tbl.addForeignKey(fk);

        String colName = token.getStr();
        localColumns.add(colName);
        next();
        while (token.getStr().equals(","))
        {
            next();
            colName = token.getStr();
            localColumns.add(colName);
            next();
        }
        if (!token.getStr().toUpperCase().equals(")"))
            err (") expected");

        next();

        if (!token.getStr().toUpperCase().equals("REFERENCES"))
            err ("REFERENCES expected");

        next();

        fk.setForeignTableName(token.getStr());

        next();

        if (token.getStr().toUpperCase().equals("("))
        {
            next();
            int i=0;
            fk.addReference((String)localColumns.get(i++),token.getStr());
            next();
            while (token.getStr().equals(","))
            {
                next();
                fk.addReference((String)localColumns.get(i++),token.getStr());
                next();
            }
            if (!token.getStr().toUpperCase().equals(")"))
                err (") expected");
            next();
View Full Code Here

TOP

Related Classes of org.apache.turbine.torque.engine.database.model.ForeignKey

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.