cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [1/4] Enforce InternalIdentity interface on all VO classes that impls long getId()
Date Wed, 26 Dec 2012 23:10:10 GMT
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/network/vpc/VpcGatewayVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/VpcGatewayVO.java b/server/src/com/cloud/network/vpc/VpcGatewayVO.java
index 43a9910..ebf6e28 100644
--- a/server/src/com/cloud/network/vpc/VpcGatewayVO.java
+++ b/server/src/com/cloud/network/vpc/VpcGatewayVO.java
@@ -29,11 +29,12 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 
 import com.cloud.utils.db.GenericDao;
+import org.apache.cloudstack.api.InternalIdentity;
 
 
 @Entity
 @Table(name="vpc_gateways")
-public class VpcGatewayVO implements VpcGateway{
+public class VpcGatewayVO implements VpcGateway, InternalIdentity {
     
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/network/vpc/VpcOfferingServiceMapVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/VpcOfferingServiceMapVO.java b/server/src/com/cloud/network/vpc/VpcOfferingServiceMapVO.java
index 3615703..9dbb32f 100644
--- a/server/src/com/cloud/network/vpc/VpcOfferingServiceMapVO.java
+++ b/server/src/com/cloud/network/vpc/VpcOfferingServiceMapVO.java
@@ -28,11 +28,12 @@ import javax.persistence.Table;
 import com.cloud.network.Network.Provider;
 import com.cloud.network.Network.Service;
 import com.cloud.utils.db.GenericDao;
+import org.apache.cloudstack.api.InternalIdentity;
 
 
 @Entity
 @Table(name="vpc_offering_service_map")
-public class VpcOfferingServiceMapVO {
+public class VpcOfferingServiceMapVO implements InternalIdentity {
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     @Column(name="id")

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/network/vpc/VpcOfferingVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/VpcOfferingVO.java b/server/src/com/cloud/network/vpc/VpcOfferingVO.java
index 7458a66..6cf0cd6 100644
--- a/server/src/com/cloud/network/vpc/VpcOfferingVO.java
+++ b/server/src/com/cloud/network/vpc/VpcOfferingVO.java
@@ -29,11 +29,12 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 
 import com.cloud.utils.db.GenericDao;
+import org.apache.cloudstack.api.InternalIdentity;
 
 
 @Entity
 @Table(name="vpc_offerings")
-public class VpcOfferingVO implements VpcOffering{
+public class VpcOfferingVO implements VpcOffering, InternalIdentity {
     
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/network/vpc/VpcVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/vpc/VpcVO.java b/server/src/com/cloud/network/vpc/VpcVO.java
index c0baa95..9bf83af 100644
--- a/server/src/com/cloud/network/vpc/VpcVO.java
+++ b/server/src/com/cloud/network/vpc/VpcVO.java
@@ -28,10 +28,11 @@ import javax.persistence.Table;
 
 import org.apache.cloudstack.api.Identity;
 import com.cloud.utils.db.GenericDao;
+import org.apache.cloudstack.api.InternalIdentity;
 
 @Entity
 @Table(name="vpc")
-public class VpcVO implements Vpc, Identity {
+public class VpcVO implements Vpc, Identity, InternalIdentity {
     @Id
     @Column(name="id")
     long id;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/offerings/NetworkOfferingServiceMapVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/offerings/NetworkOfferingServiceMapVO.java b/server/src/com/cloud/offerings/NetworkOfferingServiceMapVO.java
index b215814..f249405 100644
--- a/server/src/com/cloud/offerings/NetworkOfferingServiceMapVO.java
+++ b/server/src/com/cloud/offerings/NetworkOfferingServiceMapVO.java
@@ -28,10 +28,11 @@ import javax.persistence.Table;
 import com.cloud.network.Network.Provider;
 import com.cloud.network.Network.Service;
 import com.cloud.utils.db.GenericDao;
+import org.apache.cloudstack.api.InternalIdentity;
 
 @Entity
 @Table(name="ntwk_offering_service_map")
-public class NetworkOfferingServiceMapVO {
+public class NetworkOfferingServiceMapVO implements InternalIdentity {
    
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/offerings/NetworkOfferingVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/offerings/NetworkOfferingVO.java b/server/src/com/cloud/offerings/NetworkOfferingVO.java
index ca315f9..eff0d19 100755
--- a/server/src/com/cloud/offerings/NetworkOfferingVO.java
+++ b/server/src/com/cloud/offerings/NetworkOfferingVO.java
@@ -35,6 +35,7 @@ import com.cloud.network.Network;
 import com.cloud.network.Networks.TrafficType;
 import com.cloud.offering.NetworkOffering;
 import com.cloud.utils.db.GenericDao;
+import org.apache.cloudstack.api.InternalIdentity;
 
 import javax.persistence.*;
 import java.util.Date;
@@ -42,7 +43,7 @@ import java.util.UUID;
 
 @Entity
 @Table(name = "network_offerings")
-public class NetworkOfferingVO implements NetworkOffering {
+public class NetworkOfferingVO implements NetworkOffering, InternalIdentity {
 
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/projects/ProjectAccountVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/projects/ProjectAccountVO.java b/server/src/com/cloud/projects/ProjectAccountVO.java
index c3d7d73..8c4f1ba 100644
--- a/server/src/com/cloud/projects/ProjectAccountVO.java
+++ b/server/src/com/cloud/projects/ProjectAccountVO.java
@@ -28,11 +28,12 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 
 import com.cloud.utils.db.GenericDao;
+import org.apache.cloudstack.api.InternalIdentity;
 
 @Entity
 @Table(name="project_account")
 @SuppressWarnings("unused")
-public class ProjectAccountVO implements ProjectAccount{
+public class ProjectAccountVO implements ProjectAccount, InternalIdentity {
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     @Column(name="id")

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/projects/ProjectInvitationVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/projects/ProjectInvitationVO.java b/server/src/com/cloud/projects/ProjectInvitationVO.java
index 8ce06ab..bf54f3c 100644
--- a/server/src/com/cloud/projects/ProjectInvitationVO.java
+++ b/server/src/com/cloud/projects/ProjectInvitationVO.java
@@ -30,10 +30,11 @@ import javax.persistence.Table;
 
 import org.apache.cloudstack.api.Identity;
 import com.cloud.utils.db.GenericDao;
+import org.apache.cloudstack.api.InternalIdentity;
 
 @Entity
 @Table(name = "project_invitations")
-public class ProjectInvitationVO implements ProjectInvitation, Identity {
+public class ProjectInvitationVO implements ProjectInvitation, Identity, InternalIdentity
{
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
     @Column(name = "id")

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/projects/ProjectVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/projects/ProjectVO.java b/server/src/com/cloud/projects/ProjectVO.java
index 1fcfe18..53947f1 100644
--- a/server/src/com/cloud/projects/ProjectVO.java
+++ b/server/src/com/cloud/projects/ProjectVO.java
@@ -30,10 +30,11 @@ import javax.persistence.Table;
 
 import org.apache.cloudstack.api.Identity;
 import com.cloud.utils.db.GenericDao;
+import org.apache.cloudstack.api.InternalIdentity;
 
 @Entity
 @Table(name="projects")
-public class ProjectVO implements Project, Identity {
+public class ProjectVO implements Project, Identity, InternalIdentity {
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     @Column(name="id")

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/secstorage/CommandExecLogVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/secstorage/CommandExecLogVO.java b/server/src/com/cloud/secstorage/CommandExecLogVO.java
index e9d7d9a..4ec023e 100644
--- a/server/src/com/cloud/secstorage/CommandExecLogVO.java
+++ b/server/src/com/cloud/secstorage/CommandExecLogVO.java
@@ -28,10 +28,11 @@ import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
 
 import com.cloud.utils.DateUtil;
+import org.apache.cloudstack.api.InternalIdentity;
 
 @Entity
 @Table(name="cmd_exec_log")
-public class CommandExecLogVO {
+public class CommandExecLogVO implements InternalIdentity {
 	
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/tags/ResourceTagVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/tags/ResourceTagVO.java b/server/src/com/cloud/tags/ResourceTagVO.java
index 100fe6f..ffb73af 100644
--- a/server/src/com/cloud/tags/ResourceTagVO.java
+++ b/server/src/com/cloud/tags/ResourceTagVO.java
@@ -29,11 +29,12 @@ import javax.persistence.Table;
 
 import org.apache.cloudstack.api.Identity;
 import com.cloud.server.ResourceTag;
+import org.apache.cloudstack.api.InternalIdentity;
 
 
 @Entity
 @Table(name="resource_tags")
-public class ResourceTagVO implements Identity, ResourceTag{
+public class ResourceTagVO implements Identity, InternalIdentity, ResourceTag{
     
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/upgrade/dao/VersionVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/upgrade/dao/VersionVO.java b/server/src/com/cloud/upgrade/dao/VersionVO.java
index ed707c5..b5e3f35 100644
--- a/server/src/com/cloud/upgrade/dao/VersionVO.java
+++ b/server/src/com/cloud/upgrade/dao/VersionVO.java
@@ -16,6 +16,8 @@
 // under the License.
 package com.cloud.upgrade.dao;
 
+import org.apache.cloudstack.api.InternalIdentity;
+
 import java.util.Date;
 
 import javax.persistence.Column;
@@ -31,7 +33,7 @@ import javax.persistence.TemporalType;
 
 @Entity
 @Table(name="version")
-public class VersionVO {
+public class VersionVO implements InternalIdentity {
     public enum Step {
         Upgrade,
         Complete

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/usage/ExternalPublicIpStatisticsVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/usage/ExternalPublicIpStatisticsVO.java b/server/src/com/cloud/usage/ExternalPublicIpStatisticsVO.java
index f9c034a..7ad933c 100644
--- a/server/src/com/cloud/usage/ExternalPublicIpStatisticsVO.java
+++ b/server/src/com/cloud/usage/ExternalPublicIpStatisticsVO.java
@@ -16,6 +16,8 @@
 // under the License.
 package com.cloud.usage;
 
+import org.apache.cloudstack.api.InternalIdentity;
+
 import javax.persistence.Column;
 import javax.persistence.DiscriminatorValue;
 import javax.persistence.Entity;
@@ -28,7 +30,7 @@ import javax.persistence.Table;
 @Entity
 @Table(name="external_public_ip_statistics")
 @PrimaryKeyJoinColumn(name="id")
-public class ExternalPublicIpStatisticsVO {
+public class ExternalPublicIpStatisticsVO implements InternalIdentity {
 
 	@Id
 	@GeneratedValue(strategy=GenerationType.IDENTITY)
@@ -61,7 +63,7 @@ public class ExternalPublicIpStatisticsVO {
 		this.currentBytesSent = 0;
 	}
 	
-	public Long getId() {
+	public long getId() {
         return id;
     }
 	

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/usage/UsageIPAddressVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/usage/UsageIPAddressVO.java b/server/src/com/cloud/usage/UsageIPAddressVO.java
index 8e68182..a11dfe2 100644
--- a/server/src/com/cloud/usage/UsageIPAddressVO.java
+++ b/server/src/com/cloud/usage/UsageIPAddressVO.java
@@ -16,6 +16,8 @@
 // under the License.
 package com.cloud.usage;
 
+import org.apache.cloudstack.api.InternalIdentity;
+
 import java.util.Date;
 
 import javax.persistence.Column;
@@ -26,7 +28,7 @@ import javax.persistence.TemporalType;
 
 @Entity
 @Table(name="usage_ip_address")
-public class UsageIPAddressVO {
+public class UsageIPAddressVO implements InternalIdentity {
 	@Column(name="account_id")
     private long accountId;
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/usage/UsageJobVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/usage/UsageJobVO.java b/server/src/com/cloud/usage/UsageJobVO.java
index 174b6a3..7761e87 100644
--- a/server/src/com/cloud/usage/UsageJobVO.java
+++ b/server/src/com/cloud/usage/UsageJobVO.java
@@ -16,6 +16,8 @@
 // under the License.
 package com.cloud.usage;
 
+import org.apache.cloudstack.api.InternalIdentity;
+
 import java.util.Date;
 
 import javax.persistence.Column;
@@ -29,7 +31,7 @@ import javax.persistence.TemporalType;
 
 @Entity
 @Table(name="usage_job")
-public class UsageJobVO {
+public class UsageJobVO implements InternalIdentity {
 
     public static final int JOB_TYPE_RECURRING = 0;
     public static final int JOB_TYPE_SINGLE = 1;
@@ -80,7 +82,7 @@ public class UsageJobVO {
 
     public UsageJobVO() {}
 
-    public Long getId() {
+    public long getId() {
         return id;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/usage/UsageLoadBalancerPolicyVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/usage/UsageLoadBalancerPolicyVO.java b/server/src/com/cloud/usage/UsageLoadBalancerPolicyVO.java
index 3ed9a63..e952b1a 100644
--- a/server/src/com/cloud/usage/UsageLoadBalancerPolicyVO.java
+++ b/server/src/com/cloud/usage/UsageLoadBalancerPolicyVO.java
@@ -16,6 +16,8 @@
 // under the License.
 package com.cloud.usage;
 
+import org.apache.cloudstack.api.InternalIdentity;
+
 import java.util.Date;
 
 import javax.persistence.Column;
@@ -26,7 +28,7 @@ import javax.persistence.TemporalType;
 
 @Entity
 @Table(name="usage_load_balancer_policy")
-public class UsageLoadBalancerPolicyVO {
+public class UsageLoadBalancerPolicyVO implements InternalIdentity {
 	
 	@Column(name="zone_id")
     private long zoneId;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/usage/UsagePortForwardingRuleVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/usage/UsagePortForwardingRuleVO.java b/server/src/com/cloud/usage/UsagePortForwardingRuleVO.java
index cc0cd43..641ae76 100644
--- a/server/src/com/cloud/usage/UsagePortForwardingRuleVO.java
+++ b/server/src/com/cloud/usage/UsagePortForwardingRuleVO.java
@@ -16,6 +16,8 @@
 // under the License.
 package com.cloud.usage;
 
+import org.apache.cloudstack.api.InternalIdentity;
+
 import java.util.Date;
 
 import javax.persistence.Column;
@@ -26,7 +28,7 @@ import javax.persistence.TemporalType;
 
 @Entity
 @Table(name="usage_port_forwarding")
-public class UsagePortForwardingRuleVO {
+public class UsagePortForwardingRuleVO implements InternalIdentity {
 	
 	@Column(name="zone_id")
     private long zoneId;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/usage/UsageStorageVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/usage/UsageStorageVO.java b/server/src/com/cloud/usage/UsageStorageVO.java
index bf2ee15..1337edc 100644
--- a/server/src/com/cloud/usage/UsageStorageVO.java
+++ b/server/src/com/cloud/usage/UsageStorageVO.java
@@ -16,6 +16,8 @@
 // under the License.
 package com.cloud.usage;
 
+import org.apache.cloudstack.api.InternalIdentity;
+
 import java.util.Date;
 
 import javax.persistence.Column;
@@ -26,7 +28,7 @@ import javax.persistence.TemporalType;
 
 @Entity
 @Table(name="usage_storage")
-public class UsageStorageVO {
+public class UsageStorageVO implements InternalIdentity {
 	
 	@Column(name="zone_id")
     private long zoneId;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/usage/UsageVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/usage/UsageVO.java b/server/src/com/cloud/usage/UsageVO.java
index 2e816ff..bcb9c2d 100644
--- a/server/src/com/cloud/usage/UsageVO.java
+++ b/server/src/com/cloud/usage/UsageVO.java
@@ -16,6 +16,8 @@
 // under the License.
 package com.cloud.usage;
 
+import org.apache.cloudstack.api.InternalIdentity;
+
 import java.util.Date;
 
 import javax.persistence.Column;
@@ -29,7 +31,7 @@ import javax.persistence.TemporalType;
 
 @Entity
 @Table(name="cloud_usage")
-public class UsageVO {
+public class UsageVO implements InternalIdentity {
 	@Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     @Column(name="id")
@@ -165,7 +167,7 @@ public class UsageVO {
 	    this.endDate = endDate;
 	}
 	
-	public Long getId() {
+	public long getId() {
 		return id;
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/usage/UsageVolumeVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/usage/UsageVolumeVO.java b/server/src/com/cloud/usage/UsageVolumeVO.java
index 1e00372..4ba8898 100644
--- a/server/src/com/cloud/usage/UsageVolumeVO.java
+++ b/server/src/com/cloud/usage/UsageVolumeVO.java
@@ -16,6 +16,8 @@
 // under the License.
 package com.cloud.usage;
 
+import org.apache.cloudstack.api.InternalIdentity;
+
 import java.util.Date;
 
 import javax.persistence.Column;
@@ -26,7 +28,7 @@ import javax.persistence.TemporalType;
 
 @Entity
 @Table(name="usage_volume")
-public class UsageVolumeVO {
+public class UsageVolumeVO implements InternalIdentity {
 	
 	@Column(name="zone_id")
     private long zoneId;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/user/AccountDetailVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/user/AccountDetailVO.java b/server/src/com/cloud/user/AccountDetailVO.java
index 76c87b1..a8afadb 100755
--- a/server/src/com/cloud/user/AccountDetailVO.java
+++ b/server/src/com/cloud/user/AccountDetailVO.java
@@ -24,10 +24,11 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 
 import com.cloud.utils.db.Encrypt;
+import org.apache.cloudstack.api.InternalIdentity;
 
 @Entity
 @Table(name="account_details")
-public class AccountDetailVO {
+public class AccountDetailVO implements InternalIdentity {
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     @Column(name="id")

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/057ac12d/server/src/com/cloud/vm/NicVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/NicVO.java b/server/src/com/cloud/vm/NicVO.java
index 77fe4c3..befe0a9 100644
--- a/server/src/com/cloud/vm/NicVO.java
+++ b/server/src/com/cloud/vm/NicVO.java
@@ -33,10 +33,11 @@ import org.apache.cloudstack.api.Identity;
 import com.cloud.network.Networks.AddressFormat;
 import com.cloud.network.Networks.Mode;
 import com.cloud.utils.db.GenericDao;
+import org.apache.cloudstack.api.InternalIdentity;
 
 @Entity
 @Table(name = "nics")
-public class NicVO implements Nic, Identity {
+public class NicVO implements Nic, Identity, InternalIdentity {
     protected NicVO() {
     }
 


Mime
View raw message