Author: mdryakhlenkov
Date: 2007-07-02 12:37:05 -0400 (Mon, 02 Jul 2007)
New Revision: 2241
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/Address.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/AddressImpl.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/Mappings.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/Server.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/ServerImpl.java
Log:
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/Address.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/Address.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/Address.java 2007-07-02
16:37:05 UTC (rev 2241)
@@ -0,0 +1,13 @@
+package mapping.abstractembeddedcomponents.propertyref;
+
+/**
+ * @author Steve Ebersole
+ */
+public interface Address {
+ public Long getId();
+ public void setId(Long id);
+ public String getAddressType();
+ public void setAddressType(String addressType);
+ public Server getServer();
+ public void setServer(Server server);
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/AddressImpl.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/AddressImpl.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/AddressImpl.java 2007-07-02
16:37:05 UTC (rev 2241)
@@ -0,0 +1,34 @@
+package mapping.abstractembeddedcomponents.propertyref;
+
+/**
+ * @author Steve Ebersole
+ */
+public class AddressImpl implements Address {
+ private Long id;
+ private String addressType;
+ private Server server;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getAddressType() {
+ return addressType;
+ }
+
+ public void setAddressType(String addressType) {
+ this.addressType = addressType;
+ }
+
+ public Server getServer() {
+ return server;
+ }
+
+ public void setServer(Server server) {
+ this.server = server;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/Mappings.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/Mappings.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/Mappings.hbm.xml 2007-07-02
16:37:05 UTC (rev 2241)
@@ -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">
+
+<hibernate-mapping
package="mapping.abstractembeddedcomponents.propertyref">
+
+ <class name="Address" table="ADDRESS"
proxy="Address">
+ <id name="id" type="long"
column="ADDRESS_ID">
+ <generator class="native"/>
+ </id>
+ <discriminator column="ADDRESS_TYPE" type="string"
length="30"/>
+ <properties name="uniqueAddress">
+ <property name="addressType" column="ADDRESS_TYPE"
type="string" insert="false" update="false"
length="30"/>
+ <many-to-one name="server" column="SERVER_ID"
class="Server" not-null="true"/>
+ </properties>
+ </class>
+
+ <subclass name="AddressImpl" extends="Address"
discriminator-value="2" proxy="Address">
+ </subclass>
+
+ <class name="Server" table="SERVER"
proxy="Server">
+ <id name="id" type="long"
column="SERVER_ID">
+ <generator class="native"/>
+ </id>
+ <discriminator column="SERVER_TYPE" type="string"
length="10"/>
+ <property name="serverType" type="string"
column="SERVER_TYPE" length="10" update="false"
insert="false"/>
+ </class>
+
+ <subclass name="ServerImpl" extends="Server"
discriminator-value="1" proxy="Server">
+ <many-to-one name="address"
+ class="AddressImpl"
+ property-ref="uniqueAddress"
+ cascade="all"
+ unique="true"
+ update="false"
+ insert="false">
+ <column name="ADDRESS_TYPE"/>
+ <column name="SERVER_ID"/>
+ </many-to-one>
+ </subclass>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/Server.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/Server.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/Server.java 2007-07-02
16:37:05 UTC (rev 2241)
@@ -0,0 +1,13 @@
+package mapping.abstractembeddedcomponents.propertyref;
+
+/**
+ * @author Steve Ebersole
+ */
+public interface Server {
+ public Long getId();
+ public void setId(Long id);
+ public String getServerType();
+ public void setServerType(String serverType);
+ public Address getAddress();
+ public void setAddress(Address address);
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/ServerImpl.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/ServerImpl.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/abstractembeddedcomponents/propertyref/ServerImpl.java 2007-07-02
16:37:05 UTC (rev 2241)
@@ -0,0 +1,35 @@
+package mapping.abstractembeddedcomponents.propertyref;
+
+
+/**
+ * @author Steve Ebersole
+ */
+public class ServerImpl implements Server {
+ private Long id;
+ private String serverType;
+ private Address address;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getServerType() {
+ return serverType;
+ }
+
+ public void setServerType(String serverType) {
+ this.serverType = serverType;
+ }
+
+ public Address getAddress() {
+ return address;
+ }
+
+ public void setAddress(Address address) {
+ this.address = address;
+ }
+}
Show replies by date