You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juddi.apache.org by ks...@apache.org on 2008/12/13 15:43:23 UTC
svn commit: r726212 [2/2] - in
/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi:
mapping/ model/
Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/PersonName.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/PersonName.java?rev=726212&r1=726211&r2=726212&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/PersonName.java (original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/PersonName.java Sat Dec 13 06:43:21 2008
@@ -16,11 +16,12 @@
*/
import javax.persistence.Column;
-import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
import javax.persistence.JoinColumn;
-import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@@ -32,7 +33,7 @@
public class PersonName implements java.io.Serializable {
private static final long serialVersionUID = 1L;
- private PersonNameId id;
+ private Long id;
private Contact contact;
private String langCode;
private String name;
@@ -40,31 +41,28 @@
public PersonName() {
}
- public PersonName(PersonNameId id, Contact contact, String name) {
- this.id = id;
+ public PersonName(Contact contact, String name) {
this.contact = contact;
this.name = name;
}
- public PersonName(PersonNameId id, Contact contact, String langCode,
+ public PersonName(Contact contact, String langCode,
String name) {
- this.id = id;
this.contact = contact;
this.langCode = langCode;
this.name = name;
}
- @EmbeddedId
- public PersonNameId getId() {
+ @Id
+ @GeneratedValue(strategy=GenerationType.AUTO)
+ public Long getId() {
return this.id;
}
- public void setId(PersonNameId id) {
+ public void setId(Long id) {
this.id = id;
}
@ManyToOne(fetch = FetchType.LAZY)
- @JoinColumns({
- @JoinColumn(name = "entity_key", referencedColumnName = "entity_key", nullable = false, insertable = false, updatable = false),
- @JoinColumn(name = "contact_id", referencedColumnName = "contact_id", nullable = false, insertable = false, updatable = false)})
+ @JoinColumn(name = "id", nullable = false, insertable = false, updatable = false)
public Contact getContact() {
return this.contact;
}
Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/Phone.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/Phone.java?rev=726212&r1=726211&r2=726212&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/Phone.java (original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/Phone.java Sat Dec 13 06:43:21 2008
@@ -16,11 +16,12 @@
*/
import javax.persistence.Column;
-import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
import javax.persistence.JoinColumn;
-import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@@ -33,7 +34,7 @@
public class Phone implements java.io.Serializable {
private static final long serialVersionUID = 1L;
- private PhoneId id;
+ private Long id;
private Contact contact;
private String useType;
private String phoneNumber;
@@ -41,30 +42,27 @@
public Phone() {
}
- public Phone(PhoneId id, Contact contact, String phoneNumber) {
- this.id = id;
+ public Phone(Contact contact, String phoneNumber) {
this.contact = contact;
this.phoneNumber = phoneNumber;
}
- public Phone(PhoneId id, Contact contact, String useType, String phoneNumber) {
- this.id = id;
+ public Phone(Contact contact, String useType, String phoneNumber) {
this.contact = contact;
this.useType = useType;
this.phoneNumber = phoneNumber;
}
- @EmbeddedId
- public PhoneId getId() {
+ @Id
+ @GeneratedValue(strategy=GenerationType.AUTO)
+ public Long getId() {
return this.id;
}
- public void setId(PhoneId id) {
+ public void setId(Long id) {
this.id = id;
}
@ManyToOne(fetch = FetchType.LAZY)
- @JoinColumns({
- @JoinColumn(name = "entity_key", referencedColumnName = "entity_key", nullable = false, insertable = false, updatable = false),
- @JoinColumn(name = "contact_id", referencedColumnName = "contact_id", nullable = false, insertable = false, updatable = false)})
+ @JoinColumn(name = "id", nullable = false, insertable = false, updatable = false)
public Contact getContact() {
return this.contact;
}
Added: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceCategoryBag.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceCategoryBag.java?rev=726212&view=auto
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceCategoryBag.java (added)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceCategoryBag.java Sat Dec 13 06:43:21 2008
@@ -0,0 +1,44 @@
+package org.apache.juddi.model;
+/*
+ * 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.
+ */
+
+import javax.persistence.Entity;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToOne;
+import javax.persistence.Table;
+
+/**
+ * @author <a href="mailto:kurt@apache.org">Kurt T Stam</a>
+ */
+@Entity
+@Table(name = "service_category_bag")
+public class ServiceCategoryBag extends CategoryBag {
+
+ private static final long serialVersionUID = 1L;
+ private BusinessService businessService;
+
+ @OneToOne(optional=false)
+ @JoinColumn(name = "business_service_id")
+ public BusinessService getBusinessService() {
+ return businessService;
+ }
+ public void setBusinessService(BusinessService businessService) {
+ this.businessService = businessService;
+ }
+
+
+
+}
Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceDescr.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceDescr.java?rev=726212&r1=726211&r2=726212&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceDescr.java (original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceDescr.java Sat Dec 13 06:43:21 2008
@@ -16,9 +16,11 @@
*/
import javax.persistence.Column;
-import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@@ -32,7 +34,7 @@
public class ServiceDescr implements java.io.Serializable {
private static final long serialVersionUID = 1L;
- private ServiceDescrId id;
+ private Long id;
private BusinessService businessService;
private String langCode;
private String descr;
@@ -40,25 +42,22 @@
public ServiceDescr() {
}
- public ServiceDescr(ServiceDescrId id, BusinessService businessService,
- String descr) {
- this.id = id;
+ public ServiceDescr(BusinessService businessService, String descr) {
this.businessService = businessService;
this.descr = descr;
}
- public ServiceDescr(ServiceDescrId id, BusinessService businessService,
- String langCode, String descr) {
- this.id = id;
+ public ServiceDescr(BusinessService businessService, String langCode, String descr) {
this.businessService = businessService;
this.langCode = langCode;
this.descr = descr;
}
- @EmbeddedId
- public ServiceDescrId getId() {
+ @Id
+ @GeneratedValue(strategy=GenerationType.AUTO)
+ public Long getId() {
return this.id;
}
- public void setId(ServiceDescrId id) {
+ public void setId(Long id) {
this.id = id;
}
Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceName.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceName.java?rev=726212&r1=726211&r2=726212&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceName.java (original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/ServiceName.java Sat Dec 13 06:43:21 2008
@@ -16,9 +16,11 @@
*/
import javax.persistence.Column;
-import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@@ -32,7 +34,7 @@
public class ServiceName implements java.io.Serializable {
private static final long serialVersionUID = 1L;
- private ServiceNameId id;
+ private Long id;
private BusinessService businessService;
private String langCode;
private String name;
@@ -40,25 +42,23 @@
public ServiceName() {
}
- public ServiceName(ServiceNameId id, BusinessService businessService,
- String name) {
- this.id = id;
+ public ServiceName(BusinessService businessService, String name) {
this.businessService = businessService;
this.name = name;
}
- public ServiceName(ServiceNameId id, BusinessService businessService,
+ public ServiceName(BusinessService businessService,
String langCode, String name) {
- this.id = id;
this.businessService = businessService;
this.langCode = langCode;
this.name = name;
}
- @EmbeddedId
- public ServiceNameId getId() {
+ @Id
+ @GeneratedValue(strategy=GenerationType.AUTO)
+ public Long getId() {
return this.id;
}
- public void setId(ServiceNameId id) {
+ public void setId(Long id) {
this.id = id;
}
Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/Tmodel.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/Tmodel.java?rev=726212&r1=726211&r2=726212&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/Tmodel.java (original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/Tmodel.java Sat Dec 13 06:43:21 2008
@@ -26,6 +26,7 @@
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
+import javax.persistence.OneToOne;
import javax.persistence.Table;
/**
@@ -44,7 +45,7 @@
private Set<TmodelDescr> tmodelDescrs = new HashSet<TmodelDescr>(0);
private Set<TmodelDocDescr> tmodelDocDescrs = new HashSet<TmodelDocDescr>(0);
private Set<TmodelIdentifier> tmodelIdentifiers = new HashSet<TmodelIdentifier>(0);
- private Set<TmodelCategory> tmodelCategories = new HashSet<TmodelCategory>(0);
+ private TmodelCategoryBag categoryBag = new TmodelCategoryBag();
public Tmodel() {
}
@@ -58,7 +59,7 @@
String name, String langCode, boolean deleted, Date lastUpdate,
Set<TmodelDescr> tmodelDescrs, Set<TmodelDocDescr> tmodelDocDescrs,
Set<TmodelIdentifier> tmodelIdentifiers,
- Set<TmodelCategory> tmodelCategories) {
+ TmodelCategoryBag categoryBag) {
this.entityKey = entityKey;
this.publisher = publisher;
this.name = name;
@@ -68,7 +69,7 @@
this.tmodelDescrs = tmodelDescrs;
this.tmodelDocDescrs = tmodelDocDescrs;
this.tmodelIdentifiers = tmodelIdentifiers;
- this.tmodelCategories = tmodelCategories;
+ this.categoryBag = categoryBag;
}
@ManyToOne(fetch = FetchType.LAZY)
@@ -128,12 +129,12 @@
this.tmodelIdentifiers = tmodelIdentifiers;
}
- @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tmodel")
- public Set<TmodelCategory> getTmodelCategories() {
- return this.tmodelCategories;
+ @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tmodel")
+ public TmodelCategoryBag getCategoryBag() {
+ return this.categoryBag;
}
- public void setTmodelCategories(Set<TmodelCategory> tmodelCategories) {
- this.tmodelCategories = tmodelCategories;
+ public void setCategoryBag(TmodelCategoryBag categoryBag) {
+ this.categoryBag = categoryBag;
}
public String retrieveAuthorizedName() {
Added: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelCategoryBag.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelCategoryBag.java?rev=726212&view=auto
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelCategoryBag.java (added)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelCategoryBag.java Sat Dec 13 06:43:21 2008
@@ -0,0 +1,47 @@
+package org.apache.juddi.model;
+/*
+ * 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.
+ */
+
+import javax.persistence.Entity;
+import javax.persistence.JoinColumn;
+import javax.persistence.OneToOne;
+import javax.persistence.Table;
+
+/**
+ * @author <a href="mailto:kurt@apache.org">Kurt T Stam</a>
+ */
+@Entity
+@Table(name = "tmodel_category_bag")
+public class TmodelCategoryBag extends CategoryBag {
+
+ private static final long serialVersionUID = 1L;
+ private Tmodel tmodel;
+
+ @OneToOne(optional=false)
+ @JoinColumn(name = "tmodel_id")
+ public Tmodel getTmodel() {
+ return tmodel;
+ }
+ public void setTmodel(Tmodel tmodel) {
+ this.tmodel = tmodel;
+ }
+
+
+
+
+
+
+}
Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelDescr.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelDescr.java?rev=726212&r1=726211&r2=726212&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelDescr.java (original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelDescr.java Sat Dec 13 06:43:21 2008
@@ -16,9 +16,11 @@
*/
import javax.persistence.Column;
-import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@@ -32,7 +34,7 @@
public class TmodelDescr implements java.io.Serializable {
private static final long serialVersionUID = 1L;
- private TmodelDescrId id;
+ private Long id;
private Tmodel tmodel;
private String langCode;
private String descr;
@@ -40,24 +42,23 @@
public TmodelDescr() {
}
- public TmodelDescr(TmodelDescrId id, Tmodel tmodel, String descr) {
- this.id = id;
+ public TmodelDescr(Tmodel tmodel, String descr) {
this.tmodel = tmodel;
this.descr = descr;
}
- public TmodelDescr(TmodelDescrId id, Tmodel tmodel, String langCode,
+ public TmodelDescr(Tmodel tmodel, String langCode,
String descr) {
- this.id = id;
this.tmodel = tmodel;
this.langCode = langCode;
this.descr = descr;
}
- @EmbeddedId
- public TmodelDescrId getId() {
+ @Id
+ @GeneratedValue(strategy=GenerationType.AUTO)
+ public Long getId() {
return this.id;
}
- public void setId(TmodelDescrId id) {
+ public void setId(Long id) {
this.id = id;
}
Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelDocDescr.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelDocDescr.java?rev=726212&r1=726211&r2=726212&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelDocDescr.java (original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelDocDescr.java Sat Dec 13 06:43:21 2008
@@ -16,9 +16,11 @@
*/
import javax.persistence.Column;
-import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@@ -32,7 +34,7 @@
public class TmodelDocDescr implements java.io.Serializable {
private static final long serialVersionUID = 1L;
- private TmodelDocDescrId id;
+ private Long id;
private Tmodel tmodel;
private String langCode;
private String descr;
@@ -40,25 +42,24 @@
public TmodelDocDescr() {
}
- public TmodelDocDescr(TmodelDocDescrId id, Tmodel tmodel, String descr) {
- this.id = id;
+ public TmodelDocDescr(Tmodel tmodel, String descr) {
this.tmodel = tmodel;
this.descr = descr;
}
- public TmodelDocDescr(TmodelDocDescrId id, Tmodel tmodel, String langCode,
+ public TmodelDocDescr(Tmodel tmodel, String langCode,
String descr) {
- this.id = id;
this.tmodel = tmodel;
this.langCode = langCode;
this.descr = descr;
}
- @EmbeddedId
- public TmodelDocDescrId getId() {
+ @Id
+ @GeneratedValue(strategy=GenerationType.AUTO)
+ public Long getId() {
return this.id;
}
- public void setId(TmodelDocDescrId id) {
+ public void setId(Long id) {
this.id = id;
}
Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelIdentifier.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelIdentifier.java?rev=726212&r1=726211&r2=726212&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelIdentifier.java (original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelIdentifier.java Sat Dec 13 06:43:21 2008
@@ -16,9 +16,11 @@
*/
import javax.persistence.Column;
-import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@@ -32,7 +34,7 @@
public class TmodelIdentifier implements java.io.Serializable {
private static final long serialVersionUID = 1L;
- private TmodelIdentifierId id;
+ private Long id;
private Tmodel tmodel;
private String tmodelKeyRef;
private String keyName;
@@ -41,27 +43,26 @@
public TmodelIdentifier() {
}
- public TmodelIdentifier(TmodelIdentifierId id, Tmodel tmodel,
+ public TmodelIdentifier(Tmodel tmodel,
String keyValue) {
- this.id = id;
this.tmodel = tmodel;
this.keyValue = keyValue;
}
- public TmodelIdentifier(TmodelIdentifierId id, Tmodel tmodel,
+ public TmodelIdentifier(Tmodel tmodel,
String tmodelKeyRef, String keyName, String keyValue) {
- this.id = id;
this.tmodel = tmodel;
this.tmodelKeyRef = tmodelKeyRef;
this.keyName = keyName;
this.keyValue = keyValue;
}
- @EmbeddedId
- public TmodelIdentifierId getId() {
+ @Id
+ @GeneratedValue(strategy=GenerationType.AUTO)
+ public Long getId() {
return this.id;
}
- public void setId(TmodelIdentifierId id) {
+ public void setId(Long id) {
this.id = id;
}
Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelInstanceInfo.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelInstanceInfo.java?rev=726212&r1=726211&r2=726212&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelInstanceInfo.java (original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelInstanceInfo.java Sat Dec 13 06:43:21 2008
@@ -20,9 +20,11 @@
import javax.persistence.CascadeType;
import javax.persistence.Column;
-import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
@@ -37,7 +39,7 @@
public class TmodelInstanceInfo implements java.io.Serializable {
private static final long serialVersionUID = 1L;
- private TmodelInstanceInfoId id;
+ private Long id;
private BindingTemplate bindingTemplate;
private String tmodelKey;
private String instanceParms;
@@ -48,19 +50,15 @@
public TmodelInstanceInfo() {
}
- public TmodelInstanceInfo(TmodelInstanceInfoId id,
- BindingTemplate bindingTemplate, String tmodelKey) {
- this.id = id;
+ public TmodelInstanceInfo(BindingTemplate bindingTemplate, String tmodelKey) {
this.bindingTemplate = bindingTemplate;
this.tmodelKey = tmodelKey;
}
- public TmodelInstanceInfo(TmodelInstanceInfoId id,
- BindingTemplate bindingTemplate, String tmodelKey,
+ public TmodelInstanceInfo(BindingTemplate bindingTemplate, String tmodelKey,
String instanceParms,
Set<InstanceDetailsDocDescr> instanceDetailsDocDescrs,
Set<InstanceDetailsDescr> instanceDetailsDescrs,
Set<TmodelInstanceInfoDescr> tmodelInstanceInfoDescrs) {
- this.id = id;
this.bindingTemplate = bindingTemplate;
this.tmodelKey = tmodelKey;
this.instanceParms = instanceParms;
@@ -69,11 +67,12 @@
this.tmodelInstanceInfoDescrs = tmodelInstanceInfoDescrs;
}
- @EmbeddedId
- public TmodelInstanceInfoId getId() {
+ @Id
+ @GeneratedValue(strategy=GenerationType.AUTO)
+ public Long getId() {
return this.id;
}
- public void setId(TmodelInstanceInfoId id) {
+ public void setId(Long id) {
this.id = id;
}
Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelInstanceInfoDescr.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelInstanceInfoDescr.java?rev=726212&r1=726211&r2=726212&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelInstanceInfoDescr.java (original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TmodelInstanceInfoDescr.java Sat Dec 13 06:43:21 2008
@@ -16,11 +16,12 @@
*/
import javax.persistence.Column;
-import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
import javax.persistence.JoinColumn;
-import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@@ -33,7 +34,7 @@
public class TmodelInstanceInfoDescr implements java.io.Serializable {
private static final long serialVersionUID = 1L;
- private TmodelInstanceInfoDescrId id;
+ private Long id;
private TmodelInstanceInfo tmodelInstanceInfo;
private String langCode;
private String descr;
@@ -41,32 +42,27 @@
public TmodelInstanceInfoDescr() {
}
- public TmodelInstanceInfoDescr(TmodelInstanceInfoDescrId id,
- TmodelInstanceInfo tmodelInstanceInfo, String descr) {
- this.id = id;
+ public TmodelInstanceInfoDescr(TmodelInstanceInfo tmodelInstanceInfo, String descr) {
this.tmodelInstanceInfo = tmodelInstanceInfo;
this.descr = descr;
}
- public TmodelInstanceInfoDescr(TmodelInstanceInfoDescrId id,
- TmodelInstanceInfo tmodelInstanceInfo, String langCode, String descr) {
- this.id = id;
+ public TmodelInstanceInfoDescr(TmodelInstanceInfo tmodelInstanceInfo, String langCode, String descr) {
this.tmodelInstanceInfo = tmodelInstanceInfo;
this.langCode = langCode;
this.descr = descr;
}
- @EmbeddedId
- public TmodelInstanceInfoDescrId getId() {
+ @Id
+ @GeneratedValue(strategy=GenerationType.AUTO)
+ public Long getId() {
return this.id;
}
- public void setId(TmodelInstanceInfoDescrId id) {
+ public void setId(Long id) {
this.id = id;
}
@ManyToOne(fetch = FetchType.LAZY)
- @JoinColumns({
- @JoinColumn(name = "entity_key", referencedColumnName = "entity_key", nullable = false, insertable = false, updatable = false),
- @JoinColumn(name = "instance_info_id", referencedColumnName = "instance_info_id", nullable = false, insertable = false, updatable = false)})
+ @JoinColumn(name = "id", nullable = false, insertable = false, updatable = false)
public TmodelInstanceInfo getTmodelInstanceInfo() {
return this.tmodelInstanceInfo;
}
Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TransferTokenKey.java
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TransferTokenKey.java?rev=726212&r1=726211&r2=726212&view=diff
==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TransferTokenKey.java (original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/model/TransferTokenKey.java Sat Dec 13 06:43:21 2008
@@ -16,39 +16,42 @@
*/
import javax.persistence.Column;
-import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
/**
* @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
+ * @author <a href="mailto:kstam@apache.org">Kurt T Stam</a>
*/
@Entity
@Table(name = "transfer_token_keys")
public class TransferTokenKey implements java.io.Serializable {
private static final long serialVersionUID = 1L;
- private TransferTokenKeyId id;
+ private Long id;
private TransferToken transferToken;
private String entityKey;
public TransferTokenKey() {
}
- public TransferTokenKey(TransferTokenKeyId id, TransferToken transferToken, String entityKey) {
- this.id = id;
+ public TransferTokenKey(TransferToken transferToken, String entityKey) {
this.transferToken = transferToken;
this.entityKey = entityKey;
}
- @EmbeddedId
- public TransferTokenKeyId getId() {
+ @Id
+ @GeneratedValue(strategy=GenerationType.AUTO)
+ public Long getId() {
return this.id;
}
- public void setId(TransferTokenKeyId id) {
+ public void setId(Long id) {
this.id = id;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: juddi-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: juddi-cvs-help@ws.apache.org