Package org.springframework.jdbc.core

Examples of org.springframework.jdbc.core.JdbcTemplate.update()


  {
    try
    {
      Date boundary = new Date ( ) ;
      JdbcTemplate jdbcTemplate = getJdbcTemplate ( ) ;
      int cnt = jdbcTemplate.update ( _sqlCleanup, new Object[]
        { boundary } ) ;

      if ( _log.isDebugEnabled ( ) )
        _log.debug ( "Client associations cleanup removed " + cnt
                + " entries" ) ;
View Full Code Here


                                    try {
                                        failedDatas.clear(); // 先清理
                                        processedDatas.clear();
                                        interceptor.transactionBegin(context, Arrays.asList(data), dbDialect);
                                        JdbcTemplate template = dbDialect.getJdbcTemplate();
                                        int affect = template.update(data.getSql(), new PreparedStatementSetter() {

                                            public void setValues(PreparedStatement ps) throws SQLException {
                                                doPreparedStatement(ps, dbDialect, lobCreator, data);
                                            }
                                        });
View Full Code Here

    // Get the JDBC template.
    JdbcTemplate jdbcTemplate = dao.getJdbcTemplate();
   
    // Add the authentication token.
    try {
      jdbcTemplate
        .update(
          "INSERT INTO " + AuthenticationTokenBin.DB_NAME +
            " (" +
              UserBin.DB_NAME + "_id" + ", " +
              AuthenticationToken.JSON_KEY_TOKEN + ", " +
View Full Code Here

    // Get the JDBC template.
    JdbcTemplate jdbcTemplate = dao.getJdbcTemplate();
   
    // Add the authorization code response.
    try {
      jdbcTemplate
        .update(
          "INSERT INTO " + AuthorizationCodeResponseBin.DB_NAME +
            " (" +
              UserBin.DB_NAME + "_id" + ", " +
              AuthorizationCodeBin.DB_NAME + "_id" + ", " +
View Full Code Here

    // Get the JDBC template.
    JdbcTemplate jdbcTemplate = dao.getJdbcTemplate();
   
    // Add the third-party.
    try {
      jdbcTemplate
        .update(
          "INSERT INTO " + ThirdPartyBin.DB_NAME + " (" +
              UserBin.DB_NAME + "_id" + ", " +
              ThirdParty.JSON_KEY_ID + ", " +
              ThirdParty.JSON_KEY_SHARED_SECRET + ", " +
View Full Code Here

    // Get the JDBC template.
    JdbcTemplate jdbcTemplate = dao.getJdbcTemplate();
   
    // Add the authentication token.
    try {
      jdbcTemplate
        .update(
          "INSERT INTO " + UserBin.DB_NAME +
            " (" +
              User.JSON_KEY_USERNAME + ", " +
              User.JSON_KEY_PASSWORD + ", " +
View Full Code Here

    // Get the JDBC template.
    JdbcTemplate jdbcTemplate = dao.getJdbcTemplate();
   
    // Add the authentication token.
    try {
      jdbcTemplate
        .update(
          "UPDATE " + UserBin.DB_NAME + " " +
          "SET " +
            User.JSON_KEY_PASSWORD + " = ?, " +
            User.JSON_KEY_EMAIL + " = ?, " +
View Full Code Here

    // Get the JDBC template.
    JdbcTemplate jdbcTemplate = dao.getJdbcTemplate();
   
    // Add the authorization token.
    try {
      jdbcTemplate
        .update(
          "INSERT INTO " + AuthorizationTokenBin.DB_NAME +
            " (" +
              AuthorizationCodeBin.DB_NAME + "_id" + ", " +
              AuthorizationToken.JSON_KEY_ACCESS_TOKEN + ", " +
View Full Code Here

          e);
    }
   
    // Add the authorization code.
    try {
      jdbcTemplate
        .update(
          "INSERT INTO " + AuthorizationCodeBin.DB_NAME +
            " (" +
              ThirdPartyBin.DB_NAME + "_id" + ", " +
              AuthorizationCode.JSON_KEY_CODE + ", " +
View Full Code Here

        String value = jdbcTemplate.queryForObject(
                "SELECT USERNAME FROM testsync WHERE ID=?", String.class, actual.getId());
        assertEquals("virattrcache", value);

        jdbcTemplate.update("UPDATE testsync set USERNAME='virattrcache2' WHERE ID=?", actual.getId());

        value = jdbcTemplate.queryForObject(
                "SELECT USERNAME FROM testsync WHERE ID=?", String.class, actual.getId());
        assertEquals("virattrcache2", value);
        // ----------------------------------------
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.