Package org.jpox.store.rdbms

Examples of org.jpox.store.rdbms.SQLController.executeStatementUpdate()


                        fieldMapping.setObject(om, ps, Mappings.getParametersIndex(jdbcPosition, fieldMapping), value);
                        jdbcPosition += fieldMapping.getNumberOfDatastoreFields();
                        jdbcPosition = populateOwnerInStatement(sm, om, ps, jdbcPosition);
                        jdbcPosition = populateEmbeddedElementFieldsInStatement(sm, element, ps, jdbcPosition, (JoinTable)containerTable);

                        sqlControl.executeStatementUpdate(mconn, stmt, ps, true);
                        modified = true;
                    }
                    finally
                    {
                        sqlControl.closeStatement(mconn, ps);
View Full Code Here


        SQLController sqlControl = storeMgr.getSQLController();
        try
        {
            ps = sqlControl.getStatementForUpdate(conn, deleteAllStmt, false);

            sqlControl.executeStatementUpdate(conn, deleteAllStmt, ps, true);

            // TODO : handle any warning messages
        }
        finally
        {
View Full Code Here

            {
                jdbcPosition = populateRelationDiscriminatorInStatement(om, ps, jdbcPosition);
            }

            // Execute the statement
            return sqlControl.executeStatementUpdate(conn, removeStmt, ps, executeNow);
        }
        finally
        {
            sqlControl.closeStatement(conn, ps);
        }
View Full Code Here

                        jdbcPosition = populateRelationDiscriminatorInStatement(om, ps, jdbcPosition);
                    }
                    elementMapping.setObject(om, ps, Mappings.getParametersIndex(jdbcPosition, elementMapping), element);
                    jdbcPosition += elementMapping.getNumberOfDatastoreFields();

                    sqlControl.executeStatementUpdate(mconn, stmt, ps, true);
                    retval = true;
                }
                finally
                {
                    sqlControl.closeStatement(mconn, ps);
View Full Code Here

                    (String) properties.get("key-increment-by"),
                    (String) properties.get("key-database-cache-size"));
        try
        {
            ps = sqlControl.getStatementForUpdate(connection, stmt, false);
            sqlControl.executeStatementUpdate(connection, stmt, ps, true);
        }
        catch (SQLException e)
        {
            JPOXLogger.DATASTORE.error(e);
            throw new PoidException(LOCALISER_RDBMS.msg("061000",e.getMessage()) + stmt);
View Full Code Here

                    PreparedStatement ps = sqlControl.getStatementForUpdate(mconn, stmt, false);
                    try
                    {
                        int jdbcPosition = 1;
                        jdbcPosition = populateOwnerInStatement(ownerSM, om, ps, jdbcPosition);
                        sqlControl.executeStatementUpdate(mconn, stmt, ps, true);
                    }
                    finally
                    {
                        sqlControl.closeStatement(mconn, ps);
                    }
View Full Code Here

                        }
                    }
                    else
                    {
                        // UPDATE/DELETE query
                        int[] rcs = sqlControl.executeStatementUpdate(mconn, stmtText.toString(), ps, true);
                        JPOXLogger.JDO.info(">> Update statement returned " + rcs[0]);
                        // TODO Return the number of affected records
                    }
                }
                finally
View Full Code Here

                        fieldMapping.setObject(om, ps, Mappings.getParametersIndex(jdbcPosition, fieldMapping), key);
                        jdbcPosition += fieldMapping.getNumberOfDatastoreFields();
                        jdbcPosition = populateOwnerInStatement(sm, om, ps, jdbcPosition);
                        jdbcPosition = populateEmbeddedKeyFieldsInStatement(sm, key, ps, jdbcPosition, (JoinTable)mapTable);

                        sqlControl.executeStatementUpdate(mconn, stmt, ps, true);
                        modified = true;
                    }
                    finally
                    {
                        sqlControl.closeStatement(mconn, ps);
View Full Code Here

                        fieldMapping.setObject(om, ps, Mappings.getParametersIndex(jdbcPosition, fieldMapping), newValue);
                        jdbcPosition += fieldMapping.getNumberOfDatastoreFields();
                        jdbcPosition = populateOwnerInStatement(sm, om, ps, jdbcPosition);
                        jdbcPosition = populateEmbeddedValueFieldsInStatement(sm, value, ps, jdbcPosition, (JoinTable)mapTable);

                        sqlControl.executeStatementUpdate(mconn, stmt, ps, true);
                        modified = true;
                    }
                    finally
                    {
                        sqlControl.closeStatement(mconn, ps);
View Full Code Here

                jdbcPosition += adapterMapping.getNumberOfDatastoreFields();
            }
            jdbcPosition = populateKeyInStatement(om, ps, key, jdbcPosition);

            // Execute the statement
            return sqlControl.executeStatementUpdate(conn, putStmt, ps, true);
        }
        finally
        {
            sqlControl.closeStatement(conn, ps);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.