Package org.apache.openjpa.jdbc.sql

Examples of org.apache.openjpa.jdbc.sql.Row


        }
    }

    public void delete(OpenJPAStateManager sm, JDBCStore store, RowManager rm)
        throws SQLException {
        Row row = rm.getAllRows(field.getTable(), Row.ACTION_DELETE);
        row.whereForeignKey(field.getJoinForeignKey(), sm);
        rm.flushAllRows(row);
    }
View Full Code Here


        disc.setIndex(idx);
    }

    public void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm)
        throws SQLException {
        Row row = rm.getRow(disc.getClassMapping().getTable(),
            Row.ACTION_INSERT, sm, true);
        Object cls = getDiscriminatorValue((ClassMapping) sm.getMetaData());
        if (disc.getColumnIO().isInsertable(0, cls == null))
            row.setObject(disc.getColumns()[0], cls);
    }
View Full Code Here

    public void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm)
        throws SQLException {
        if (!field.getColumnIO().isInsertable(0, false))
            return;
        Row row = field.getRow(sm, store, rm, Row.ACTION_INSERT);
        if (row != null)
            update(sm, row);
    }
View Full Code Here

    public void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm)
        throws SQLException {
        if (!field.getColumnIO().isUpdatable(0, false))
            return;
        Row row = field.getRow(sm, store, rm, Row.ACTION_UPDATE);
        if (row != null)
            update(sm, row);
    }
View Full Code Here

    public void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm)
        throws SQLException {
        String str = (String) toDataStoreValue(sm.fetchString
            (field.getIndex()), store);
        if (field.getColumnIO().isInsertable(0, str == null)) {
            Row row = field.getRow(sm, store, rm, Row.ACTION_INSERT);
            if (row != null)
                row.setString(field.getColumns()[0], str);
        }
    }
View Full Code Here

    public void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm)
        throws SQLException {
        String str = (String) toDataStoreValue(sm.fetchString
            (field.getIndex()), store);
        if (field.getColumnIO().isUpdatable(0, str == null)) {
            Row row = field.getRow(sm, store, rm, Row.ACTION_UPDATE);
            if (row != null)
                row.setString(field.getColumns()[0], str);
        }
    }
View Full Code Here

    }

    public void where(OpenJPAStateManager sm, JDBCStore store, RowManager rm,
        Object prevValue)
        throws SQLException {
        Row row = field.getRow(sm, store, rm, Row.ACTION_UPDATE);
        if (row == null)
            return;

        Column col = field.getColumns()[0];
        if (prevValue == null)
            row.whereNull(col);
        else
            row.whereString(col, prevValue.toString());
    }
View Full Code Here

        return false;
    }

    public void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm)
        throws SQLException {
        Row row = rm.getRow(cls.getTable(), Row.ACTION_INSERT, sm, true);
        if (cls.getIdentityType() == cls.ID_DATASTORE)
            row.setPrimaryKey(cls.getColumnIO(), sm);
    }
View Full Code Here

            row.setPrimaryKey(cls.getColumnIO(), sm);
    }

    public void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm)
        throws SQLException {
        Row row = rm.getRow(cls.getTable(), Row.ACTION_UPDATE, sm, false);
        if (row != null)
            row.wherePrimaryKey(sm);
    }
View Full Code Here

            row.wherePrimaryKey(sm);
    }

    public void delete(OpenJPAStateManager sm, JDBCStore store, RowManager rm)
        throws SQLException {
        Row row = rm.getRow(cls.getTable(), Row.ACTION_DELETE, sm, true);
        row.wherePrimaryKey(sm);
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.jdbc.sql.Row

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.