juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcunn...@apache.org
Subject svn commit: r726333 - /webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelOverview.java
Date Sun, 14 Dec 2008 02:09:44 GMT
Author: tcunning
Date: Sat Dec 13 18:09:44 2008
New Revision: 726333

URL: http://svn.apache.org/viewvc?rev=726333&view=rev
Log:
JUDDI-145
Add Tmodel/put tmodelkey back.    Seems to get rid of the warning for me,
still blocked by the TmodelCategoryBag error to seeing the Overview error.

Modified:
    webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelOverview.java

Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelOverview.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelOverview.java?rev=726333&r1=726332&r2=726333&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelOverview.java
(original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelOverview.java
Sat Dec 13 18:09:44 2008
@@ -15,21 +15,16 @@
  * limitations under the License.
  */
 
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.persistence.CascadeType;
 import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.FetchType;
 import javax.persistence.Id;
-import javax.persistence.OneToMany;
-import javax.persistence.OrderBy;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToOne;
 import javax.persistence.Table;
 
 /**
  * @author <a href="mailto:kurt@apache.org">Kurt T Stam</a>
- * @author <a href="mailto:tcunning@apache.org">Tom Cunningham</a>
  */
 @Entity
 @Table(name = "tmodel_overview")
@@ -37,24 +32,24 @@
 
 	private static final long serialVersionUID = 1L;
 	private int tmodelOverviewId;
+	private String tmodelKey;
 	private Tmodel tmodel;
 	private String overviewUrl;
-	private Set<TmodelDocDescr> docDescrs = new HashSet<TmodelDocDescr>(0);
 
 	public TmodelOverview() {
 	}
 
-	public TmodelOverview(int tmodelOverviewId, Tmodel tmodel) {
+	public TmodelOverview(int tmodelOverviewId, String tmodelKey, Tmodel tmodel) {
 		this.tmodelOverviewId = tmodelOverviewId;
+		this.tmodelKey = tmodelKey;
 		this.tmodel = tmodel;
 	}
-	
-	public TmodelOverview(int tmodelOverviewId, Tmodel tmodel,
-			String overviewUrl, Set<TmodelDocDescr> docDescrs) {
+	public TmodelOverview(int tmodelOverviewId, String tmodelKey, Tmodel tmodel,
+			String overviewUrl) {
 		this.tmodelOverviewId = tmodelOverviewId;
-		this.tmodel = tmodel;
+		this.tmodelKey = tmodelKey;
 		this.overviewUrl = overviewUrl;
-		this.docDescrs = docDescrs;
+		this.tmodel = tmodel;
 	}
 
 	@Id
@@ -68,15 +63,24 @@
 		this.tmodelOverviewId = tmodelOverviewId;
 	}
 
-	@Column(name = "tmodel", nullable = false, length = 255)
+	@Column(name = "tmodel_key", nullable = false, length = 255)
+	public String getTmodelKey() {
+		return this.tmodelKey;
+	}
+
+	public void setTmodelKey(String tmodelKey) {
+		this.tmodelKey = tmodelKey;
+	}
+	
+	@OneToOne(fetch = FetchType.LAZY)
+	@JoinColumn(name = "tmodel_key", nullable = false, insertable = false, updatable = false)
 	public Tmodel getTmodel() {
 		return this.tmodel;
 	}
-
 	public void setTmodel(Tmodel tmodel) {
 		this.tmodel = tmodel;
 	}
-
+	
 	@Column(name = "overview_url")
 	public String getOverviewUrl() {
 		return this.overviewUrl;
@@ -86,13 +90,4 @@
 		this.overviewUrl = overviewUrl;
 	}
 
-	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tmodeloverview")
-	@OrderBy
-	public Set<TmodelDocDescr> getDocDescriptions() {
-		return this.docDescrs;
-	}
-	
-	public void setDocDescriptions(Set<TmodelDocDescr> docDescrs) {
-		this.docDescrs = docDescrs;
-	}	
 }



---------------------------------------------------------------------
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