You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/02/07 21:04:12 UTC

[36/51] [abbrv] git commit: refs/heads/ui-plugins - CLOUDSTACK-1176 1) remove 'final' modifier from id attribute in SnapshotVO 2) make state setter method comply with convention

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


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/13a4c067
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/13a4c067
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/13a4c067

Branch: refs/heads/ui-plugins
Commit: 13a4c0670ee2caffd7a3fe04f82680e583b20607
Parents: 7c00361
Author: Mice Xia <mi...@tcloudcomputing.com>
Authored: Thu Feb 7 13:31:49 2013 +0800
Committer: Mice Xia <mi...@tcloudcomputing.com>
Committed: Thu Feb 7 13:41:49 2013 +0800

----------------------------------------------------------------------
 core/src/com/cloud/storage/SnapshotVO.java         |    4 ++--
 .../src/com/cloud/storage/dao/SnapshotDaoImpl.java |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/13a4c067/core/src/com/cloud/storage/SnapshotVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/SnapshotVO.java b/core/src/com/cloud/storage/SnapshotVO.java
index 0aa489b..68336cb 100644
--- a/core/src/com/cloud/storage/SnapshotVO.java
+++ b/core/src/com/cloud/storage/SnapshotVO.java
@@ -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;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/13a4c067/server/src/com/cloud/storage/dao/SnapshotDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/dao/SnapshotDaoImpl.java b/server/src/com/cloud/storage/dao/SnapshotDaoImpl.java
index 17bcf9b..a8a07dc 100644
--- a/server/src/com/cloud/storage/dao/SnapshotDaoImpl.java
+++ b/server/src/com/cloud/storage/dao/SnapshotDaoImpl.java
@@ -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;