Adding pretty toString() to AffinityGroup

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

Branch: refs/heads/affinity_groups
Commit: 6ec7e259936747a85b73f2b09333497c3a7d80bf
Parents: 4a1eaf4
Author: Prachi Damle <[email protected]>
Authored: Wed Apr 10 14:18:36 2013 -0700
Committer: Prachi Damle <[email protected]>
Committed: Wed Apr 10 14:18:36 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/affinity/AffinityGroupVO.java       |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ec7e259/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
----------------------------------------------------------------------
diff --git a/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java 
b/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
index fab3835..b6c4a02 100644
--- a/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
+++ b/server/src/org/apache/cloudstack/affinity/AffinityGroupVO.java
@@ -104,4 +104,11 @@ public class AffinityGroupVO implements AffinityGroup {
         return type;
     }
 
+    @Override
+    public String toString() {
+        StringBuilder buf = new StringBuilder("AffinityGroup[");
+        
buf.append(id).append("|").append(name).append("|").append(type).append("]");
+        return buf.toString();
+    }
+
 }

Reply via email to