You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ah...@apache.org on 2012/08/08 22:03:36 UTC

[2/5] git commit: Removed all javax source code from utils package

Removed all javax source code from utils package


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

Branch: refs/heads/master
Commit: 457f3b3dc979476081a45792eecfda080dc7ee24
Parents: da26302
Author: Alex Huang <al...@citrix.com>
Authored: Wed Aug 8 12:56:26 2012 -0700
Committer: Alex Huang <al...@citrix.com>
Committed: Wed Aug 8 12:58:22 2012 -0700

----------------------------------------------------------------------
 core/src/com/cloud/network/VpnUserVO.java          |   94 ++--
 .../network/security/SecurityGroupRulesVO.java     |    7 +-
 core/src/com/cloud/user/UserAccountVO.java         |   36 +-
 core/src/com/cloud/user/UserVO.java                |   43 +-
 core/src/com/cloud/vm/VMInstanceVO.java            |  387 ++++++++-------
 .../com/cloud/network/CiscoNexusVSMDeviceVO.java   |  147 +++---
 server/src/com/cloud/user/AccountDetailVO.java     |   17 +-
 utils/.classpath                                   |   20 +-
 utils/src/com/cloud/utils/db/Attribute.java        |    7 +-
 utils/src/com/cloud/utils/db/GenericDaoBase.java   |    3 +-
 utils/src/com/cloud/utils/db/SqlGenerator.java     |   12 +-
 utils/src/javax/ejb/Local.java                     |   56 --
 .../src/javax/persistence/AssociationOverride.java |   97 ----
 .../javax/persistence/AssociationOverrides.java    |   88 ----
 utils/src/javax/persistence/AttributeOverride.java |  105 ----
 .../src/javax/persistence/AttributeOverrides.java  |   70 ---
 utils/src/javax/persistence/Basic.java             |   86 ----
 utils/src/javax/persistence/CascadeType.java       |   62 ---
 utils/src/javax/persistence/CollectionTable.java   |   22 -
 utils/src/javax/persistence/Column.java            |  144 ------
 utils/src/javax/persistence/ColumnResult.java      |   80 ---
 .../src/javax/persistence/DiscriminatorColumn.java |  101 ----
 utils/src/javax/persistence/DiscriminatorType.java |   53 --
 .../src/javax/persistence/DiscriminatorValue.java  |   95 ----
 utils/src/javax/persistence/ElementCollection.java |   16 -
 utils/src/javax/persistence/Embeddable.java        |   62 ---
 utils/src/javax/persistence/Embedded.java          |   67 ---
 utils/src/javax/persistence/EmbeddedId.java        |   62 ---
 utils/src/javax/persistence/Entity.java            |   59 ---
 .../javax/persistence/EntityExistsException.java   |   87 ----
 utils/src/javax/persistence/EntityListeners.java   |   57 ---
 .../javax/persistence/EntityNotFoundException.java |   71 ---
 utils/src/javax/persistence/EntityResult.java      |   86 ----
 utils/src/javax/persistence/EntityTransaction.java |   90 ----
 utils/src/javax/persistence/EnumType.java          |   51 --
 utils/src/javax/persistence/Enumerated.java        |   73 ---
 utils/src/javax/persistence/FetchType.java         |   65 ---
 utils/src/javax/persistence/FieldResult.java       |   81 ---
 utils/src/javax/persistence/FlushModeType.java     |   67 ---
 utils/src/javax/persistence/GeneratedValue.java    |   90 ----
 utils/src/javax/persistence/GenerationType.java    |   74 ---
 utils/src/javax/persistence/Id.java                |   59 ---
 utils/src/javax/persistence/IdClass.java           |   73 ---
 utils/src/javax/persistence/Inheritance.java       |   70 ---
 utils/src/javax/persistence/InheritanceType.java   |   58 ---
 utils/src/javax/persistence/JoinColumn.java        |  139 ------
 utils/src/javax/persistence/JoinColumns.java       |   71 ---
 utils/src/javax/persistence/JoinTable.java         |  122 -----
 utils/src/javax/persistence/Lob.java               |   68 ---
 utils/src/javax/persistence/LockModeType.java      |   86 ----
 utils/src/javax/persistence/ManyToMany.java        |  146 ------
 utils/src/javax/persistence/ManyToOne.java         |   99 ----
 utils/src/javax/persistence/MapKey.java            |  120 -----
 utils/src/javax/persistence/MappedSuperclass.java  |  152 ------
 utils/src/javax/persistence/OneToMany.java         |  123 -----
 utils/src/javax/persistence/OneToOne.java          |  134 -----
 utils/src/javax/persistence/OrderBy.java           |  110 ----
 .../javax/persistence/PersistenceException.java    |   86 ----
 utils/src/javax/persistence/PostLoad.java          |   54 --
 utils/src/javax/persistence/PostPersist.java       |   54 --
 utils/src/javax/persistence/PostRemove.java        |   54 --
 utils/src/javax/persistence/PostUpdate.java        |   54 --
 .../javax/persistence/PrimaryKeyJoinColumn.java    |  120 -----
 .../javax/persistence/PrimaryKeyJoinColumns.java   |   73 ---
 utils/src/javax/persistence/SecondaryTable.java    |  120 -----
 utils/src/javax/persistence/SecondaryTables.java   |   80 ---
 utils/src/javax/persistence/SequenceGenerator.java |   91 ----
 .../src/javax/persistence/SqlResultSetMapping.java |   87 ----
 .../javax/persistence/SqlResultSetMappings.java    |   54 --
 utils/src/javax/persistence/Table.java             |   91 ----
 utils/src/javax/persistence/TableGenerator.java    |  157 ------
 utils/src/javax/persistence/Temporal.java          |   69 ---
 utils/src/javax/persistence/TemporalType.java      |   54 --
 utils/src/javax/persistence/Transient.java         |   64 ---
 utils/src/javax/persistence/UniqueConstraint.java  |   67 ---
 utils/src/javax/persistence/Version.java           |   77 ---
 utils/src/javax/persistence/package.html           |   19 -
 77 files changed, 394 insertions(+), 5751 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/core/src/com/cloud/network/VpnUserVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/network/VpnUserVO.java b/core/src/com/cloud/network/VpnUserVO.java
index 8b2dc05..f376e70 100644
--- a/core/src/com/cloud/network/VpnUserVO.java
+++ b/core/src/com/cloud/network/VpnUserVO.java
@@ -28,6 +28,7 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 
 import com.cloud.api.Identity;
+import com.cloud.utils.db.Encrypt;
 
 @Entity
 @Table(name=("vpn_users"))
@@ -39,25 +40,26 @@ public class VpnUserVO implements VpnUser, Identity {
 
     @Column(name="owner_id")
     private long accountId;
-    
+
     @Column(name="domain_id")
     private long domainId;
 
     @Column(name="username")
     private String username;
-    
-    @Column(name="password", encryptable=true)
+
+    @Encrypt
+    @Column(name="password")
     private String password;
-    
+
     @Column(name="state")
     @Enumerated(value=EnumType.STRING)
     private State state;
 
     @Column(name="uuid")
     private String uuid;
-    
+
     public VpnUserVO() {
-    	this.uuid = UUID.randomUUID().toString();
+        this.uuid = UUID.randomUUID().toString();
     }
 
     public VpnUserVO(long accountId, long domainId, String userName, String password) {
@@ -66,7 +68,7 @@ public class VpnUserVO implements VpnUser, Identity {
         this.username = userName;
         this.password = password;
         this.state = State.Add;
-    	this.uuid = UUID.randomUUID().toString();
+        this.uuid = UUID.randomUUID().toString();
     }
 
     @Override
@@ -78,51 +80,51 @@ public class VpnUserVO implements VpnUser, Identity {
     public long getAccountId() {
         return accountId;
     }
-    
-	@Override
+
+    @Override
     public String getUsername() {
-		return username;
-	}
+        return username;
+    }
 
-	public void setUsername(String userName) {
-		this.username = userName;
-	}
+    public void setUsername(String userName) {
+        this.username = userName;
+    }
 
-	@Override
+    @Override
     public String getPassword() {
-		return password;
-	}
-	
-	@Override
+        return password;
+    }
+
+    @Override
     public State getState() {
-	    return state;
-	}
-	
-	public void setState(State state) {
-	    this.state = state;
-	}
-
-	public void setPassword(String password) {
-		this.password = password;
-	}
-
-	@Override
+        return state;
+    }
+
+    public void setState(State state) {
+        this.state = state;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    @Override
     public long getDomainId() {
-		return domainId;
-	}
-    
+        return domainId;
+    }
+
 
-	@Override
+    @Override
     public String toString() {
-	    return new StringBuilder("VpnUser[").append(id).append("-").append(username).append("-").append(accountId).append("]").toString();
-	}
-	
-	@Override
-	public String getUuid() {
-		return this.uuid;
-	}
-	
-	public void setUuid(String uuid) {
-		this.uuid = uuid;
-	}
+        return new StringBuilder("VpnUser[").append(id).append("-").append(username).append("-").append(accountId).append("]").toString();
+    }
+
+    @Override
+    public String getUuid() {
+        return this.uuid;
+    }
+
+    public void setUuid(String uuid) {
+        this.uuid = uuid;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/core/src/com/cloud/network/security/SecurityGroupRulesVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/network/security/SecurityGroupRulesVO.java b/core/src/com/cloud/network/security/SecurityGroupRulesVO.java
index 56353da..a671e30 100644
--- a/core/src/com/cloud/network/security/SecurityGroupRulesVO.java
+++ b/core/src/com/cloud/network/security/SecurityGroupRulesVO.java
@@ -24,11 +24,12 @@ import javax.persistence.Id;
 import javax.persistence.PrimaryKeyJoinColumn;
 import javax.persistence.SecondaryTable;
 import javax.persistence.Table;
+
 import com.cloud.network.security.SecurityRule.SecurityRuleType;
 
 @Entity
 @Table(name = ("security_group"))
-@SecondaryTable(name = "security_group_rule", join = "left", pkJoinColumns = { @PrimaryKeyJoinColumn(name = "id", referencedColumnName = "security_group_id") })
+@SecondaryTable(name = "security_group_rule", pkJoinColumns = { @PrimaryKeyJoinColumn(name = "id", referencedColumnName = "security_group_id") })
 public class SecurityGroupRulesVO implements SecurityGroupRules {
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
@@ -58,7 +59,7 @@ public class SecurityGroupRulesVO implements SecurityGroupRules {
 
     @Column(name = "protocol", table = "security_group_rule", insertable = false, updatable = false)
     private String protocol;
-    
+
     @Column(name = "type", table = "security_group_rule", insertable = false, updatable = false)
     private String type;
 
@@ -130,7 +131,7 @@ public class SecurityGroupRulesVO implements SecurityGroupRules {
     public String getProtocol() {
         return protocol;
     }
-    
+
     @Override
     public SecurityRuleType getRuleType() {
         if ("ingress".equalsIgnoreCase(this.type)) {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/core/src/com/cloud/user/UserAccountVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/user/UserAccountVO.java b/core/src/com/cloud/user/UserAccountVO.java
index f58e788..5e7c018 100644
--- a/core/src/com/cloud/user/UserAccountVO.java
+++ b/core/src/com/cloud/user/UserAccountVO.java
@@ -27,12 +27,13 @@ import javax.persistence.PrimaryKeyJoinColumn;
 import javax.persistence.SecondaryTable;
 import javax.persistence.Table;
 
+import com.cloud.utils.db.Encrypt;
 import com.cloud.utils.db.GenericDao;
 
 @Entity
 @Table(name="user")
 @SecondaryTable(name="account",
-        pkJoinColumns={@PrimaryKeyJoinColumn(name="account_id", referencedColumnName="id")})
+pkJoinColumns={@PrimaryKeyJoinColumn(name="account_id", referencedColumnName="id")})
 public class UserAccountVO implements UserAccount {
     @Id
     @GeneratedValue(strategy=GenerationType.IDENTITY)
@@ -63,7 +64,8 @@ public class UserAccountVO implements UserAccount {
     @Column(name="api_key")
     private String apiKey = null;
 
-    @Column(name="secret_key", encryptable=true)
+    @Encrypt
+    @Column(name="secret_key")
     private String secretKey = null;
 
     @Column(name=GenericDao.CREATED_COLUMN)
@@ -71,13 +73,13 @@ public class UserAccountVO implements UserAccount {
 
     @Column(name=GenericDao.REMOVED_COLUMN)
     private Date removed;
-    
+
     @Column(name="timezone")
     private String timezone;
-    
+
     @Column(name="registration_token")
     private String registrationToken = null;
-    
+
     @Column(name="is_registered")
     boolean registered;
 
@@ -238,32 +240,32 @@ public class UserAccountVO implements UserAccount {
     public void setAccountDisabled(String accountState) {
         this.accountState = accountState;
     }
-    
+
     @Override
-	public String getTimezone(){
-    	return timezone;
+    public String getTimezone(){
+        return timezone;
     }
-    
+
     public void setTimezone(String timezone)
     {
-    	this.timezone = timezone; 
+        this.timezone = timezone; 
     }
-    
+
     @Override
-	public String getRegistrationToken(){
-    	return registrationToken;
+    public String getRegistrationToken(){
+        return registrationToken;
     }
-    
+
     public void setRegistrationToken(String registrationToken)
     {
-    	this.registrationToken = registrationToken; 
+        this.registrationToken = registrationToken; 
     }
-    
+
     @Override 
     public boolean isRegistered() {
         return registered;
     }
-    
+
     public void setRegistered(boolean registered) {
         this.registered = registered;
     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/core/src/com/cloud/user/UserVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/user/UserVO.java b/core/src/com/cloud/user/UserVO.java
index 383dd99..7e3a7fc 100644
--- a/core/src/com/cloud/user/UserVO.java
+++ b/core/src/com/cloud/user/UserVO.java
@@ -17,7 +17,6 @@
 package com.cloud.user;
 
 import java.util.Date;
-import java.util.TimeZone;
 import java.util.UUID;
 
 import javax.persistence.Column;
@@ -31,6 +30,7 @@ import javax.persistence.Table;
 
 import com.cloud.api.Identity;
 import com.cloud.user.Account.State;
+import com.cloud.utils.db.Encrypt;
 import com.cloud.utils.db.GenericDao;
 
 /**
@@ -72,7 +72,8 @@ public class UserVO implements User, Identity {
     @Column(name = "api_key")
     private String apiKey = null;
 
-    @Column(name = "secret_key", encryptable=true)
+    @Encrypt
+    @Column(name = "secret_key")
     private String secretKey = null;
 
     @Column(name = GenericDao.CREATED_COLUMN)
@@ -83,25 +84,25 @@ public class UserVO implements User, Identity {
 
     @Column(name = "timezone")
     private String timezone;
-    
+
     @Column(name="registration_token")
     private String registrationToken = null;
-    
+
     @Column(name="is_registered")
     boolean registered;
-    
+
     @Column(name="uuid")
     private String uuid;
 
     public UserVO() {
-    	this.uuid = UUID.randomUUID().toString();
+        this.uuid = UUID.randomUUID().toString();
     }
-    
+
     public UserVO(long id) {
         this.id = id;
-    	this.uuid = UUID.randomUUID().toString();
+        this.uuid = UUID.randomUUID().toString();
     }
-    
+
     public UserVO(long accountId, String username, String password, String firstName, String lastName, String email, String timezone) {
         this.accountId = accountId;
         this.username = username;
@@ -111,7 +112,7 @@ public class UserVO implements User, Identity {
         this.email = email;
         this.timezone = timezone;
         this.state = State.enabled;
-    	this.uuid = UUID.randomUUID().toString();
+        this.uuid = UUID.randomUUID().toString();
     }
 
     @Override
@@ -228,22 +229,22 @@ public class UserVO implements User, Identity {
     public void setTimezone(String timezone) {
         this.timezone = timezone;
     }
-    
+
     @Override
-	public String getRegistrationToken(){
-    	return registrationToken;
+    public String getRegistrationToken(){
+        return registrationToken;
     }
-    
+
     public void setRegistrationToken(String registrationToken)
     {
-    	this.registrationToken = registrationToken; 
+        this.registrationToken = registrationToken; 
     }
-    
+
     @Override 
     public boolean isRegistered() {
         return registered;
     }
-    
+
     public void setRegistered(boolean registered) {
         this.registered = registered;
     }
@@ -252,13 +253,13 @@ public class UserVO implements User, Identity {
     public String toString() {
         return new StringBuilder("User[").append(id).append("-").append(username).append("]").toString();
     }
-    
+
     @Override
     public String getUuid() {
-    	return this.uuid;
+        return this.uuid;
     }
-    
+
     public void setUuid(String uuid) {
-    	this.uuid = uuid;
+        this.uuid = uuid;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/core/src/com/cloud/vm/VMInstanceVO.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/vm/VMInstanceVO.java b/core/src/com/cloud/vm/VMInstanceVO.java
index 07acae1..4972909 100644
--- a/core/src/com/cloud/vm/VMInstanceVO.java
+++ b/core/src/com/cloud/vm/VMInstanceVO.java
@@ -37,6 +37,7 @@ import javax.persistence.TemporalType;
 import javax.persistence.Transient;
 
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
+import com.cloud.utils.db.Encrypt;
 import com.cloud.utils.db.GenericDao;
 import com.cloud.utils.db.StateMachine;
 import com.cloud.utils.fsm.FiniteStateObject;
@@ -47,20 +48,21 @@ import com.cloud.vm.VirtualMachine.State;
 @Inheritance(strategy=InheritanceType.JOINED)
 @DiscriminatorColumn(name="type", discriminatorType=DiscriminatorType.STRING, length=32)
 public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, VirtualMachine.Event> {
-	@Id
+    @Id
     @TableGenerator(name="vm_instance_sq", table="sequence", pkColumnName="name", valueColumnName="value", pkColumnValue="vm_instance_seq", allocationSize=1)
     @Column(name="id", updatable=false, nullable = false)
-	protected long id;
+    protected long id;
 
     @Column(name="name", updatable=false, nullable=false, length=255)
-	protected String hostName = null;
+    protected String hostName = null;
 
-    @Column(name="vnc_password", updatable=true, nullable=false, length=255, encryptable=true)
+    @Encrypt
+    @Column(name="vnc_password", updatable=true, nullable=false, length=255)
     protected String vncPassword;
-    
+
     @Column(name="proxy_id", updatable=true, nullable=true)
     protected Long proxyId;
-    
+
     @Temporal(TemporalType.TIMESTAMP)
     @Column(name="proxy_assign_time", updatable=true, nullable=true)
     protected Date proxyAssignTime;
@@ -76,20 +78,20 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
     protected State state = null;
 
     @Column(name="private_ip_address", updatable=true)
-	protected String privateIpAddress;
+    protected String privateIpAddress;
 
     @Column(name="instance_name", updatable=true, nullable=false)
     protected String instanceName;
 
     @Column(name="vm_template_id", updatable=true, nullable=true, length=17)
-	protected Long templateId = new Long(-1);
+    protected Long templateId = new Long(-1);
 
     @Column(name="guest_os_id", nullable=false, length=17)
     protected long guestOSId;
-    
+
     @Column(name="host_id", updatable=true, nullable=true)
-	protected Long hostId;
-    
+    protected Long hostId;
+
     @Column(name="last_host_id", updatable=true, nullable=true)
     protected Long lastHostId;
 
@@ -114,29 +116,29 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
 
     @Column(name="update_count", updatable = true, nullable=false)
     protected long updated;	// This field should be updated everytime the state is updated.  There's no set method in the vo object because it is done with in the dao code.
-    
+
     @Column(name=GenericDao.CREATED_COLUMN)
     protected Date created;
-    
+
     @Column(name=GenericDao.REMOVED_COLUMN)
     protected Date removed;
-    
+
     @Column(name="update_time", updatable=true)
     @Temporal(value=TemporalType.TIMESTAMP)
     protected Date updateTime;
-    
+
     @Column(name="domain_id")
     protected long domainId;
-    
+
     @Column(name="account_id")
     protected long accountId;
-    
+
     @Column(name="service_offering_id")
     protected long serviceOfferingId;
-    
+
     @Column(name="reservation_id")
     protected String reservationId;
-    
+
     @Column(name="hypervisor_type")
     @Enumerated(value=EnumType.STRING)
     protected HypervisorType hypervisorType;
@@ -146,19 +148,19 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
 
     @Column(name="uuid")
     protected String uuid = UUID.randomUUID().toString();
-;
-    
+    ;
+
     public VMInstanceVO(long id,
-                        long serviceOfferingId,
-                        String name,
-                        String instanceName,
-                        Type type,
-                        Long vmTemplateId,
-                        HypervisorType hypervisorType,
-                        long guestOSId,
-                        long domainId,
-                        long accountId,
-                        boolean haEnabled) {
+            long serviceOfferingId,
+            String name,
+            String instanceName,
+            Type type,
+            Long vmTemplateId,
+            HypervisorType hypervisorType,
+            long guestOSId,
+            long domainId,
+            long accountId,
+            boolean haEnabled) {
         this.id = id;
         this.hostName = name != null ? name : this.uuid;
         if (vmTemplateId != null) {
@@ -189,177 +191,177 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
             long accountId,
             boolean haEnabled,
             boolean limitResourceUse) {
-    	this(id, serviceOfferingId, name, instanceName, type, vmTemplateId, hypervisorType, guestOSId, domainId, accountId, haEnabled);
+        this(id, serviceOfferingId, name, instanceName, type, vmTemplateId, hypervisorType, guestOSId, domainId, accountId, haEnabled);
         this.limitCpuUse = limitResourceUse;
     }
-    
+
     protected VMInstanceVO() {
     }
-    
+
     public Date getRemoved() {
-    	return removed;
+        return removed;
     }
-    
+
     @Override
     public long getDomainId() {
         return domainId;
     }
-    
+
     @Override
     public long getAccountId() {
         return accountId;
     }
-    
+
     @Override
     public Type getType() {
         return type;
     }
-    
+
     public long getUpdated() {
-    	return updated;
+        return updated;
     }
-    
-	@Override
+
+    @Override
     public long getId() {
-		return id;
-	}
-	
-	@Override
-	public String getUuid() {
-		return uuid;
-	}
-
-	public void setUuid(String uuid) {
-		this.uuid = uuid;
-	}
-	
-	@Override
+        return id;
+    }
+
+    @Override
+    public String getUuid() {
+        return uuid;
+    }
+
+    public void setUuid(String uuid) {
+        this.uuid = uuid;
+    }
+
+    @Override
     public HypervisorType getHypervisorType() {
-	    return hypervisorType;
-	}
-	
-	@Override
+        return hypervisorType;
+    }
+
+    @Override
     public Date getCreated() {
-		return created;
-	}
-	
-	public Date getUpdateTime() {
-		return updateTime;
-	}
-	
-	@Override
+        return created;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    @Override
     public long getDataCenterIdToDeployIn() {
-	    return dataCenterIdToDeployIn;
-	}
-	
-	@Override
-	public String getHostName() {
-		return hostName;
-	}
-	
-	@Override
-	public String getInstanceName() {
-	    return instanceName;
-	}
-	
-	@Override
-	public State getState() {
-		return state;
-	}
-	
-	// don't use this directly, use VM state machine instead, this method is added for migration tool only
-	@Override
+        return dataCenterIdToDeployIn;
+    }
+
+    @Override
+    public String getHostName() {
+        return hostName;
+    }
+
+    @Override
+    public String getInstanceName() {
+        return instanceName;
+    }
+
+    @Override
+    public State getState() {
+        return state;
+    }
+
+    // don't use this directly, use VM state machine instead, this method is added for migration tool only
+    @Override
     public void setState(State state) {
-		this.state = state;
-	}
-	
-	@Override
-	public String getPrivateIpAddress() {
-		return privateIpAddress;
-	}
-	
-	public void setPrivateIpAddress(String address) {
-		privateIpAddress = address;
-	}
-    
+        this.state = state;
+    }
+
+    @Override
+    public String getPrivateIpAddress() {
+        return privateIpAddress;
+    }
+
+    public void setPrivateIpAddress(String address) {
+        privateIpAddress = address;
+    }
+
     public void setVncPassword(String vncPassword) {
         this.vncPassword = vncPassword;
     }
-    
+
     @Override
     public String getVncPassword() {
         return vncPassword;
     }
-    
+
     @Override
     public long getServiceOfferingId() {
         return serviceOfferingId;
     }
-    
-	public Long getProxyId() {
-    	return proxyId;
+
+    public Long getProxyId() {
+        return proxyId;
     }
-    
+
     public void setProxyId(Long proxyId) {
-    	this.proxyId = proxyId;
+        this.proxyId = proxyId;
     }
-    
+
     public Date getProxyAssignTime() {
-    	return this.proxyAssignTime;
+        return this.proxyAssignTime;
     }
-    
+
     public void setProxyAssignTime(Date time) {
-    	this.proxyAssignTime = time;
+        this.proxyAssignTime = time;
     }
-	
-	@Override
-	public long getTemplateId() {
-		if (templateId == null) {
+
+    @Override
+    public long getTemplateId() {
+        if (templateId == null) {
             return -1;
         } else {
             return templateId;
         }
-	}
-	
-	public void setTemplateId(Long templateId) {
-		this.templateId = templateId;
-	}
+    }
+
+    public void setTemplateId(Long templateId) {
+        this.templateId = templateId;
+    }
 
-	@Override
+    @Override
     public long getGuestOSId() {
-		return guestOSId;
-	}
-	
-	public void setGuestOSId(long guestOSId) {
-		this.guestOSId = guestOSId;
-	}
-
-	public void incrUpdated() {
-		updated++;
-	}
-	
-	public void decrUpdated() {
-	    updated--;
-	}
-
-	@Override
-	public Long getHostId() {
-		return hostId;
-	}
-	
-	@Override
-	public Long getLastHostId() {
-		return lastHostId;
-	}
-	
+        return guestOSId;
+    }
+
+    public void setGuestOSId(long guestOSId) {
+        this.guestOSId = guestOSId;
+    }
+
+    public void incrUpdated() {
+        updated++;
+    }
+
+    public void decrUpdated() {
+        updated--;
+    }
+
+    @Override
+    public Long getHostId() {
+        return hostId;
+    }
+
+    @Override
+    public Long getLastHostId() {
+        return lastHostId;
+    }
+
     public void setLastHostId(Long lastHostId) {
-		this.lastHostId = lastHostId;
-	}
-	
-	public void setHostId(Long hostId) {
-		this.hostId = hostId;
-	}
-	
+        this.lastHostId = lastHostId;
+    }
+
+    public void setHostId(Long hostId) {
+        this.hostId = hostId;
+    }
+
     @Override
     public boolean isHaEnabled() {
         return haEnabled;
@@ -371,7 +373,7 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
     }
 
     public void setLimitCpuUse(boolean value) {
-    	limitCpuUse = value;
+        limitCpuUse = value;
     }
 
     @Override
@@ -383,7 +385,7 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
     public Long getPodIdToDeployIn() {
         return podIdToDeployIn;
     }
-    
+
     public void setPodId(long podId) {
         this.podIdToDeployIn = podId;
     }
@@ -395,70 +397,71 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject<State, Vi
     public void setDataCenterId(long dataCenterId) {
         this.dataCenterIdToDeployIn = dataCenterId;
     }
-    
+
     public boolean isRemoved() {
         return removed != null;
     }
-    
+
     public void setHaEnabled(boolean value) {
         haEnabled = value;
     }
 
-	public void setReservationId(String reservationId) {
-	    this.reservationId = reservationId;
-	}
-	
-	public String getReservationId() {
-	    return this.reservationId;
-	}
-	
+    public void setReservationId(String reservationId) {
+        this.reservationId = reservationId;
+    }
+
+    public String getReservationId() {
+        return this.reservationId;
+    }
+
+    @Override
     public Map<String, String> getDetails() {
         return details;
     }
-    
+
     public void setDetail(String name, String value) {
         assert (details != null) : "Did you forget to load the details?";
-        
+
         details.put(name, value);
     }
-    
+
     public void setDetails(Map<String, String> details) {
         this.details = details;
     }
 
-	transient String toString;
+    transient String toString;
     @Override
-	public String toString() {
+    public String toString() {
         if (toString == null) {
             toString = new StringBuilder("VM[").append(type.toString()).append("|").append(hostName).append("]").toString();
         }
         return toString;
     }
-    
+
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + (int) (id ^ (id >>> 32));
+        return result;
+    }
 
     @Override
-	public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + (int) (id ^ (id >>> 32));
-		return result;
-	}
-
-	@Override
-	public boolean equals(Object obj) {
-		if (this == obj)
-			return true;
-		if (obj == null)
-			return false;
-		if (getClass() != obj.getClass())
-			return false;
-		VMInstanceVO other = (VMInstanceVO) obj;
-		if (id != other.id)
-			return false;
-		return true;
-	}
-	
-	
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        VMInstanceVO other = (VMInstanceVO) obj;
+        if (id != other.id)
+            return false;
+        return true;
+    }
+
+
     public void setServiceOfferingId(long serviceOfferingId) {
         this.serviceOfferingId = serviceOfferingId;
     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/plugins/hypervisors/vmware/src/com/cloud/network/CiscoNexusVSMDeviceVO.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/network/CiscoNexusVSMDeviceVO.java b/plugins/hypervisors/vmware/src/com/cloud/network/CiscoNexusVSMDeviceVO.java
index 0732871..af9ff0e 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/network/CiscoNexusVSMDeviceVO.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/network/CiscoNexusVSMDeviceVO.java
@@ -27,6 +27,7 @@ import javax.persistence.Id;
 import javax.persistence.Table;
 
 import com.cloud.api.Identity;
+import com.cloud.utils.db.Encrypt;
 
 /**
  * CiscoNexusVSMDeviceVO contains information on external Cisco Nexus 1000v VSM devices added into a deployment.
@@ -37,176 +38,192 @@ import com.cloud.api.Identity;
 @Entity
 @Table(name="virtual_supervisor_module")
 public class CiscoNexusVSMDeviceVO implements CiscoNexusVSMDevice, Identity{
-	
-	// We need to know what properties a VSM has. Put them here.
-	
+
+    // We need to know what properties a VSM has. Put them here.
+
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
     @Column(name = "id")
     private long id;
 
     @Column(name="uuid")
-    private String uuid;
+    private final String uuid;
 
     @Column(name = "host_id")
     private long hostId;
 
     @Column(name = "vsm_name")
     private String vsmName;
-    
+
     @Column(name = "username")
     private String vsmUserName;
-    
-    @Column(name = "password", encryptable=true)
+
+    @Encrypt
+    @Column(name = "password")
     private String vsmPassword;
 
     @Column(name = "ipaddr")
     private String ipaddr;
-    
+
     @Column(name = "management_vlan")
     private int managementVlan;
 
     @Column(name = "control_vlan")
     private int controlVlan;
-    
+
     @Column(name = "packet_vlan")
     private int packetVlan;
-    
+
     @Column(name = "storage_vlan")
     private int storageVlan;
-    
+
     @Column(name = "vsm_domain_id")
     private long vsmDomainId;
-    
+
     @Column(name = "config_mode")
     private VSMConfigMode vsmConfigMode;
-    
+
     @Column(name = "config_state")
     private VSMConfigState vsmConfigState;
-    
+
     @Column(name = "vsm_device_state")
     private VSMDeviceState vsmDeviceState;
 
     // Accessor methods
+    @Override
     public long getId() {
         return id;
     }
 
+    @Override
     public String getvsmName() {
-    	return vsmName;
+        return vsmName;
     }
-    
+
+    @Override
     public long getHostId() {
         return hostId;
     }
-    
+
+    @Override
     public String getUserName() {
-    	return vsmUserName;
+        return vsmUserName;
     }
-    
+
+    @Override
     public String getPassword() {
-    	return vsmPassword;
+        return vsmPassword;
     }
 
+    @Override
     public String getipaddr() {
-    	return ipaddr;
+        return ipaddr;
     }
-    
+
+    @Override
     public int getManagementVlan() {
-    	return managementVlan;
+        return managementVlan;
     }
-    
+
+    @Override
     public int getControlVlan() {
-    	return controlVlan;
+        return controlVlan;
     }
-    
+
+    @Override
     public int getPacketVlan() {
-    	return packetVlan;
+        return packetVlan;
     }  
 
+    @Override
     public int getStorageVlan() {
-    	return storageVlan;
+        return storageVlan;
     }
-    
+
+    @Override
     public long getvsmDomainId() {
-    	return vsmDomainId;
+        return vsmDomainId;
     }
-    
+
+    @Override
     public VSMConfigMode getvsmConfigMode() {
-    	return vsmConfigMode;
+        return vsmConfigMode;
     }
-    
+
+    @Override
     public VSMConfigState getvsmConfigState() {
-    	return vsmConfigState;
+        return vsmConfigState;
     }
-    
+
+    @Override
     public VSMDeviceState getvsmDeviceState() {
-    	return vsmDeviceState;
+        return vsmDeviceState;
     }
-    
+
+    @Override
     public String getUuid() {
         return uuid;
     }
-    
+
     // Setter methods
 
     public void setHostId(long hostid) {
         this.hostId = hostid;
     }
-    
+
     public void setVsmUserName(String username) {
-    	this.vsmUserName = username;
+        this.vsmUserName = username;
     }
-    
+
     public void setVsmName(String vsmName) {
-    	this.vsmName = vsmName;
+        this.vsmName = vsmName;
     }
-    
+
     public void setVsmPassword(String password) {
-    	this.vsmPassword = password;
+        this.vsmPassword = password;
     }
 
     public void setMgmtIpAddr(String ipaddr) {
-    	this.ipaddr = ipaddr;
+        this.ipaddr = ipaddr;
     }
-    
+
     public void setManagementVlan(int vlan) {
-    	this.managementVlan = vlan;
+        this.managementVlan = vlan;
     }
-    
+
     public void setControlVlan(int vlan) {
-    	this.controlVlan = vlan;
+        this.controlVlan = vlan;
     }
-    
+
     public void setPacketVlan(int vlan) {
-    	this.packetVlan = vlan;
+        this.packetVlan = vlan;
     }  
 
     public void setStorageVlan(int vlan) {
-    	this.storageVlan = vlan;
+        this.storageVlan = vlan;
     }
-    
+
     public void setVsmDomainId(long id) {
-    	this.vsmDomainId = id;
+        this.vsmDomainId = id;
     }
-    
+
     public void setVsmConfigMode(VSMConfigMode mode) {
-    	this.vsmConfigMode = mode;
+        this.vsmConfigMode = mode;
     }
-    
+
     public void setVsmConfigState(VSMConfigState state) {
-    	this.vsmConfigState = state;
+        this.vsmConfigState = state;
     }
-    
+
     public void setVsmDeviceState(VSMDeviceState devState) {
-    	this.vsmDeviceState = devState;
+        this.vsmDeviceState = devState;
     }
- 
-        
+
+
     // Constructors.
-    
+
     public CiscoNexusVSMDeviceVO(String vsmIpAddr, String username, String password) {    	
-    	// Set all the VSM's properties here.
+        // Set all the VSM's properties here.
         this.uuid = UUID.randomUUID().toString();
         this.setMgmtIpAddr(vsmIpAddr);
         this.setVsmUserName(username);
@@ -214,7 +231,7 @@ public class CiscoNexusVSMDeviceVO implements CiscoNexusVSMDevice, Identity{
         this.setVsmName(vsmName);
         this.setVsmDeviceState(VSMDeviceState.Enabled);
     }
-    
+
     public CiscoNexusVSMDeviceVO() {
         this.uuid = UUID.randomUUID().toString();
     }    

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/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 7860b97..76c87b1 100755
--- a/server/src/com/cloud/user/AccountDetailVO.java
+++ b/server/src/com/cloud/user/AccountDetailVO.java
@@ -23,6 +23,8 @@ import javax.persistence.GenerationType;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
+import com.cloud.utils.db.Encrypt;
+
 @Entity
 @Table(name="account_details")
 public class AccountDetailVO {
@@ -30,25 +32,26 @@ public class AccountDetailVO {
     @GeneratedValue(strategy=GenerationType.IDENTITY)
     @Column(name="id")
     private long id;
-    
+
     @Column(name="account_id")
     private long accountId;
-    
+
     @Column(name="name")
     private String name;
-    
-    @Column(name="value", encryptable=true)
+
+    @Encrypt
+    @Column(name="value")
     private String value;
-    
+
     protected AccountDetailVO() {
     }
-    
+
     public AccountDetailVO(long accountId, String name, String value) {
         this.accountId = accountId;
         this.name = name;
         this.value = value;
     }
- 
+
     public long getAccountId() {
         return accountId;
     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/.classpath
----------------------------------------------------------------------
diff --git a/utils/.classpath b/utils/.classpath
index 0d8ee3d..5f65a82 100644
--- a/utils/.classpath
+++ b/utils/.classpath
@@ -1,22 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
 <classpath>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="test"/>
@@ -24,5 +6,7 @@ under the License.
 	<classpathentry combineaccessrules="false" kind="src" path="/deps"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/tools"/>
 	<classpathentry exported="true" kind="lib" path="/deps/cloud-log4j.jar"/>
+	<classpathentry exported="true" kind="lib" path="/deps/cloud-ejb-api-3.0.jar"/>
+	<classpathentry exported="true" kind="lib" path="/deps/cloud-javax.persistence-2.0.0.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/src/com/cloud/utils/db/Attribute.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/db/Attribute.java b/utils/src/com/cloud/utils/db/Attribute.java
index c5f1750..22fd969 100755
--- a/utils/src/com/cloud/utils/db/Attribute.java
+++ b/utils/src/com/cloud/utils/db/Attribute.java
@@ -120,7 +120,7 @@ public class Attribute {
                 flags = Flag.AutoGV.setTrue(flags);
             }
         }
-        
+
         if (isEmbedded) {
             flags = Flag.Embedded.setTrue(flags);
         }
@@ -144,7 +144,8 @@ public class Attribute {
             if (column == null || column.nullable()) {
                 flags = Flag.Nullable.setTrue(flags);
             }
-            if (column != null && column.encryptable()) {
+            Encrypt encrypt = field.getAnnotation(Encrypt.class);
+            if (encrypt != null && encrypt.encrypt()) {
                 flags = Flag.Encrypted.setTrue(flags);
             }
         }
@@ -207,7 +208,7 @@ public class Attribute {
     public final boolean isEncrypted() {
         return Flag.Encrypted.check(flags);
     }
-    
+
     public Field getField() {
         return field;
     }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/src/com/cloud/utils/db/GenericDaoBase.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/db/GenericDaoBase.java b/utils/src/com/cloud/utils/db/GenericDaoBase.java
index 938ae15..3df8374 100755
--- a/utils/src/com/cloud/utils/db/GenericDaoBase.java
+++ b/utils/src/com/cloud/utils/db/GenericDaoBase.java
@@ -499,7 +499,8 @@ public abstract class GenericDaoBase<T, ID extends Serializable> implements Gene
                 byte[] bytes = rs.getBytes(index);
                 if(bytes != null) {
                     try {
-                        if(field.getAnnotation(Column.class).encryptable()){
+                        Encrypt encrypt = field.getAnnotation(Encrypt.class);
+                        if (encrypt != null && encrypt.encrypt()){
                             field.set(entity, DBEncryptionUtil.decrypt(new String(bytes, "UTF-8")));
                         } else {
                             field.set(entity, new String(bytes, "UTF-8"));

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/src/com/cloud/utils/db/SqlGenerator.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/db/SqlGenerator.java b/utils/src/com/cloud/utils/db/SqlGenerator.java
index 6af1a80..437cad1 100755
--- a/utils/src/com/cloud/utils/db/SqlGenerator.java
+++ b/utils/src/com/cloud/utils/db/SqlGenerator.java
@@ -134,7 +134,7 @@ public class SqlGenerator {
             }
 
             Attribute attr = new Attribute(clazz, overrides, field, tableName, embedded, isId);
-            
+
             if (attr.getColumnName().equals(GenericDao.REMOVED_COLUMN)) {
                 attr.setColumnName(GenericDao.REMOVED);
                 attr.setTrue(Attribute.Flag.DaoGenerated);
@@ -279,7 +279,7 @@ public class SqlGenerator {
 
     public Attribute findAttribute(String name) {
         for (Attribute attr : _attributes) {
-           
+
             if (attr.columnName.equalsIgnoreCase(name)) {
                 if (attr.columnName.equalsIgnoreCase(GenericDao.REMOVED) && attr.isUpdatable()) {
                     return null;
@@ -315,8 +315,8 @@ public class SqlGenerator {
             }
             if (attrs.size() != 0) {
                 Pair<StringBuilder, Attribute[]> pair =
-                    new Pair<StringBuilder, Attribute[]>(buildUpdateSql(tableName, attrs), attrs.toArray(new Attribute[attrs.size()]));
-                    sqls.add(pair);
+                        new Pair<StringBuilder, Attribute[]>(buildUpdateSql(tableName, attrs), attrs.toArray(new Attribute[attrs.size()]));
+                        sqls.add(pair);
             }
         }
         return sqls;
@@ -539,7 +539,7 @@ public class SqlGenerator {
         SecondaryTable[] sts = DbUtil.getSecondaryTables(clazz);
         ArrayList<String> secondaryTables = new ArrayList<String>();
         for (SecondaryTable st : sts) {
-            addPrimaryKeyJoinColumns(innerJoin, tableName, st.name(), st.join(), st.pkJoinColumns());
+            addPrimaryKeyJoinColumns(innerJoin, tableName, st.name(), "", st.pkJoinColumns());
             secondaryTables.add(st.name());
         }
 
@@ -566,7 +566,7 @@ public class SqlGenerator {
 
     public Pair<StringBuilder, Attribute[]> buildSelectSql(boolean enable_query_cache) {
         StringBuilder sql = new StringBuilder("SELECT ");
-        
+
         sql.append(enable_query_cache ? "SQL_CACHE ": "");
 
         ArrayList<Attribute> attrs = new ArrayList<Attribute>();

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/src/javax/ejb/Local.java
----------------------------------------------------------------------
diff --git a/utils/src/javax/ejb/Local.java b/utils/src/javax/ejb/Local.java
deleted file mode 100644
index d18fd6c..0000000
--- a/utils/src/javax/ejb/Local.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- * 
- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- * 
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License. You can obtain
- * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- * 
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- * Sun designates this particular file as subject to the "Classpath" exception
- * as provided by Sun in the GPL Version 2 section of the License file that
- * accompanied this code.  If applicable, add the following below the License
- * Header, with the fields enclosed by brackets [] replaced by your own
- * identifying information: "Portions Copyrighted [year]
- * [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-
-package javax.ejb;
-
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.ElementType;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-
-/**
- * When used on the bean class, declares the local business interface(s) 
- * for a session bean.  When used on an interface, designates that interface
- * as a local business interface.  In this case, no value() is provided.
- * 
- */
-
-@Target({ElementType.TYPE})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Local {
-    Class[] value() default {};
-} 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/src/javax/persistence/AssociationOverride.java
----------------------------------------------------------------------
diff --git a/utils/src/javax/persistence/AssociationOverride.java b/utils/src/javax/persistence/AssociationOverride.java
deleted file mode 100644
index 736297b..0000000
--- a/utils/src/javax/persistence/AssociationOverride.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- * 
- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- * 
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License. You can obtain
- * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- * 
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- * Sun designates this particular file as subject to the "Classpath" exception
- * as provided by Sun in the GPL Version 2 section of the License file that
- * accompanied this code.  If applicable, add the following below the License
- * Header, with the fields enclosed by brackets [] replaced by your own
- * identifying information: "Portions Copyrighted [year]
- * [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-package javax.persistence;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * This annotation is used to override a many-to-one or
- * one-to-one mapping of property or field for an entity relationship.
- *
- * <p> The <code>AssociationOverride</code> annotation may be applied
- * to an entity that extends a mapped superclass to override a many-to-one
- * or one-to-one mapping defined by the mapped superclass. If the
- * <code>AssociationOverride</code> annotation is not specified, the join
- * column is mapped the same as in the original mapping.
- * <pre>
- *    Example:
- *    &#064;MappedSuperclass
- *    public class Employee {
- *        ...
- *        &#064;ManyToOne
- *        protected Address address;
- *        ...
- *    }
- *    
- *    &#064;Entity 
- *    &#064;AssociationOverride(name="address", 
- *        joinColumns=&#064;JoinColumn(name="ADDR_ID"))
- *    // address field mapping overridden to ADDR_ID fk
- *    public class PartTimeEmployee extends Employee {
- *        ...
- *    }
- * </pre>
- *
- * @see OneToOne
- * @see ManyToOne
- * @see MappedSuperclass
- *
- * @since Java Persistence 1.0
- */
-@Target({TYPE, METHOD, FIELD}) 
-@Retention(RUNTIME)
-
-public @interface AssociationOverride {
-
-    /**
-     * The name of the relationship property whose mapping is
-     * being overridden if property-based access is being used,
-     * or the name of the relationship field if field-based access is used.
-     */
-    String name();
-
-    /**
-     * The join column that is being mapped to the persistent
-     * attribute. The mapping type will remain the same as is defined
-     * in the mapped superclass.
-     */
-    JoinColumn[] joinColumns();
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/src/javax/persistence/AssociationOverrides.java
----------------------------------------------------------------------
diff --git a/utils/src/javax/persistence/AssociationOverrides.java b/utils/src/javax/persistence/AssociationOverrides.java
deleted file mode 100644
index d0ed61e..0000000
--- a/utils/src/javax/persistence/AssociationOverrides.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- * 
- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- * 
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License. You can obtain
- * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- * 
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- * Sun designates this particular file as subject to the "Classpath" exception
- * as provided by Sun in the GPL Version 2 section of the License file that
- * accompanied this code.  If applicable, add the following below the License
- * Header, with the fields enclosed by brackets [] replaced by your own
- * identifying information: "Portions Copyrighted [year]
- * [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-package javax.persistence;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * This annotation is used to override mappings of multiple 
- * many-to-one or one-to-one relationship properties or fields.
- *
- * <pre>
- *    
- *    Example:
- *    &#064;MappedSuperclass
- *    public class Employee {
- *    
- *        &#064;Id protected Integer id;
- *        &#064;Version protected Integer version;
- *        &#064;ManyToOne protected Address address;
- *        &#064;OneToOne protected Locker locker;
- *    
- *        public Integer getId() { ... }
- *        public void setId(Integer id) { ... }
- *        public Address getAddress() { ... }
- *        public void setAddress(Address address) { ... }
- *        public Locker getLocker() { ... }
- *        public void setLocker(Locker locker) { ... }
- *    
- *    }
- *    
- *    &#064;Entity
- *    &#064;AssociationOverrides({
- *    
- *    &#064;AssociationOverride(name="address", 
- *            joinColumns=&#064;JoinColumn("ADDR_ID")),
- *        &#064;AttributeOverride(name="locker", 
- *            joinColumns=&#064;JoinColumn("LCKR_ID"))})
- *    public PartTimeEmployee { ... }
- * </pre>
- *
- * @since Java Persistence 1.0
- */
-@Target({TYPE, METHOD, FIELD}) 
-@Retention(RUNTIME)
-
-public @interface AssociationOverrides {
-
-    /** Mapping overrides of relationship properties or fields */
-    AssociationOverride[] value();
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/src/javax/persistence/AttributeOverride.java
----------------------------------------------------------------------
diff --git a/utils/src/javax/persistence/AttributeOverride.java b/utils/src/javax/persistence/AttributeOverride.java
deleted file mode 100644
index 23ead7ae..0000000
--- a/utils/src/javax/persistence/AttributeOverride.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- * 
- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- * 
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License. You can obtain
- * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- * 
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- * Sun designates this particular file as subject to the "Classpath" exception
- * as provided by Sun in the GPL Version 2 section of the License file that
- * accompanied this code.  If applicable, add the following below the License
- * Header, with the fields enclosed by brackets [] replaced by your own
- * identifying information: "Portions Copyrighted [year]
- * [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-package javax.persistence;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * The <code>AttributeOverride</code> annotation is used to 
- * override the mapping of a {@link Basic} (whether explicit or 
- * default) property or field or Id property or field.
- *
- * <p> The <code>AttributeOverride</code> annotation may be 
- * applied to an entity that extends a mapped superclass or to 
- * an embedded field or property to override a basic mapping 
- * defined by the mapped superclass or embeddable class. If the 
- * <code>AttributeOverride</code> annotation is not specified, 
- * the column is mapped the same as in the original mapping.
- *
- * <pre>
- * <p> Example:
- *
- *   &#064;MappedSuperclass
- *   public class Employee {
- *       &#064;Id protected Integer id;
- *       &#064;Version protected Integer version;
- *       protected String address;
- *       public Integer getId() { ... }
- *       public void setId(Integer id) { ... }
- *       public String getAddress() { ... }
- *       public void setAddress(String address) { ... }
- *   }
- *
- *   &#064;Entity
- *   &#064;AttributeOverride(name="address", column=&#064;Column(name="ADDR"))
- *   public class PartTimeEmployee extends Employee {
- *       // address field mapping overridden to ADDR
- *       protected Float wage();
- *       public Float getHourlyWage() { ... }
- *       public void setHourlyWage(Float wage) { ... }
- *   }
- * </pre>
- *
- * @see Embedded
- * @see Embeddable
- * @see MappedSuperclass
- *
- * @since Java Persistence 1.0
- */
-@Target({TYPE, METHOD, FIELD}) 
-@Retention(RUNTIME)
-
-public @interface AttributeOverride {
-
-    /**
-     * (Required) The name of the property whose mapping is being 
-     * overridden if property-based access is being used, or the 
-     * name of the field if field-based access is used.
-     */
-    String name();
-
-    /**
-     * (Required) The column that is being mapped to the persistent 
-     * attribute. The mapping type will remain the same as is 
-     * defined in the embeddable class or mapped superclass.
-     */
-    Column column();
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/src/javax/persistence/AttributeOverrides.java
----------------------------------------------------------------------
diff --git a/utils/src/javax/persistence/AttributeOverrides.java b/utils/src/javax/persistence/AttributeOverrides.java
deleted file mode 100644
index c1d0f9b..0000000
--- a/utils/src/javax/persistence/AttributeOverrides.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- * 
- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- * 
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License. You can obtain
- * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- * 
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- * Sun designates this particular file as subject to the "Classpath" exception
- * as provided by Sun in the GPL Version 2 section of the License file that
- * accompanied this code.  If applicable, add the following below the License
- * Header, with the fields enclosed by brackets [] replaced by your own
- * identifying information: "Portions Copyrighted [year]
- * [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-package javax.persistence;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * Is used to override mappings of multiple properties or fields.
- *
- * <pre>
- *
- *    Example:
- *
- *    &#064;Embedded
- *    &#064;AttributeOverrides({
- *            &#064;AttributeOverride(name="startDate", column=&#064;Column("
- *                    EMP_START")),
- *            &#064;AttributeOverride(name="endDate", column=&#064;Column("EMP_END"))
- *    })
- *    public EmploymentPeriod getEmploymentPeriod() { ... }
- * </pre>
- *
- * @since Java Persistence 1.0
- */
-@Target({TYPE, METHOD, FIELD}) 
-@Retention(RUNTIME)
-
-public @interface AttributeOverrides {
-
-    /** One or more mapping override */
-    AttributeOverride[] value();
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/src/javax/persistence/Basic.java
----------------------------------------------------------------------
diff --git a/utils/src/javax/persistence/Basic.java b/utils/src/javax/persistence/Basic.java
deleted file mode 100644
index e1430f4..0000000
--- a/utils/src/javax/persistence/Basic.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- * 
- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- * 
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License. You can obtain
- * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- * 
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- * Sun designates this particular file as subject to the "Classpath" exception
- * as provided by Sun in the GPL Version 2 section of the License file that
- * accompanied this code.  If applicable, add the following below the License
- * Header, with the fields enclosed by brackets [] replaced by your own
- * identifying information: "Portions Copyrighted [year]
- * [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-package javax.persistence;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static javax.persistence.FetchType.EAGER;
-
-/**
- * The <code>Basic</code> annotation is the simplest type of mapping 
- * to a database column. The <code>Basic</code> annotation can be 
- * applied to a persistent property or instance variable of any of the 
- * following types: Java primitive types, wrappers of the primitive types, 
- * {@link String}, {@link java.math.BigInteger java.math.BigInteger}, 
- * {@link java.math.BigDecimal java.math.BigDecimal}, 
- * {@link java.util.Date java.util.Date}, 
- * {@link java.util.Calendar java.util.Calendar}, 
- * {@link java.sql.Date java.sql.Date}, {@link java.sql.Time java.sql.Time}, 
- * {@link java.sql.Timestamp java.sql.Timestamp}, <code>byte[], Byte[], 
- * char[], Character[]</code>, enums, and any other type that implements 
- * {@link java.io.Serializable Serializable}. 
- * 
- * <p> The use of the <code>Basic</code> annotation is optional for 
- * persistent fields and properties of these types.
- *
- * @since Java Persistence 1.0
- */
-@Target({METHOD, FIELD}) 
-@Retention(RUNTIME)
-public @interface Basic {
-
-    /**
-     * (Optional) Defines whether the value of the field or property should 
-     * be lazily loaded or must be eagerly fetched. The <code>EAGER</code> 
-     * strategy is a requirement on the persistence provider runtime 
-     * that the value must be eagerly fetched.  The <code>LAZY</code> 
-     * strategy is a hint to the persistence provider runtime.
-     * If not specified, defaults to <code>EAGER</code>.
-     */
-    FetchType fetch() default EAGER;
-
-    /**
-     * (Optional) Defines whether the value of the field or property may be null. 
-     * This is a hint and is disregarded for primitive types; it may 
-     * be used in schema generation.
-     * If not specified, defaults to <code>true</code>.
-     */
-    boolean optional() default true;
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/src/javax/persistence/CascadeType.java
----------------------------------------------------------------------
diff --git a/utils/src/javax/persistence/CascadeType.java b/utils/src/javax/persistence/CascadeType.java
deleted file mode 100644
index b4dc0a2..0000000
--- a/utils/src/javax/persistence/CascadeType.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- * 
- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- * 
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License. You can obtain
- * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- * 
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- * Sun designates this particular file as subject to the "Classpath" exception
- * as provided by Sun in the GPL Version 2 section of the License file that
- * accompanied this code.  If applicable, add the following below the License
- * Header, with the fields enclosed by brackets [] replaced by your own
- * identifying information: "Portions Copyrighted [year]
- * [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-package javax.persistence;
-
-/**
- * Defines the set of cascadable operations that are propagated 
- * to the associated entity.
- * The value <code>cascade=ALL<code> is equivalent to 
- * <code>cascade={PERSIST, MERGE, REMOVE, REFRESH}</code>.
- *
- * @since Java Persistence 1.0
- */
-public enum CascadeType { 
-
-    /** Cascade all operations */
-    ALL, 
-
-    /** Cascade persist operation */
-    PERSIST, 
-
-    /** Cascade merge operation */
-    MERGE, 
-
-    /** Cascade remove operation */
-    REMOVE,
-
-    /** Cascade refresh operation */
-    REFRESH
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/src/javax/persistence/CollectionTable.java
----------------------------------------------------------------------
diff --git a/utils/src/javax/persistence/CollectionTable.java b/utils/src/javax/persistence/CollectionTable.java
deleted file mode 100644
index 936e31d..0000000
--- a/utils/src/javax/persistence/CollectionTable.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package javax.persistence;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-@Target(value = { METHOD, FIELD })
-@Retention(value = RetentionPolicy.RUNTIME)
-public @interface CollectionTable {
-    String catalog() default "";
-
-    JoinColumn[] joinColumns() default {};
-
-    String name() default "";
-
-    String schema() default "";
-
-    UniqueConstraint[] uniqueConstraints() default {};
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/src/javax/persistence/Column.java
----------------------------------------------------------------------
diff --git a/utils/src/javax/persistence/Column.java b/utils/src/javax/persistence/Column.java
deleted file mode 100644
index 13606f2..0000000
--- a/utils/src/javax/persistence/Column.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- * 
- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- * 
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License. You can obtain
- * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- * 
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- * Sun designates this particular file as subject to the "Classpath" exception
- * as provided by Sun in the GPL Version 2 section of the License file that
- * accompanied this code.  If applicable, add the following below the License
- * Header, with the fields enclosed by brackets [] replaced by your own
- * identifying information: "Portions Copyrighted [year]
- * [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-package javax.persistence;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * Is used to specify a mapped column for a persistent property or field.
- * If no Column annotation is specified, the default values are applied.
- * <p> Examples:
- *
- * <blockquote><pre>
- * Example 1:
- * &#064;Column(name="DESC", nullable=false, length=512)
- * public String getDescription() { return description; }
- *
- * Example 2:
- * &#064;Column(name="DESC",
- *         columnDefinition="CLOB NOT NULL",
- *         table="EMP_DETAIL")
- * &#064;Lob
- * public String getDescription() { return description; }
- *
- * Example 3:
- * &#064;Column(name="ORDER_COST", updatable=false, precision=12, scale=2)
- * public BigDecimal getCost() { return cost; }
- *
- * </pre></blockquote>
- *
- *
- * @since Java Persistence 1.0
- */ 
-@Target({METHOD, FIELD}) 
-@Retention(RUNTIME)
-public @interface Column {
-
-    /**
-     * (Optional) The name of the column. Defaults to 
-     * the property or field name.
-     */
-    String name() default "";
-
-    /**
-     * (Optional) Whether the property is a unique key.  This is a 
-     * shortcut for the UniqueConstraint annotation at the table 
-     * level and is useful for when the unique key constraint is 
-     * only a single field. This constraint applies in addition 
-     * to any constraint entailed by primary key mapping and 
-     * to constraints specified at the table level.
-     */
-    boolean unique() default false;
-
-    /**
-     * (Optional) Whether the database column is nullable.
-     */
-    boolean nullable() default true;
-
-    /**
-     * (Optional) Whether the column is included in SQL INSERT 
-     * statements generated by the persistence provider.
-     */
-    boolean insertable() default true;
-
-    /**
-     * (Optional) Whether the column is included in SQL UPDATE 
-     * statements generated by the persistence provider.
-     */
-    boolean updatable() default true;
-
-    /**
-     * (Optional) The SQL fragment that is used when 
-     * generating the DDL for the column.
-     * <p> Defaults to the generated SQL to create a
-     * column of the inferred type.
-     */
-    String columnDefinition() default "";
-
-    /**
-     * (Optional) The name of the table that contains the column. 
-     * If absent the column is assumed to be in the primary table.
-     */
-    String table() default "";
-
-    /**
-     * (Optional) The column length. (Applies only if a
-     * string-valued column is used.)
-     */
-    int length() default 255;
-
-    /**
-     * (Optional) The precision for a decimal (exact numeric) 
-     * column. (Applies only if a decimal column is used.)
-     * Value must be set by developer if used when generating 
-     * the DDL for the column.
-     */
-    int precision() default 0;
-
-    /**
-     * (Optional) The scale for a decimal (exact numeric) column. 
-     * (Applies only if a decimal column is used.)
-     */
-    int scale() default 0;
-    /**
-     * (Optional) Whether encryption should be used for this column 
-     */
-    boolean encryptable() default false;
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/src/javax/persistence/ColumnResult.java
----------------------------------------------------------------------
diff --git a/utils/src/javax/persistence/ColumnResult.java b/utils/src/javax/persistence/ColumnResult.java
deleted file mode 100644
index bc7ea29..0000000
--- a/utils/src/javax/persistence/ColumnResult.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- * 
- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- * 
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License. You can obtain
- * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- * 
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- * Sun designates this particular file as subject to the "Classpath" exception
- * as provided by Sun in the GPL Version 2 section of the License file that
- * accompanied this code.  If applicable, add the following below the License
- * Header, with the fields enclosed by brackets [] replaced by your own
- * identifying information: "Portions Copyrighted [year]
- * [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-package javax.persistence;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-/**
- * References name of a column in the SELECT clause of a SQL query - 
- * i.e., column alias, if applicable. Scalar result types can be 
- * included in the query result by specifying this annotation in 
- * the metadata.
- *
- * <pre>
- *
- * Example:
- *   Query q = em.createNativeQuery(
- *       "SELECT o.id AS order_id, " +
- *           "o.quantity AS order_quantity, " +
- *           "o.item AS order_item, " + 
- *           "i.name AS item_name, " +
- *         "FROM Order o, Item i " +
- *         "WHERE (order_quantity > 25) AND (order_item = i.id)",
- *       "OrderResults");
- *
- *   &#064;SqlResultSetMapping(name="OrderResults",
- *       entities={
- *           &#064;EntityResult(entityClass=com.acme.Order.class, fields={
- *               &#064;FieldResult(name="id", column="order_id"),
- *               &#064;FieldResult(name="quantity", column="order_quantity"),
- *               &#064;FieldResult(name="item", column="order_item")})},
- *       columns={
- *           &#064;ColumnResult(name="item_name")}
- *       )
- * </pre>
- *
- * @since Java Persistence 1.0
- */
-@Target({}) 
-@Retention(RUNTIME)
-
-public @interface ColumnResult { 
-
-    /** The name of a column in the SELECT clause of a SQL query */
-    String name();
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/457f3b3d/utils/src/javax/persistence/DiscriminatorColumn.java
----------------------------------------------------------------------
diff --git a/utils/src/javax/persistence/DiscriminatorColumn.java b/utils/src/javax/persistence/DiscriminatorColumn.java
deleted file mode 100644
index 7034df6..0000000
--- a/utils/src/javax/persistence/DiscriminatorColumn.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- * 
- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- * 
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License. You can obtain
- * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- * 
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- * Sun designates this particular file as subject to the "Classpath" exception
- * as provided by Sun in the GPL Version 2 section of the License file that
- * accompanied this code.  If applicable, add the following below the License
- * Header, with the fields enclosed by brackets [] replaced by your own
- * identifying information: "Portions Copyrighted [year]
- * [name of copyright owner]"
- * 
- * Contributor(s):
- * 
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-package javax.persistence;
-
-import java.lang.annotation.Target;
-import java.lang.annotation.Retention;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-import static javax.persistence.DiscriminatorType.STRING;
-
-/**
- * Is used to define the discriminator column for the 
- * {@link InheritanceType#SINGLE_TABLE SINGLE_TABLE} and 
- * {@link InheritanceType#JOINED JOINED} inheritance mapping strategies.
- * 
- * <p> The strategy and the discriminator column are only 
- * specified in the root of an entity class hierarchy or
- * subhierarchy in which a different inheritance strategy is applied
- * 
- * <p> If the <code>DiscriminatorColumn</code> annotation is missing, 
- * and a discriminator column is required, the name of the 
- * discriminator column defaults to <code>"DTYPE"</code> and the discriminator 
- * type to {@link DiscriminatorType#STRING DiscriminatorType.STRING}.
- *
- * <pre>
- *     Example:
- *     &#064;Entity
- *     &#064;Table(name="CUST")
- *     &#064;Inheritance(strategy=SINGLE_TABLE)
- *     &#064;DiscriminatorColumn(name="DISC", discriminatorType=STRING,length=20)
- *     public class Customer { ... }
- *
- *     &#064;Entity
- *     public class ValuedCustomer extends Customer { ... }
- * </pre>
- *
- * @since Java Persistence 1.0
- */
-@Target({TYPE}) 
-@Retention(RUNTIME)
-
-public @interface DiscriminatorColumn {
-
-    /**
-     * (Optional) The name of column to be used for the discriminator.
-     */
-    String name() default "DTYPE";
-
-    /**
-     * (Optional) The type of object/column to use as a class discriminator.
-     * Defaults to {@link DiscriminatorType#STRING DiscriminatorType.STRING}.
-     */
-    DiscriminatorType discriminatorType() default STRING;
-
-    /**
-     * (Optional) The SQL fragment that is used when generating the DDL 
-     * for the discriminator column.
-     * <p> Defaults to the provider-generated SQL to create a column 
-     * of the specified discriminator type.
-     */
-    String columnDefinition() default "";
-
-    /** 
-     * (Optional) The column length for String-based discriminator types. 
-     * Ignored for other discriminator types.
-     */
-    int length() default 31;
-}