CLOUDSTACK-1176 1) remove 'final' modifier from id attribute in SnapshotVO 2) make state setter method comply with convention

This commit is contained in:
Mice Xia 2013-02-07 13:31:49 +08:00
parent 7c003611d0
commit 13a4c0670e
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ public class SnapshotVO implements Snapshot {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="id")
private final long id = -1;
private long id;
@Column(name="data_center_id")
long dataCenterId;
@ -248,7 +248,7 @@ public class SnapshotVO implements Snapshot {
return state;
}
public void setStatus(State state) {
public void setState(State state) {
this.state = state;
}

View File

@ -328,7 +328,7 @@ public class SnapshotDaoImpl extends GenericDaoBase<SnapshotVO, Long> implements
Transaction txn = Transaction.currentTxn();
txn.start();
SnapshotVO snapshotVO = (SnapshotVO)snapshot;
snapshotVO.setStatus(nextState);
snapshotVO.setState(nextState);
super.update(snapshotVO.getId(), snapshotVO);
txn.commit();
return true;