Examples of executeStatementUpdate()


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

        PreparedStatement ps = sqlControl.getStatementForUpdate(conn, deleteStmt, false);
        try
        {
            ps.setString(1, class_name);

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

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

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

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

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

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

                            Object obj = parameters.get(Integer.valueOf(i+1));
                            ps.setObject((i+1), obj);
                        }

                        // Execute the update statement
                        int[] rcs = sqlControl.executeStatementUpdate(mconn, compiledSQL, ps, true);
                        return Long.valueOf(rcs[0]); // Return a single Long with the number of records updated
                    }
                    finally
                    {
                        sqlControl.closeStatement(mconn, ps);
View Full Code Here

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

                    if (ecs.getRelationDiscriminatorMapping() != null)
                    {
                        jdbcPosition = BackingStoreHelper.populateRelationDiscriminatorInStatement(ec, ps, jdbcPosition, ecs);
                    }

                    int[] rowsDeleted = sqlControl.executeStatementUpdate(mconn, stmt, ps, true);
                    if (rowsDeleted[0] == 0)
                    {
                        // ?? throw exception??
                    }
                }
View Full Code Here

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

                {
                    jdbcPosition = BackingStoreHelper.populateRelationDiscriminatorInStatement(ec, ps, jdbcPosition, ecs);
                }

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

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

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

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

                        jdbcPosition = BackingStoreHelper.populateRelationDiscriminatorInStatement(ec, ps, jdbcPosition, this);
                    }
                    elementMapping.setObject(ec, ps, MappingHelper.getMappingIndices(jdbcPosition, elementMapping), element);
                    jdbcPosition += elementMapping.getNumberOfDatastoreMappings();

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

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

                                    externalOrderStmtMappings[i].getParameterPositionsForOccurrence(k), orderValue);
                            }
                        }
                    }

                    sqlControl.executeStatementUpdate(mconn, insertStmt, ps, !batch);

                    if (hasIdentityColumn)
                    {
                        // Identity was set in the datastore using auto-increment/identity/serial etc
                        Object newId = getInsertedDatastoreIdentity(ec, sqlControl, sm, mconn, ps);
View Full Code Here

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

                            verMapping.setObject(ec, ps,
                                mapIdx.getParameterPositionsForOccurrence(i), currentVersion);
                        }
                    }

                    int[] rcs = sqlControl.executeStatementUpdate(mconn, stmt, ps, !batch);
                    if (optimisticChecks && rcs[0] == 0)
                    {
                        // No object deleted so either object disappeared or failed optimistic version checks
                        String msg = LOCALISER.msg("052203",
                            sm.toPrintableID(), sm.getInternalObjectId(),
View Full Code Here

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

                        try
                        {
                            ps = sqlControl.getStatementForUpdate(mconn, clearLinkStmt.toString(), false);
                            refMapping.setObject(ec, ps, MappingHelper.getMappingIndices(1, refMapping), sm.getObject());

                            sqlControl.executeStatementUpdate(mconn, clearLinkStmt.toString(), ps, true);
                        }
                        finally
                        {
                            if (ps != null)
                            {
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.