Package com.sun.jdo.spi.persistence.support.sqlstore.model

Examples of com.sun.jdo.spi.persistence.support.sqlstore.model.LocalFieldDesc


     * This method just adds the table for the nested select.
     * The statement for nested select is created as a side effect.
     */
    protected void processFields() {
        for (int i = 0; i < parentField.foreignFields.size(); i++) {
            LocalFieldDesc field = (LocalFieldDesc) parentField.foreignFields.get(i);
            addTable(field);
        }
    }
View Full Code Here


        }

        ArrayList localFields = parentField.localFields;
        // Add the constraint linking the parent query with the subquery.
        for (int i = 0; i < localFields.size(); i++) {
            LocalFieldDesc la = (LocalFieldDesc) localFields.get(i);
            LocalFieldDesc fa = (LocalFieldDesc) foreignFields.get(i);

            ConstraintFieldDesc lcfd = new ConstraintFieldDesc(la, parentPlan);
            ConstraintFieldDesc fcfd = new ConstraintFieldDesc(fa, this);

            constraint.addField(lcfd);
View Full Code Here

    }


    public void addLocalConstraints(int action, ForeignFieldDesc f, SQLStateManager sm) {
        for (int i = 0; i < f.localFields.size(); i++) {
            LocalFieldDesc lf = (LocalFieldDesc) f.localFields.get(i);

            if (action == QueryPlan.ACT_INSERT) {
                // For inserts into the join table, we get the values we are inserting
                // for the parent object and the added object.
                ColumnElement lc = (ColumnElement) f.assocLocalColumns.get(i);

                addColumn(lc, lf.getValue(sm));
            } else if (action == QueryPlan.ACT_DELETE) {
                LocalFieldDesc alf = (LocalFieldDesc) f.assocLocalFields.get(i);

                // For deletes from the join table, we get the constraint values
                // from the parent object and the remove object.
                addConstraint(alf, lf.getValue(sm));
            }
View Full Code Here

        }
    }

    public void addForeignConstraints(int action, ForeignFieldDesc f, SQLStateManager sm) {
        for (int i = 0; i < f.foreignFields.size(); i++) {
            LocalFieldDesc ff = (LocalFieldDesc) f.foreignFields.get(i);

            if (action == QueryPlan.ACT_INSERT) {
                // For inserts into the join table, we get the values we are inserting
                // for the parent object and the added object.
                ColumnElement fc = (ColumnElement) f.assocForeignColumns.get(i);

                addColumn(fc, ff.getValue(sm));
            } else if (action == QueryPlan.ACT_DELETE) {
                LocalFieldDesc aff = (LocalFieldDesc) f.assocForeignFields.get(i);

                // For deletes from the join table, we get the constraint values
                // from the parent object and the remove object.
                addConstraint(aff, ff.getValue(sm));
            }
View Full Code Here

     */
    private static Object getInputValue(UpdateObjectDescImpl updateDesc,
                                        ColumnRef columnRef,
                                        boolean getBeforeValue) {
        Object value;
        LocalFieldDesc field = (LocalFieldDesc) columnRef.getValue();

        if (field.isVersion()) {
            // Bind the value from the after image for version fields,
            // as they're incremented internally after each flush.
            // Version fields must not be modified from "outside".
            value = updateDesc.getAfterValue(field);
        else {
View Full Code Here

    }


    public void addLocalConstraints(int action, ForeignFieldDesc f, SQLStateManager sm) {
        for (int i = 0; i < f.localFields.size(); i++) {
            LocalFieldDesc lf = (LocalFieldDesc) f.localFields.get(i);

            if (action == QueryPlan.ACT_INSERT) {
                // For inserts into the join table, we get the values we are inserting
                // for the parent object and the added object.
                ColumnElement lc = (ColumnElement) f.assocLocalColumns.get(i);

                addColumn(lc, lf.getValue(sm));
            } else if (action == QueryPlan.ACT_DELETE) {
                LocalFieldDesc alf = (LocalFieldDesc) f.assocLocalFields.get(i);

                // For deletes from the join table, we get the constraint values
                // from the parent object and the remove object.
                addConstraint(alf, lf.getValue(sm));
            }
View Full Code Here

        }
    }

    public void addForeignConstraints(int action, ForeignFieldDesc f, SQLStateManager sm) {
        for (int i = 0; i < f.foreignFields.size(); i++) {
            LocalFieldDesc ff = (LocalFieldDesc) f.foreignFields.get(i);

            if (action == QueryPlan.ACT_INSERT) {
                // For inserts into the join table, we get the values we are inserting
                // for the parent object and the added object.
                ColumnElement fc = (ColumnElement) f.assocForeignColumns.get(i);

                addColumn(fc, ff.getValue(sm));
            } else if (action == QueryPlan.ACT_DELETE) {
                LocalFieldDesc aff = (LocalFieldDesc) f.assocForeignFields.get(i);

                // For deletes from the join table, we get the constraint values
                // from the parent object and the remove object.
                addConstraint(aff, ff.getValue(sm));
            }
View Full Code Here

     */
    private static Object getInputValue(UpdateObjectDescImpl updateDesc,
                                        ColumnRef columnRef,
                                        boolean getBeforeValue) {
        Object value;
        LocalFieldDesc field = (LocalFieldDesc) columnRef.getValue();

        if (field.isVersion()) {
            // Bind the value from the after image for version fields,
            // as they're incremented internally after each flush.
            // Version fields must not be modified from "outside".
            value = updateDesc.getAfterValue(field);
        else {
View Full Code Here

     * This method just adds the table for the nested select.
     * The statement for nested select is created as a side effect.
     */
    protected void processFields() {
        for (int i = 0; i < parentField.foreignFields.size(); i++) {
            LocalFieldDesc field = (LocalFieldDesc) parentField.foreignFields.get(i);
            addTable(field);
        }
    }
View Full Code Here

        }

        ArrayList localFields = parentField.localFields;
        // Add the constraint linking the parent query with the subquery.
        for (int i = 0; i < localFields.size(); i++) {
            LocalFieldDesc la = (LocalFieldDesc) localFields.get(i);
            LocalFieldDesc fa = (LocalFieldDesc) foreignFields.get(i);

            ConstraintFieldDesc lcfd = new ConstraintFieldDesc(la, parentPlan);
            ConstraintFieldDesc fcfd = new ConstraintFieldDesc(fa, this);

            constraint.addField(lcfd);
View Full Code Here

TOP

Related Classes of com.sun.jdo.spi.persistence.support.sqlstore.model.LocalFieldDesc

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.