Author: mdryakhlenkov
Date: 2007-07-26 12:18:37 -0400 (Thu, 26 Jul 2007)
New Revision: 2687
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/nopojo/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Address.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Entity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Org.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Person.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Address.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Entity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Org.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Person.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Address.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Competition.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Competition.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Competitor.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Employee.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Employer.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Node.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Node.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/NumberedNode.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/OneToOne.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/OptLockEntity.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Person.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/PersonalDetails.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/TimestampedEntity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/VersionedEntity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/optlock/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/optlock/Document.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/optlock/PublicationDate.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ordered/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ordered/Search.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Mail.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Mail.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Part.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Product.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Product.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/User.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/pagination/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/pagination/DataPoint.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Account.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Address.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Group.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Person.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/complete/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/complete/Account.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/complete/Identity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/complete/Person.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/partial/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/partial/Account.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/partial/Identity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/partial/Person.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/inheritence/discrim/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/inheritence/discrim/Account.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/inheritence/discrim/Customer.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/inheritence/discrim/Person.java
Log:
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Address.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Address.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Address.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,15 @@
+package mapping.onetoone.optional;
+
+/**
+ * @author Gavin King
+ */
+public class Address {
+ public String entityName;
+ public String street;
+ public String state;
+ public String zip;
+
+ public String toString() {
+ return this.getClass() + ":" + street;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Entity.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Entity.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Entity.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,8 @@
+package mapping.onetoone.optional;
+
+/**
+ * @author Gavin King
+ */
+public class Entity {
+ public String name;
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Org.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Org.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Org.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,8 @@
+package mapping.onetoone.optional;
+
+
+/**
+ * @author Gavin King
+ */
+public class Org extends Entity {
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Person.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Person.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/optional/Person.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,9 @@
+package mapping.onetoone.optional;
+
+/**
+ * @author Gavin King
+ */
+public class Person extends Entity {
+ public Address address;
+ public Address mailingAddress;
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Address.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Address.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Address.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,12 @@
+//$Id: Address.java 5686 2005-02-12 07:27:32Z steveebersole $
+package mapping.onetoone.singletable;
+
+/**
+ * @author Gavin King
+ */
+public class Address {
+ public String entityName;
+ public String street;
+ public String state;
+ public String zip;
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Entity.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Entity.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Entity.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,9 @@
+//$Id: Entity.java 5686 2005-02-12 07:27:32Z steveebersole $
+package mapping.onetoone.singletable;
+
+/**
+ * @author Gavin King
+ */
+public class Entity {
+ public String name;
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Org.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Org.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Org.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,12 @@
+//$Id: Org.java 5686 2005-02-12 07:27:32Z steveebersole $
+package mapping.onetoone.singletable;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Gavin King
+ */
+public class Org extends Entity {
+ public Set addresses = new HashSet();
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Person.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Person.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/onetoone/singletable/Person.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,10 @@
+//$Id: Person.java 5686 2005-02-12 07:27:32Z steveebersole $
+package mapping.onetoone.singletable;
+
+/**
+ * @author Gavin King
+ */
+public class Person extends Entity {
+ public Address address;
+ public Address mailingAddress;
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Address.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Address.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Address.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,65 @@
+package mapping.ops;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class Address {
+ private Long id;
+ private String streetAddress;
+ private String city;
+ private String country;
+ private Person resident;
+
+ public Address() {
+ }
+
+ public Address(String streetAddress, String city, String country, Person resident) {
+ this.streetAddress = streetAddress;
+ this.city = city;
+ this.country = country;
+ this.resident = resident;
+ resident.setAddress( this );
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getStreetAddress() {
+ return streetAddress;
+ }
+
+ public void setStreetAddress(String streetAddress) {
+ this.streetAddress = streetAddress;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public String getCountry() {
+ return country;
+ }
+
+ public void setCountry(String country) {
+ this.country = country;
+ }
+
+ public Person getResident() {
+ return resident;
+ }
+
+ public void setResident(Person resident) {
+ this.resident = resident;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Competition.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Competition.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Competition.hbm.xml 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+
+-->
+
+<hibernate-mapping package="mapping.ops">
+
+ <class name="Competition">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <list name="competitors" table="COMPET_ION_OR"
cascade="persist,merge,delete">
+ <key column="TION_ID"/>
+ <list-index column="INDEX_COL"/>
+ <many-to-many class="Competitor" column="TOR_ID" />
+ </list>
+ </class>
+
+ <class name="Competitor">
+ <id name="id">
+ <generator class="native"/>
+ </id>
+ <property name="name"/>
+ </class>
+
+</hibernate-mapping>
+
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Competition.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Competition.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Competition.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,31 @@
+//$Id: $
+package mapping.ops;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class Competition {
+ private Integer id;
+
+ private List competitors = new ArrayList();
+
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public List getCompetitors() {
+ return competitors;
+ }
+
+ public void setCompetitors(List competitors) {
+ this.competitors = competitors;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Competitor.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Competitor.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Competitor.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,34 @@
+//$Id: $
+package mapping.ops;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class Competitor {
+ public Integer id;
+ private String name;
+
+
+ public Competitor() {
+ }
+
+ public Competitor(String name) {
+ this.name = name;
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Employee.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Employee.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Employee.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,35 @@
+//$Id: Employee.java 5686 2005-02-12 07:27:32Z steveebersole $
+package mapping.ops;
+
+import java.util.Collection;
+import java.io.Serializable;
+
+
+/**
+ * Employee in an Employer-Employee relationship
+ *
+ * @author Emmanuel Bernard
+ */
+
+public class Employee implements Serializable {
+ private Integer id;
+ private Collection employers;
+
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer integer) {
+ id = integer;
+ }
+
+
+ public Collection getEmployers() {
+ return employers;
+ }
+
+ public void setEmployers(Collection employers) {
+ this.employers = employers;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Employer.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Employer.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Employer.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,44 @@
+//$Id: Employer.java 8670 2005-11-25 17:36:29Z epbernard $
+package mapping.ops;
+
+import java.util.Collection;
+import java.io.Serializable;
+
+
+/**
+ * Employer in a employer-Employee relationship
+ *
+ * @author Emmanuel Bernard
+ */
+
+public class Employer implements Serializable {
+ private Integer id;
+ private Collection employees;
+ private Integer vers;
+
+ public Integer getVers() {
+ return vers;
+ }
+
+ public void setVers(Integer vers) {
+ this.vers = vers;
+ }
+
+
+ public Collection getEmployees() {
+ return employees;
+ }
+
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setEmployees(Collection set) {
+ employees = set;
+ }
+
+ public void setId(Integer integer) {
+ id = integer;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Node.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Node.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Node.hbm.xml 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+
+-->
+
+<hibernate-mapping package="mapping.ops">
+
+ <class name="Node" polymorphism="explicit">
+ <id name="name">
+ <generator class="assigned"/>
+ </id>
+ <property name="description"/>
+ <many-to-one name="parent"/>
+ <property name="created" not-null="true"/>
+ <set name="children"
+ inverse="true"
+ cascade="persist,merge,save-update,evict">
+ <key column="parent"/>
+ <one-to-many class="Node"/>
+ </set>
+ <set name="cascadingChildren" inverse="false"
cascade="persist,merge,save-update,evict,delete">
+ <key column="CASC_PARENT"/>
+ <one-to-many class="Node"/>
+ </set>
+ </class>
+
+ <class name="NumberedNode" polymorphism="explicit">
+ <id name="id" unsaved-value="0">
+ <generator class="native"/>
+ </id>
+ <property name="name">
+ <column name="name" index="iname"
not-null="true"/>
+ </property>
+ <property name="description"/>
+ <property name="created" not-null="true"
+ type="imm_date"/>
+ <many-to-one name="parent" class="NumberedNode"/>
+ <set name="children"
+ inverse="true"
+ cascade="persist,merge,save-update">
+ <key column="parent"/>
+ <one-to-many class="NumberedNode"/>
+ </set>
+ </class>
+
+</hibernate-mapping>
+
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Node.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Node.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Node.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,88 @@
+//$Id: Node.java 10760 2006-11-08 00:01:34Z steve.ebersole(a)jboss.com $
+package mapping.ops;
+
+import java.sql.Date;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Gavin King
+ */
+public class Node {
+
+ private String name;
+ private String description;
+ private Date created;
+ private Node parent;
+ private Set children = new HashSet();
+ private Set cascadingChildren = new HashSet();
+
+ public Node() {
+ }
+
+ public Node(String name) {
+ this.name = name;
+ created = generateCurrentDate();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Date getCreated() {
+ return created;
+ }
+
+ public void setCreated(Date created) {
+ this.created = created;
+ }
+
+ public Node getParent() {
+ return parent;
+ }
+
+ public void setParent(Node parent) {
+ this.parent = parent;
+ }
+
+ public Set getChildren() {
+ return children;
+ }
+
+ public void setChildren(Set children) {
+ this.children = children;
+ }
+
+ public Node addChild(Node child) {
+ children.add( child );
+ child.setParent( this );
+ return this;
+ }
+
+ public Set getCascadingChildren() {
+ return cascadingChildren;
+ }
+
+ public void setCascadingChildren(Set cascadingChildren) {
+ this.cascadingChildren = cascadingChildren;
+ }
+
+ private Date generateCurrentDate() {
+ // Note : done as java.sql.Date mainly to work around issue with
+ // MySQL and its lack of milli-second precision on its DATETIME
+ // and TIMESTAMP datatypes.
+ return new Date( new java.util.Date().getTime() );
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/NumberedNode.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/NumberedNode.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/NumberedNode.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,75 @@
+//$Id: NumberedNode.java 7236 2005-06-20 03:19:34Z oneovthafew $
+package mapping.ops;
+
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Gavin King
+ */
+public class NumberedNode {
+
+ private long id;
+ private String name;
+ private NumberedNode parent;
+ private Set children = new HashSet();
+ private String description;
+ private Date created;
+
+ public NumberedNode() {
+ super();
+ }
+
+ public NumberedNode(String name) {
+ this.name = name;
+ created = new Date();
+ }
+
+ public long getId() {
+ return id;
+ }
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public Set getChildren() {
+ return children;
+ }
+ public void setChildren(Set children) {
+ this.children = children;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public NumberedNode getParent() {
+ return parent;
+ }
+ public void setParent(NumberedNode parent) {
+ this.parent = parent;
+ }
+
+ public NumberedNode addChild(NumberedNode child) {
+ children.add(child);
+ child.setParent(this);
+ return this;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Date getCreated() {
+ return created;
+ }
+
+ public void setCreated(Date created) {
+ this.created = created;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/OneToOne.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/OneToOne.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/OneToOne.hbm.xml 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+ Mappings demonstrating bidirectional one-to-one mappings for testing
+ with various operations.
+
+ Person -> Address is modeled as a bidirectional one to one based on FK.
+ Person -> Details is modeled as a bidirectional one to one based on PK.
+-->
+
+<hibernate-mapping package="mapping.ops">
+
+ <class name="Person" table="OPS_PERSON">
+ <id name="id" column="ID" type="long">
+ <generator class="increment"/>
+ </id>
+ <property name="name" column="NAME"
type="string"/>
+ <one-to-one name="address" class="Address"
property-ref="resident" />
+ <one-to-one name="details" class="PersonalDetails"
cascade="all" />
+ </class>
+
+ <class name="Address" table="OPS_ADDRESS">
+ <id name="id" column="ID" type="long">
+ <generator class="increment"/>
+ </id>
+ <property name="streetAddress" column="STREET"
type="string" />
+ <property name="city" column="CITY"
type="string" />
+ <property name="country" column="CTRY"
type="string" />
+ <many-to-one name="resident" column="RESIDENT"
class="Person" />
+ </class>
+
+ <class name="PersonalDetails" table="OPS_PERS_DETAIL">
+ <id name="id" column="ID" type="long">
+ <generator class="increment"/>
+ </id>
+ <property name="somePersonalDetail" column="SOME_DETAIL"
type="string"/>
+ <one-to-one name="person" class="Person"
cascade="none" constrained="true" />
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/OptLockEntity.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/OptLockEntity.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/OptLockEntity.hbm.xml 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+
+-->
+
+<hibernate-mapping package="mapping.ops">
+
+ <class name="VersionedEntity" table="V_ENTITY">
+ <id name="id" column="ID" type="string">
+ <generator class="assigned"/>
+ </id>
+ <version name="version" column="VERS"
type="long" />
+ <property name="name" column="NAME"
type="string" />
+ <many-to-one name="parent" class="VersionedEntity"/>
+ <set name="children"
+ inverse="true"
+ cascade="persist,merge,save-update,evict,delete">
+ <key column="parent"/>
+ <one-to-many class="VersionedEntity"/>
+ </set>
+ </class>
+
+ <class name="TimestampedEntity" table="T_ENTITY">
+ <id name="id" column="ID" type="string">
+ <generator class="assigned"/>
+ </id>
+ <timestamp name="timestamp" column="TS" />
+ <property name="name" column="NAME"
type="string" />
+ </class>
+
+</hibernate-mapping>
+
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Person.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Person.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/Person.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,52 @@
+package mapping.ops;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class Person {
+ private Long id;
+ private String name;
+ private Address address;
+ private PersonalDetails details;
+
+ public Person() {
+ }
+
+ public Person(String name) {
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Address getAddress() {
+ return address;
+ }
+
+ public void setAddress(Address address) {
+ this.address = address;
+ }
+
+ public PersonalDetails getDetails() {
+ return details;
+ }
+
+ public void setDetails(PersonalDetails details) {
+ this.details = details;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/PersonalDetails.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/PersonalDetails.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/PersonalDetails.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,45 @@
+package mapping.ops;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class PersonalDetails {
+ private Long id;
+ private String somePersonalDetail;
+ private Person person;
+
+ public PersonalDetails() {
+ }
+
+ public PersonalDetails(String somePersonalDetail, Person person) {
+ this.somePersonalDetail = somePersonalDetail;
+ this.person = person;
+ person.setDetails( this );
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getSomePersonalDetail() {
+ return somePersonalDetail;
+ }
+
+ public void setSomePersonalDetail(String somePersonalDetail) {
+ this.somePersonalDetail = somePersonalDetail;
+ }
+
+ public Person getPerson() {
+ return person;
+ }
+
+ public void setPerson(Person person) {
+ this.person = person;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/TimestampedEntity.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/TimestampedEntity.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/TimestampedEntity.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,47 @@
+package mapping.ops;
+
+import java.util.Date;
+
+/**
+ * todo: describe TimestampedEntity
+ *
+ * @author Steve Ebersole
+ */
+public class TimestampedEntity {
+ private String id;
+ private String name;
+ private Date timestamp;
+
+ public TimestampedEntity() {
+ }
+
+ public TimestampedEntity(String id, String name) {
+ this.id = id;
+ this.name = name;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+}
+
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/VersionedEntity.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/VersionedEntity.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ops/VersionedEntity.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,66 @@
+package mapping.ops;
+
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * VersionedEntity
+ *
+ * @author Steve Ebersole
+ */
+public class VersionedEntity {
+ private String id;
+ private String name;
+ private long version;
+
+ private VersionedEntity parent;
+ private Set children = new HashSet();
+
+ public VersionedEntity() {
+ }
+
+ public VersionedEntity(String id, String name) {
+ this.id = id;
+ this.name = name;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public long getVersion() {
+ return version;
+ }
+
+ public void setVersion(long version) {
+ this.version = version;
+ }
+
+ public VersionedEntity getParent() {
+ return parent;
+ }
+
+ public void setParent(VersionedEntity parent) {
+ this.parent = parent;
+ }
+
+ public Set getChildren() {
+ return children;
+ }
+
+ public void setChildren(Set children) {
+ this.children = children;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/optlock/Document.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/optlock/Document.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/optlock/Document.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,87 @@
+//$Id: Document.java 7552 2005-07-19 18:51:24Z oneovthafew $
+package mapping.optlock;
+
+/**
+ * @author Gavin King
+ */
+public class Document {
+ private Long id;
+ private String author;
+ private String title;
+ private String summary;
+ private String text;
+ private PublicationDate pubDate;
+ private int totalSales;
+ /**
+ * @return Returns the author.
+ */
+ public String getAuthor() {
+ return author;
+ }
+ /**
+ * @param author The author to set.
+ */
+ public void setAuthor(String author) {
+ this.author = author;
+ }
+ /**
+ * @return Returns the id.
+ */
+ public Long getId() {
+ return id;
+ }
+ /**
+ * @param id The id to set.
+ */
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * @return Returns the summary.
+ */
+ public String getSummary() {
+ return summary;
+ }
+ /**
+ * @param summary The summary to set.
+ */
+ public void setSummary(String summary) {
+ this.summary = summary;
+ }
+ /**
+ * @return Returns the text.
+ */
+ public String getText() {
+ return text;
+ }
+ /**
+ * @param text The text to set.
+ */
+ public void setText(String text) {
+ this.text = text;
+ }
+ /**
+ * @return Returns the title.
+ */
+ public String getTitle() {
+ return title;
+ }
+ /**
+ * @param title The title to set.
+ */
+ public void setTitle(String title) {
+ this.title = title;
+ }
+ public PublicationDate getPubDate() {
+ return pubDate;
+ }
+ public void setPubDate(PublicationDate pubDate) {
+ this.pubDate = pubDate;
+ }
+ public int getTotalSales() {
+ return totalSales;
+ }
+ public void setTotalSales(int totalSales) {
+ this.totalSales = totalSales;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/optlock/PublicationDate.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/optlock/PublicationDate.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/optlock/PublicationDate.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,26 @@
+//$Id: PublicationDate.java 7556 2005-07-19 23:22:27Z oneovthafew $
+package mapping.optlock;
+
+public class PublicationDate {
+ private int year;
+ private Integer month;
+
+ public PublicationDate(int year) {
+ this.year = year;
+ }
+
+ PublicationDate() {}
+
+ public Integer getMonth() {
+ return month;
+ }
+ public void setMonth(Integer month) {
+ this.month = month;
+ }
+ public int getYear() {
+ return year;
+ }
+ public void setYear(int year) {
+ this.year = year;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ordered/Search.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ordered/Search.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/ordered/Search.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,29 @@
+//$Id: Search.java 7772 2005-08-05 23:03:46Z oneovthafew $
+package mapping.ordered;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class Search {
+ private String searchString;
+ private Set searchResults = new HashSet();
+
+ Search() {}
+
+ public Search(String string) {
+ searchString = string;
+ }
+
+ public Set getSearchResults() {
+ return searchResults;
+ }
+ public void setSearchResults(Set searchResults) {
+ this.searchResults = searchResults;
+ }
+ public String getSearchString() {
+ return searchString;
+ }
+ public void setSearchString(String searchString) {
+ this.searchString = searchString;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Mail.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Mail.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Mail.hbm.xml 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ '-//Hibernate/Hibernate Mapping DTD 3.0//EN'
+ 'http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd'>
+
+<hibernate-mapping package="mapping.orphan" >
+
+ <class name="Mail" table="t_mail">
+
+ <id name="id" type="integer" column="id">
+ <generator class="native" />
+ </id>
+
+ <property name="alias">
+ <column name="alias" length="20"/>
+ </property>
+
+ <many-to-one name="user"
+ class="User"
+ cascade="save-update"
+ column="userid"
+ not-null="true"
+ property-ref="userid"/>
+
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Mail.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Mail.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Mail.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,41 @@
+package mapping.orphan;
+
+public class Mail {
+
+ private Integer id;
+ private String alias;
+ private User user;
+
+ /*package*/ Mail() {
+ }
+
+ /*package*/ Mail(String alias, User user) {
+ this.alias = alias;
+ this.user = user;
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ protected void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getAlias() {
+ return alias;
+ }
+
+ public void setAlias(String alias) {
+ this.alias = alias;
+ }
+
+ public User getUser() {
+ return user;
+ }
+
+ public void setUser(User user) {
+ this.user = user;
+ }
+
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Part.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Part.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Part.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,24 @@
+//$Id: Part.java 5725 2005-02-14 12:10:15Z oneovthafew $
+package mapping.orphan;
+
+import java.io.Serializable;
+
+/**
+ * @author Gavin King
+ */
+public class Part implements Serializable {
+ private String name;
+ private String description;
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Product.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Product.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Product.hbm.xml 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+
+
+-->
+
+<hibernate-mapping package="mapping.orphan">
+
+ <class name="Product" table="t_product">
+ <id name="name"/>
+ <set name="parts" cascade="all,delete-orphan"
fetch="join">
+ <key column="productName" not-null="true"/>
+ <one-to-many class="Part"/>
+ </set>
+ </class>
+
+ <class name="Part" table="t_part">
+ <id name="name"/>
+ <property name="description" not-null="true"/>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Product.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Product.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/Product.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,26 @@
+//$Id: Product.java 5725 2005-02-14 12:10:15Z oneovthafew $
+package mapping.orphan;
+
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Gavin King
+ */
+public class Product implements Serializable {
+ private String name;
+ private Set parts = new HashSet();
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public Set getParts() {
+ return parts;
+ }
+ public void setParts(Set parts) {
+ this.parts = parts;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/User.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/User.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/orphan/User.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,62 @@
+/*
+ * User.java
+ *
+ * Created on May 3, 2005, 9:42 AM
+ */
+
+package mapping.orphan;
+
+import java.util.HashSet;
+import java.util.Set;
+
+
+/**
+ * @author Kevin
+ */
+public class User {
+
+ private Integer id;
+ private String userid;
+ private Set mail = new HashSet();
+
+ public User() {
+ }
+
+ public User(String userid) {
+ this.userid = userid;
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ protected void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getUserid() {
+ return userid;
+ }
+
+ public void setUserid(String userid) {
+ this.userid = userid;
+ }
+
+ public Set getMail() {
+ return mail;
+ }
+
+ private void setMail(Set mail) {
+ this.mail = mail;
+ }
+
+ public Mail addMail(String alias) {
+ Mail mail = new Mail( alias, this );
+ getMail().add( mail );
+ return mail;
+ }
+
+ public void removeMail(Mail mail) {
+ getMail().remove( mail );
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/pagination/DataPoint.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/pagination/DataPoint.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/pagination/DataPoint.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,62 @@
+//$Id: DataPoint.java 7867 2005-08-11 23:35:33Z oneovthafew $
+package mapping.pagination;
+
+import java.math.BigDecimal;
+
+/**
+ * @author Gavin King
+ */
+public class DataPoint {
+ private long id;
+ private BigDecimal x;
+ private BigDecimal y;
+ private String description;
+ /**
+ * @return Returns the description.
+ */
+ public String getDescription() {
+ return description;
+ }
+ /**
+ * @param description The description to set.
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ /**
+ * @return Returns the id.
+ */
+ public long getId() {
+ return id;
+ }
+ /**
+ * @param id The id to set.
+ */
+ public void setId(long id) {
+ this.id = id;
+ }
+ /**
+ * @return Returns the x.
+ */
+ public BigDecimal getX() {
+ return x;
+ }
+ /**
+ * @param x The x to set.
+ */
+ public void setX(BigDecimal x) {
+ this.x = x;
+ }
+ /**
+ * @return Returns the y.
+ */
+ public BigDecimal getY() {
+ return y;
+ }
+ /**
+ * @param y The y to set.
+ */
+ public void setY(BigDecimal y) {
+ this.y = y;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Account.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Account.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Account.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,48 @@
+//$Id: Account.java 10921 2006-12-05 14:39:12Z steve.ebersole(a)jboss.com $
+package mapping.propertyref.basic;
+
+/**
+ * @author Gavin King
+ */
+public class Account {
+ private String accountId;
+ private Person user;
+ private char type;
+ /**
+ * @return Returns the user.
+ */
+ public Person getUser() {
+ return user;
+ }
+ /**
+ * @param user The user to set.
+ */
+ public void setUser(Person user) {
+ this.user = user;
+ }
+ /**
+ * @return Returns the accountId.
+ */
+ public String getAccountId() {
+ return accountId;
+ }
+ /**
+ * @param accountId The accountId to set.
+ */
+ public void setAccountId(String accountId) {
+ this.accountId = accountId;
+ }
+ /**
+ * @return Returns the type.
+ */
+ public char getType() {
+ return type;
+ }
+ /**
+ * @param type The type to set.
+ */
+ public void setType(char type) {
+ this.type = type;
+ }
+
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Address.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Address.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Address.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,73 @@
+//$Id: Address.java 10921 2006-12-05 14:39:12Z steve.ebersole(a)jboss.com $
+package mapping.propertyref.basic;
+
+/**
+ * @author gavin
+ */
+public class Address {
+ private Long id;
+ private String address;
+ private String zip;
+ private String country;
+ private Person person;
+ /**
+ * @return Returns the id.
+ */
+ public Long getId() {
+ return id;
+ }
+ /**
+ * @param id The id to set.
+ */
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * @return Returns the person.
+ */
+ public Person getPerson() {
+ return person;
+ }
+ /**
+ * @param person The person to set.
+ */
+ public void setPerson(Person person) {
+ this.person = person;
+ }
+ /**
+ * @return Returns the address.
+ */
+ public String getAddress() {
+ return address;
+ }
+ /**
+ * @param address The address to set.
+ */
+ public void setAddress(String address) {
+ this.address = address;
+ }
+ /**
+ * @return Returns the country.
+ */
+ public String getCountry() {
+ return country;
+ }
+ /**
+ * @param country The country to set.
+ */
+ public void setCountry(String country) {
+ this.country = country;
+ }
+ /**
+ * @return Returns the zip.
+ */
+ public String getZip() {
+ return zip;
+ }
+ /**
+ * @param zip The zip to set.
+ */
+ public void setZip(String zip) {
+ this.zip = zip;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Group.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Group.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Group.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,23 @@
+//$Id: Group.java 10921 2006-12-05 14:39:12Z steve.ebersole(a)jboss.com $
+package mapping.propertyref.basic;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class Group {
+ private String name;
+ private Set users = new HashSet();
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public Set getUsers() {
+ return users;
+ }
+ public void setUsers(Set users) {
+ this.users = users;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Person.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Person.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/basic/Person.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,88 @@
+//$Id: Person.java 10949 2006-12-07 21:53:41Z steve.ebersole(a)jboss.com $
+package mapping.propertyref.basic;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author gavin
+ */
+public class Person {
+ private Long id;
+ private String name;
+ private Address address;
+ private String userId;
+ private Set accounts = new HashSet();
+ private List systems = new ArrayList();
+
+ /**
+ * @return Returns the userId.
+ */
+ public String getUserId() {
+ return userId;
+ }
+ /**
+ * @param userId The userId to set.
+ */
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+ /**
+ * @return Returns the address.
+ */
+ public Address getAddress() {
+ return address;
+ }
+ /**
+ * @param address The address to set.
+ */
+ public void setAddress(Address address) {
+ this.address = address;
+ }
+ /**
+ * @return Returns the id.
+ */
+ public Long getId() {
+ return id;
+ }
+ /**
+ * @param id The id to set.
+ */
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * @return Returns the name.
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * @return Returns the accounts.
+ */
+ public Set getAccounts() {
+ return accounts;
+ }
+ /**
+ * @param accounts The accounts to set.
+ */
+ public void setAccounts(Set accounts) {
+ this.accounts = accounts;
+ }
+
+ public List getSystems() {
+ return systems;
+ }
+
+ public void setSystems(List systems) {
+ this.systems = systems;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/complete/Account.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/complete/Account.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/complete/Account.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,23 @@
+package mapping.propertyref.component.complete;
+
+
+public class Account {
+ private String number;
+ private Person owner;
+
+ public Person getOwner() {
+ return owner;
+ }
+
+ public void setOwner(Person owner) {
+ this.owner = owner;
+ }
+
+ public String getNumber() {
+ return number;
+ }
+
+ public void setNumber(String number) {
+ this.number = number;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/complete/Identity.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/complete/Identity.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/complete/Identity.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,21 @@
+package mapping.propertyref.component.complete;
+
+import java.io.Serializable;
+
+public class Identity implements Serializable {
+ private String name;
+ private String ssn;
+
+ public String getSsn() {
+ return ssn;
+ }
+ public void setSsn(String id) {
+ this.ssn = id;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/complete/Person.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/complete/Person.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/complete/Person.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,20 @@
+package mapping.propertyref.component.complete;
+
+
+public class Person {
+ private Long id;
+ private Identity identity;
+
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ public Identity getIdentity() {
+ return identity;
+ }
+ public void setIdentity(Identity identity) {
+ this.identity = identity;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/partial/Account.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/partial/Account.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/partial/Account.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,23 @@
+//$Id: Account.java 10921 2006-12-05 14:39:12Z steve.ebersole(a)jboss.com $
+package mapping.propertyref.component.partial;
+
+public class Account {
+ private String number;
+ private Person owner;
+
+ public Person getOwner() {
+ return owner;
+ }
+
+ public void setOwner(Person owner) {
+ this.owner = owner;
+ }
+
+ public String getNumber() {
+ return number;
+ }
+
+ public void setNumber(String number) {
+ this.number = number;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/partial/Identity.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/partial/Identity.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/partial/Identity.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,20 @@
+//$Id: Identity.java 10921 2006-12-05 14:39:12Z steve.ebersole(a)jboss.com $
+package mapping.propertyref.component.partial;
+
+public class Identity {
+ private String name;
+ private String ssn;
+
+ public String getSsn() {
+ return ssn;
+ }
+ public void setSsn(String id) {
+ this.ssn = id;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/partial/Person.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/partial/Person.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/component/partial/Person.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,20 @@
+//$Id: Person.java 10921 2006-12-05 14:39:12Z steve.ebersole(a)jboss.com $
+package mapping.propertyref.component.partial;
+
+public class Person {
+ private Long id;
+ private Identity identity;
+
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ public Identity getIdentity() {
+ return identity;
+ }
+ public void setIdentity(Identity identity) {
+ this.identity = identity;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/inheritence/discrim/Account.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/inheritence/discrim/Account.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/inheritence/discrim/Account.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,57 @@
+//$Id: Account.java 10921 2006-12-05 14:39:12Z steve.ebersole(a)jboss.com $
+package mapping.propertyref.inheritence.discrim;
+
+/**
+ * @author Gavin King
+ */
+public class Account {
+ private String accountId;
+ private Customer customer;
+ private Person person;
+ private char type;
+ /**
+ * @return Returns the user.
+ */
+ public Customer getCustomer() {
+ return customer;
+ }
+ /**
+ * @param user The user to set.
+ */
+ public void setCustomer(Customer user) {
+ this.customer = user;
+ }
+ /**
+ * @return Returns the accountId.
+ */
+ public String getAccountId() {
+ return accountId;
+ }
+ /**
+ * @param accountId The accountId to set.
+ */
+ public void setAccountId(String accountId) {
+ this.accountId = accountId;
+ }
+ /**
+ * @return Returns the type.
+ */
+ public char getType() {
+ return type;
+ }
+ /**
+ * @param type The type to set.
+ */
+ public void setType(char type) {
+ this.type = type;
+ }
+ public Person getPerson() {
+ return person;
+ }
+
+ public void setPerson(Person person) {
+ this.person = person;
+ }
+
+
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/inheritence/discrim/Customer.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/inheritence/discrim/Customer.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/inheritence/discrim/Customer.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,18 @@
+//$Id: Customer.java 10921 2006-12-05 14:39:12Z steve.ebersole(a)jboss.com $
+package mapping.propertyref.inheritence.discrim;
+
+/**
+ * @author Gavin King
+ */
+public class Customer extends Person {
+ private String customerId;
+
+ public String getCustomerId() {
+ return customerId;
+ }
+
+ public void setCustomerId(String customerId) {
+ this.customerId = customerId;
+ }
+
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/inheritence/discrim/Person.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/inheritence/discrim/Person.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/propertyref/inheritence/discrim/Person.java 2007-07-26
16:18:37 UTC (rev 2687)
@@ -0,0 +1,44 @@
+//$Id: Person.java 10921 2006-12-05 14:39:12Z steve.ebersole(a)jboss.com $
+package mapping.propertyref.inheritence.discrim;
+
+
+/**
+ * @author gavin
+ */
+public class Person {
+ private Long id;
+ private String name;
+ private String personId;
+ /**
+ * @return Returns the id.
+ */
+ public Long getId() {
+ return id;
+ }
+ /**
+ * @param id The id to set.
+ */
+ public void setId(Long id) {
+ this.id = id;
+ }
+ /**
+ * @return Returns the name.
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getPersonId() {
+ return personId;
+ }
+
+ public void setPersonId(String personId) {
+ this.personId = personId;
+ }
+
+}