Polish docs

This commit is contained in:
Janne Valkealahti
2015-10-11 15:45:06 +01:00
parent 4df80adc4f
commit a6f06435e1
3 changed files with 19 additions and 7 deletions

View File

@@ -66,14 +66,16 @@ public class Persist {
//tag::snippetB[]
public void change(int order, String event) {
Order o = jdbcTemplate.queryForObject("select id, state from orders where id = ?", new Object[]{order}, new RowMapper<Order>() {
public Order mapRow(ResultSet rs, int rowNum) throws SQLException {
return new Order(rs.getInt("id"), rs.getString("state"));
}
});
Order o = jdbcTemplate.queryForObject("select id, state from orders where id = ?", new Object[] { order },
new RowMapper<Order>() {
public Order mapRow(ResultSet rs, int rowNum) throws SQLException {
return new Order(rs.getInt("id"), rs.getString("state"));
}
});
handler.handleEventWithState(MessageBuilder.withPayload(event).setHeader("order", order).build(), o.state);
}
//end::snippetB[]
//end::snippetB[]
//tag::snippetC[]
private class LocalPersistStateChangeListener implements PersistStateChangeListener {

View File

@@ -64,7 +64,7 @@ public class Application {
.event(Events.DRY)
.and()
.withExternal()
.source(States.RUNNING) .target(States.POWEROFF)
.source(States.RUNNING).target(States.POWEROFF)
.event(Events.CUTPOWER)
.and()
.withExternal()