juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ks...@apache.org
Subject svn commit: r780067 - in /webservices/juddi/branches/v3_trunk: juddi-core/src/main/java/org/apache/juddi/model/ juddi-core/src/main/resources/persistence/ juddi-cxf/persistence/
Date Fri, 29 May 2009 18:54:08 GMT
Author: kstam
Date: Fri May 29 18:54:07 2009
New Revision: 780067

URL: http://svn.apache.org/viewvc?rev=780067&view=rev
Log:
Fixing the serviceProjection config so openjpa can work with it.

Added:
    webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceProjectionId.java
Modified:
    webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceProjection.java
    webservices/juddi/branches/v3_trunk/juddi-core/src/main/resources/persistence/openjpa-persistence.xml
    webservices/juddi/branches/v3_trunk/juddi-cxf/persistence/openjpa-persistence.xml

Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceProjection.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceProjection.java?rev=780067&r1=780066&r2=780067&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceProjection.java
(original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceProjection.java
Fri May 29 18:54:07 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.juddi.model;
 
-import javax.persistence.Column;
-import javax.persistence.Embeddable;
 import javax.persistence.EmbeddedId;
 import javax.persistence.Entity;
 import javax.persistence.JoinColumn;
@@ -31,59 +29,11 @@
 @Table(name = "juddiv3_service_projection")
 public class ServiceProjection implements java.io.Serializable {
 
-		@Embeddable
-		public static class Id implements java.io.Serializable {
-			
-			private static final long serialVersionUID = 1L;
-
-			@Column(name = "business_key", nullable = false, length = 255)
-			private String businessKey;
-			@Column(name = "service_key", nullable = false, length = 255)
-			String serviceKey;
-			
-			public Id() {
-			}
-			public Id(String businessKey, String serviceKey) {
-				this.businessKey = businessKey;
-				this.serviceKey = serviceKey;
-			}
-
-			public int hashCode() {
-				final int prime = 31;
-				int result = 1;
-				result = prime * result
-						+ ((businessKey == null) ? 0 : businessKey.hashCode());
-				result = prime * result
-						+ ((serviceKey == null) ? 0 : serviceKey.hashCode());
-				return result;
-			}
-			public boolean equals(Object obj) {
-				if (this == obj)
-					return true;
-				if (obj == null)
-					return false;
-				if (getClass() != obj.getClass())
-					return false;
-				Id other = (Id) obj;
-				if (businessKey == null) {
-					if (other.businessKey != null)
-						return false;
-				} else if (!businessKey.equals(other.businessKey))
-					return false;
-				if (serviceKey == null) {
-					if (other.serviceKey != null)
-						return false;
-				} else if (!serviceKey.equals(other.serviceKey))
-					return false;
-				return true;
-			}
-			
-		}
-
+		
 		private static final long serialVersionUID = 1L;
 		
 		@EmbeddedId
-		private Id id = new Id();
+		private ServiceProjectionId id = new ServiceProjectionId();
 		@ManyToOne
 		@JoinColumn(name = "business_key", insertable = false, updatable = false)
 		private BusinessEntity businessEntity;
@@ -105,10 +55,10 @@
 			businessService.getProjectingBusinesses().add(this);
 		}
 
-		public Id getId() {
+		public ServiceProjectionId getId() {
 			return id;
 		}
-		public void setId(Id id) {
+		public void setId(ServiceProjectionId id) {
 			this.id = id;
 		}
 

Added: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceProjectionId.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceProjectionId.java?rev=780067&view=auto
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceProjectionId.java
(added)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceProjectionId.java
Fri May 29 18:54:07 2009
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2001-2008 The Apache Software Foundation.
+ * 
+ * Licensed 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.
+ *
+ */
+package org.apache.juddi.model;
+
+import javax.persistence.Column;
+import javax.persistence.Embeddable;
+
+/**
+ * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
+ */
+
+
+@Embeddable
+public class ServiceProjectionId implements java.io.Serializable {
+	
+	private static final long serialVersionUID = 1L;
+
+	@Column(name = "business_key", nullable = false, length = 255)
+	String businessKey;
+	@Column(name = "service_key", nullable = false, length = 255)
+	String serviceKey;
+	
+	public ServiceProjectionId() {
+	}
+	public ServiceProjectionId(String businessKey, String serviceKey) {
+		this.businessKey = businessKey;
+		this.serviceKey = serviceKey;
+	}
+
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result
+				+ ((businessKey == null) ? 0 : businessKey.hashCode());
+		result = prime * result
+				+ ((serviceKey == null) ? 0 : serviceKey.hashCode());
+		return result;
+	}
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		ServiceProjectionId other = (ServiceProjectionId) obj;
+		if (businessKey == null) {
+			if (other.businessKey != null)
+				return false;
+		} else if (!businessKey.equals(other.businessKey))
+			return false;
+		if (serviceKey == null) {
+			if (other.serviceKey != null)
+				return false;
+		} else if (!serviceKey.equals(other.serviceKey))
+			return false;
+		return true;
+	}
+	
+}

Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/resources/persistence/openjpa-persistence.xml
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/resources/persistence/openjpa-persistence.xml?rev=780067&r1=780066&r2=780067&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/resources/persistence/openjpa-persistence.xml
(original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/resources/persistence/openjpa-persistence.xml
Fri May 29 18:54:07 2009
@@ -38,6 +38,8 @@
     <class>org.apache.juddi.model.ServiceCategoryBag</class>
     <class>org.apache.juddi.model.ServiceDescr</class>
     <class>org.apache.juddi.model.ServiceName</class>
+    <class>org.apache.juddi.model.ServiceProjection</class>
+    <class>org.apache.juddi.model.ServiceProjectionId</class>
     <class>org.apache.juddi.model.Subscription</class>
     <class>org.apache.juddi.model.SubscriptionChunkToken</class>
     <class>org.apache.juddi.model.SubscriptionMatch</class>

Modified: webservices/juddi/branches/v3_trunk/juddi-cxf/persistence/openjpa-persistence.xml
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-cxf/persistence/openjpa-persistence.xml?rev=780067&r1=780066&r2=780067&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-cxf/persistence/openjpa-persistence.xml (original)
+++ webservices/juddi/branches/v3_trunk/juddi-cxf/persistence/openjpa-persistence.xml Fri
May 29 18:54:07 2009
@@ -38,6 +38,8 @@
     <class>org.apache.juddi.model.ServiceCategoryBag</class>
     <class>org.apache.juddi.model.ServiceDescr</class>
     <class>org.apache.juddi.model.ServiceName</class>
+    <class>org.apache.juddi.model.ServiceProjection</class>
+    <class>org.apache.juddi.model.ServiceProjectionId</class>
     <class>org.apache.juddi.model.Subscription</class>
     <class>org.apache.juddi.model.SubscriptionChunkToken</class>
     <class>org.apache.juddi.model.SubscriptionMatch</class>



---------------------------------------------------------------------
To unsubscribe, e-mail: juddi-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: juddi-cvs-help@ws.apache.org


Mime
View raw message