Examples of update()


Examples of org.springframework.batch.core.repository.JobRepository.update()

    assertEquals(StubStep.value, execution.getExecutionContext().get(StubStep.key));

    // simulate restart and check the job execution context's content survives
    execution.setEndTime(new Date());
    execution.setStatus(BatchStatus.FAILED);
    repository.update(execution);

    JobExecution restarted = repository.createJobExecution("testHandleStepJob", new JobParameters());
    assertEquals(StubStep.value, restarted.getExecutionContext().get(StubStep.key));
  }
View Full Code Here

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

    s_logger.debug("test data 1: {}", _version1Instant);
    s_logger.debug("test data 2: {}", _version2Instant);
    s_logger.debug("test data 3: {}", _version3Instant);
    s_logger.debug("test data 4: {}", _version4Instant);
    final JdbcOperations template = _htsMaster.getDbConnector().getJdbcOperations();
    template.update("INSERT INTO hts_name VALUES (?,?)",
        1, "N101");
    template.update("INSERT INTO hts_name VALUES (?,?)",
        2, "N102");
    template.update("INSERT INTO hts_name VALUES (?,?)",
        3, "N201");
View Full Code Here

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

@Ignore
public class TestUtil {
  public static void cleanData(ApplicationContext applicationContext) {
    JdbcTemplate jdbcTemplate = (JdbcTemplate)applicationContext.getBean(JdbcTemplate.class);
    jdbcTemplate.update("delete from WF_ACTIVITYINST");
    jdbcTemplate.update("delete from WF_PARTICIPANT");
    jdbcTemplate.update("delete from WF_PRIMARYKEY where name in ('processDefId', 'processInstId'," +
        "'activityInstId', 'workItemId', 'participantId', 'transCtrlId')");
    jdbcTemplate.update("delete from WF_PROCESSDEFINE");
    jdbcTemplate.update("delete from WF_PROCESSINST");
View Full Code Here

Examples of org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.update()

   * 删除指定的表, 在删除期间disable外键的检查.
   */
  public static void deleteTable(DataSource h2DataSource, String... tableNames) {
    NamedParameterJdbcTemplate template = new NamedParameterJdbcTemplate(h2DataSource);

    template.update("SET REFERENTIAL_INTEGRITY FALSE",new HashMap<String, Object>());

    for (String tableName : tableNames) {
      template.update("DELETE FROM " + tableName,new HashMap<String, Object>());
    }

View Full Code Here

Examples of org.springframework.jdbc.core.simple.SimpleJdbcTemplate.update()

        for (Iterator<org.dom4j.Element> it = (Iterator<org.dom4j.Element>) layout.selectNodes("folder | dlm:*").iterator(); it.hasNext();) {
            nextId = addIdAttributesIfNecessary(it.next(), nextId);
        }
        // Now update UP_USER...
        final SimpleJdbcTemplate jdbcTemplate = new SimpleJdbcTemplate(RDBMServices.getDataSource());
        jdbcTemplate.update("UPDATE up_user SET next_struct_id = ? WHERE user_id = ?", nextId, person.getID());

        // (4) Convert external DLM pathrefs to internal form (noderefs)...
        for (Iterator<org.dom4j.Attribute> itr = (Iterator<org.dom4j.Attribute>) layout.selectNodes("//@dlm:origin").iterator(); itr.hasNext();) {
            org.dom4j.Attribute a = itr.next();
            String noderef = getDlmNoderef(ownerUsername, a.getValue(), null, true, layout);
View Full Code Here

Examples of org.springframework.jdbc.object.BatchSqlUpdate.update()

    batchUpdate.declareParameter(new SqlParameter("target_artist_name", Types.VARCHAR));
    batchUpdate.declareParameter(new SqlParameter("target_track_name", Types.VARCHAR));
    batchUpdate.declareParameter(new SqlParameter("weight", Types.FLOAT));
   
    for (TrackRelation tr : trackRelations) {
      batchUpdate.update(new Object[]{
          sourceTrackId, tr.getTarget().getArtist().getName(),
          tr.getTarget().getName(), tr.getMatch()});
    }
    batchUpdate.flush();
  }
View Full Code Here

Examples of org.springframework.orm.hibernate3.HibernateTemplate.update()

      List<Schedule> nextSchedules = htl.find("from Schedule where position > ?", schedule.getPosition());

      for (Schedule nextSchedule : nextSchedules)
      {
        nextSchedule.setPosition(nextSchedule.getPosition() - 1);
        htl.update(nextSchedule);
      }

      if (schedule.getPosition() != maxPosition)
      {
        schedule.setPosition(maxPosition);
View Full Code Here

Examples of org.springframework.xd.test.fixtures.JdbcSource.update()

    jdbcSource.getJdbcTemplate().update(String.format("create table %s (seen INT, name VARCHAR(32))", streamname));
    jdbcSource.getJdbcTemplate().update(String.format("insert into %s (seen, name) values (0, 'eric')", streamname));
    jdbcSource.getJdbcTemplate().update(String.format("insert into %s (seen, name) values (0, 'eric')", streamname));
    jdbcSource.query(String.format("select * from %s where seen = 0", streamname));
    jdbcSource.update(String.format("update %s set seen = 1 where seen = 0", streamname));

    stream().create(streamname, "%s | %s", jdbcSource, counter);
    assertThat(counter, XDMatchers.eventually(XDMatchers.hasValue("2")));
    jdbcSource.getJdbcTemplate().update(String.format("insert into %s (seen, name) values (0, 'eric')", streamname));
    assertThat(counter, XDMatchers.eventually(XDMatchers.hasValue("" + (2 + 1))));
View Full Code Here

Examples of org.spw.controller.CommunicationController.update()

        ContactController contactCtl = new ContactController();
        Contact contact = getContact();
        Communication communication = getCommunication();
       
        //Create communication (needed for new object)
        communication = comCtl.update(communication);
       
        //Insert the participants after converting the array to List
        java.util.List<Contact> participants = new ArrayList<Contact>();
        participants.add(contact);
        if (selected != null) {
View Full Code Here

Examples of org.spw.controller.CountryController.update()

   
    public String buttonChange_action() {
        // Persist the new object
        CountryController ctrl = new CountryController();
        Country object = getSessionBean1().getCountry();
        ctrl.update(object);
       
        return "success";
    }
}
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.