Examples of runUpdate()


Examples of com.j256.ormlite.support.CompiledStatement.runUpdate()

    DatabaseConnection connection = createMock(DatabaseConnection.class);
    @SuppressWarnings("unchecked")
    PreparedDelete<Foo> delete = createMock(PreparedDelete.class);
    CompiledStatement compiledStmt = createMock(CompiledStatement.class);
    expect(delete.compile(connection, StatementType.DELETE)).andReturn(compiledStmt);
    expect(compiledStmt.runUpdate()).andThrow(new SQLException("expected"));
    compiledStmt.close();
    StatementExecutor<Foo, String> statementExec =
        new StatementExecutor<Foo, String>(databaseType, tableInfo, null);
    replay(connection, compiledStmt, delete);
    try {
View Full Code Here

Examples of com.j256.ormlite.support.CompiledStatement.runUpdate()

    CompiledStatement compiledStatement =
        connection.compileStatement(statement, StatementType.UPDATE, noFieldTypes,
            DatabaseConnection.DEFAULT_RESULT_FLAGS);
    try {
      assignStatementArguments(compiledStatement, arguments);
      return compiledStatement.runUpdate();
    } finally {
      IOUtils.closeThrowSqlException(compiledStatement, "compiled statement");
    }
  }
View Full Code Here

Examples of com.j256.ormlite.support.CompiledStatement.runUpdate()

   * Update rows in the database.
   */
  public int update(DatabaseConnection databaseConnection, PreparedUpdate<T> preparedUpdate) throws SQLException {
    CompiledStatement compiledStatement = preparedUpdate.compile(databaseConnection, StatementType.UPDATE);
    try {
      int result = compiledStatement.runUpdate();
      if (dao != null && !localIsInBatchMode.get()) {
        dao.notifyChanges();
      }
      return result;
    } finally {
View Full Code Here

Examples of com.j256.ormlite.support.CompiledStatement.runUpdate()

   * Delete rows that match the prepared statement.
   */
  public int delete(DatabaseConnection databaseConnection, PreparedDelete<T> preparedDelete) throws SQLException {
    CompiledStatement compiledStatement = preparedDelete.compile(databaseConnection, StatementType.DELETE);
    try {
      int result = compiledStatement.runUpdate();
      if (dao != null && !localIsInBatchMode.get()) {
        dao.notifyChanges();
      }
      return result;
    } finally {
View Full Code Here

Examples of name.abuchen.portfolio.ui.update.UpdateHelper.runUpdate()

                public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
                {
                    try
                    {
                        UpdateHelper updateHelper = new UpdateHelper(workbench);
                        updateHelper.runUpdate(monitor, false);
                    }
                    catch (CoreException e)
                    {
                        throw new InvocationTargetException(e);
                    }
View Full Code Here

Examples of name.abuchen.portfolio.ui.update.UpdateHelper.runUpdate()

                {
                    try
                    {
                        monitor.beginTask(Messages.JobMsgCheckingForUpdates, 200);
                        UpdateHelper updateHelper = new UpdateHelper(workbench);
                        updateHelper.runUpdate(monitor, true);
                    }
                    catch (CoreException e)
                    {
                        PortfolioPlugin.log(e.getStatus());
                    }
View Full Code Here

Examples of org.projectforge.continuousdb.UpdateEntry.runUpdate()

    final boolean missingDatabaseSchema = initDatabaseDao.isEmpty();
    if (missingDatabaseSchema == true) {
      try {
        PFUserContext.setUser(MyDatabaseUpdateDao.__internalGetSystemAdminPseudoUser());
        final UpdateEntry updateEntry = DatabaseCoreInitial.getInitializationUpdateEntry(myDatabaseUpdater);
        updateEntry.runUpdate();
      } finally {
        PFUserContext.setUser(null);
      }
    }
View Full Code Here

Examples of org.projectforge.continuousdb.UpdateEntry.runUpdate()

      try {
        PFUserContext.setUser(MyDatabaseUpdateDao.__internalGetSystemAdminPseudoUser()); // Logon admin user.
        for (final AbstractPlugin plugin : pluginsRegistry.getPlugins()) {
          final UpdateEntry updateEntry = plugin.getInitializationUpdateEntry();
          if (updateEntry != null) {
            updateEntry.runUpdate();
          }
        }
      } finally {
        PFUserContext.setUser(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.