Author: dgeraskov
Date: 2008-01-15 09:46:54 -0500 (Tue, 15 Jan 2008)
New Revision: 5700
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Address.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/AddressImpl.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Mappings.hbm.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Server.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/ServerImpl.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/ComplexPropertyValue.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/IntegerPropertyValue.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/Person.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/PropertySet.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/PropertyValue.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/StringPropertyValue.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/array/A.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batch/DataPoint.hbm.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batchfetch/Model.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batchfetch/ProductLine.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/bytecode/BeanReflectionHelper.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cache/Item.hbm.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cache/Item.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/Job.hbm.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/Job.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/JobBatch.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/LineItem.hbm.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/LineItem.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/Product.hbm.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/Product.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1571
project files
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Address.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Address.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Address.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -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);
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Address.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/AddressImpl.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/AddressImpl.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/AddressImpl.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -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;
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/AddressImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Mappings.hbm.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Mappings.hbm.xml
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Mappings.hbm.xml 2008-01-15
14:46:54 UTC (rev 5700)
@@ -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>
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Mappings.hbm.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Server.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Server.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Server.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -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);
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/Server.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/ServerImpl.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/ServerImpl.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/ServerImpl.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -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;
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/abstractembeddedcomponents/propertyref/ServerImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/ComplexPropertyValue.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/ComplexPropertyValue.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/ComplexPropertyValue.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,47 @@
+package mapping.any;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Iterator;
+
+/**
+ * todo: describe ${NAME}
+ *
+ * @author Steve Ebersole
+ */
+public class ComplexPropertyValue implements PropertyValue {
+ private Long id;
+ private Map subProperties = new HashMap();
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public Map getSubProperties() {
+ return subProperties;
+ }
+
+ public void setSubProperties(Map subProperties) {
+ this.subProperties = subProperties;
+ }
+
+ public String asString() {
+ return "complex[" + keyString() + "]";
+ }
+
+ private String keyString() {
+ StringBuffer buff = new StringBuffer();
+ Iterator itr = subProperties.keySet().iterator();
+ while ( itr.hasNext() ) {
+ buff.append( itr.next() );
+ if ( itr.hasNext() ) {
+ buff.append( ", " );
+ }
+ }
+ return buff.toString();
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/ComplexPropertyValue.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/IntegerPropertyValue.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/IntegerPropertyValue.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/IntegerPropertyValue.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,38 @@
+package mapping.any;
+
+/**
+ * todo: describe IntegerPropertyValue
+ *
+ * @author Steve Ebersole
+ */
+public class IntegerPropertyValue implements PropertyValue {
+ private Long id;
+ private int value;
+
+ public IntegerPropertyValue() {
+ }
+
+ public IntegerPropertyValue(int value) {
+ this.value = value;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ }
+
+ public String asString() {
+ return Integer.toString( value );
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/IntegerPropertyValue.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/Person.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/Person.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/Person.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,37 @@
+package mapping.any;
+
+/**
+ * todo: describe Person
+ *
+ * @author Steve Ebersole
+ */
+public class Person {
+ private Long id;
+ private String name;
+ private Object data;
+
+
+ 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 Object getData() {
+ return data;
+ }
+
+ public void setData(Object data) {
+ this.data = data;
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/Person.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/PropertySet.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/PropertySet.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/PropertySet.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,55 @@
+package mapping.any;
+
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * todo: describe PropertySet
+ *
+ * @author Steve Ebersole
+ */
+public class PropertySet {
+ private Long id;
+ private String name;
+ private PropertyValue someSpecificProperty;
+ private Map generalProperties = new HashMap();
+
+ public PropertySet() {
+ }
+
+ public PropertySet(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 PropertyValue getSomeSpecificProperty() {
+ return someSpecificProperty;
+ }
+
+ public void setSomeSpecificProperty(PropertyValue someSpecificProperty) {
+ this.someSpecificProperty = someSpecificProperty;
+ }
+
+ public Map getGeneralProperties() {
+ return generalProperties;
+ }
+
+ public void setGeneralProperties(Map generalProperties) {
+ this.generalProperties = generalProperties;
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/PropertySet.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/PropertyValue.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/PropertyValue.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/PropertyValue.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,10 @@
+package mapping.any;
+
+/**
+ * todo: describe PropertyValue
+ *
+ * @author Steve Ebersole
+ */
+public interface PropertyValue {
+ public String asString();
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/PropertyValue.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/StringPropertyValue.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/StringPropertyValue.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/StringPropertyValue.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,38 @@
+package mapping.any;
+
+/**
+ * todo: describe StringPropertyValue
+ *
+ * @author Steve Ebersole
+ */
+public class StringPropertyValue implements PropertyValue {
+ private Long id;
+ private String value;
+
+ public StringPropertyValue() {
+ }
+
+ public StringPropertyValue(String value) {
+ this.value = value;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String asString() {
+ return value;
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/any/StringPropertyValue.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/array/A.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/array/A.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/array/A.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,26 @@
+//$Id$
+package mapping.array;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class A {
+ private Integer id;
+ private B[] bs;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public B[] getBs() {
+ return bs;
+ }
+
+ public void setBs(B[] bs) {
+ this.bs = bs;
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/array/A.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batch/DataPoint.hbm.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batch/DataPoint.hbm.xml
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batch/DataPoint.hbm.xml 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,24 @@
+<?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.batch">
+
+ <class name="DataPoint"
+ dynamic-update="true">
+ <!--rowid="rowid"--> <!-- remove this if not oracle -->
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <property name="x">
+ <column name="xval" not-null="true" length="4"
unique-key="xy"/>
+ </property>
+ <property name="y">
+ <column name="yval" not-null="true" length="4"
unique-key="xy"/>
+ </property>
+ <property name="description"/>
+ </class>
+
+</hibernate-mapping>
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batch/DataPoint.hbm.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batchfetch/Model.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batchfetch/Model.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batchfetch/Model.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,44 @@
+//$Id$
+package mapping.batchfetch;
+
+/**
+ * @author Gavin King
+ */
+public class Model {
+ private String id;
+ private String name;
+ private String description;
+ private ProductLine productLine;
+
+ Model() {}
+
+ public Model(ProductLine pl) {
+ this.productLine = pl;
+ pl.getModels().add(this);
+ }
+
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ 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 ProductLine getProductLine() {
+ return productLine;
+ }
+ public void setProductLine(ProductLine productLine) {
+ this.productLine = productLine;
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batchfetch/Model.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batchfetch/ProductLine.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batchfetch/ProductLine.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batchfetch/ProductLine.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,34 @@
+//$Id$
+package mapping.batchfetch;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * @author Gavin King
+ */
+public class ProductLine {
+
+ private String id;
+ private String description;
+ private Set models = new HashSet();
+
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public String getId() {
+ return id;
+ }
+ public void setId(String id) {
+ this.id = id;
+ }
+ public Set getModels() {
+ return models;
+ }
+ public void setModels(Set models) {
+ this.models = models;
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/batchfetch/ProductLine.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/bytecode/BeanReflectionHelper.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/bytecode/BeanReflectionHelper.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/bytecode/BeanReflectionHelper.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,78 @@
+package mapping.bytecode;
+
+import org.hibernate.property.BasicPropertyAccessor;
+import org.hibernate.property.Getter;
+import org.hibernate.property.Setter;
+
+import java.util.Date;
+
+/**
+ * @author Steve Ebersole
+ */
+public class BeanReflectionHelper {
+
+ public static final Object[] TEST_VALUES = new Object[] {
+ "hello", new Long(1), new Integer(1), new Date(), new Long(1), new
Integer(1), new Object()
+ };
+
+ private static final String[] getterNames = new String[7];
+ private static final String[] setterNames = new String[7];
+ private static final Class[] types = new Class[7];
+
+ static {
+ BasicPropertyAccessor propertyAccessor = new BasicPropertyAccessor();
+ Getter getter = propertyAccessor.getGetter( Bean.class, "someString" );
+ Setter setter = propertyAccessor.getSetter( Bean.class, "someString" );
+ getterNames[0] = getter.getMethodName();
+ types[0] = getter.getReturnType();
+ setterNames[0] = setter.getMethodName();
+
+ getter = propertyAccessor.getGetter( Bean.class, "someLong" );
+ setter = propertyAccessor.getSetter( Bean.class, "someLong" );
+ getterNames[1] = getter.getMethodName();
+ types[1] = getter.getReturnType();
+ setterNames[1] = setter.getMethodName();
+
+ getter = propertyAccessor.getGetter( Bean.class, "someInteger" );
+ setter = propertyAccessor.getSetter( Bean.class, "someInteger" );
+ getterNames[2] = getter.getMethodName();
+ types[2] = getter.getReturnType();
+ setterNames[2] = setter.getMethodName();
+
+ getter = propertyAccessor.getGetter( Bean.class, "someDate" );
+ setter = propertyAccessor.getSetter( Bean.class, "someDate" );
+ getterNames[3] = getter.getMethodName();
+ types[3] = getter.getReturnType();
+ setterNames[3] = setter.getMethodName();
+
+ getter = propertyAccessor.getGetter( Bean.class, "somelong" );
+ setter = propertyAccessor.getSetter( Bean.class, "somelong" );
+ getterNames[4] = getter.getMethodName();
+ types[4] = getter.getReturnType();
+ setterNames[4] = setter.getMethodName();
+
+ getter = propertyAccessor.getGetter( Bean.class, "someint" );
+ setter = propertyAccessor.getSetter( Bean.class, "someint" );
+ getterNames[5] = getter.getMethodName();
+ types[5] = getter.getReturnType();
+ setterNames[5] = setter.getMethodName();
+
+ getter = propertyAccessor.getGetter( Bean.class, "someObject" );
+ setter = propertyAccessor.getSetter( Bean.class, "someObject" );
+ getterNames[6] = getter.getMethodName();
+ types[6] = getter.getReturnType();
+ setterNames[6] = setter.getMethodName();
+ }
+
+ public static String[] getGetterNames() {
+ return getterNames;
+ }
+
+ public static String[] getSetterNames() {
+ return setterNames;
+ }
+
+ public static Class[] getTypes() {
+ return types;
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/bytecode/BeanReflectionHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cache/Item.hbm.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cache/Item.hbm.xml
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cache/Item.hbm.xml 2008-01-15
14:46:54 UTC (rev 5700)
@@ -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.cache">
+
+ <class name="Item" table="Items">
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <property name="name" not-null="true"/>
+ <property name="description" not-null="true"/>
+ </class>
+
+ <class name="VersionedItem" table="VersionedItems">
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <version name="version" type="long"/>
+ <property name="name" not-null="true"/>
+ <property name="description" not-null="true"/>
+ </class>
+
+</hibernate-mapping>
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cache/Item.hbm.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cache/Item.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cache/Item.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cache/Item.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,31 @@
+//$Id$
+package mapping.cache;
+
+
+/**
+ * @author Gavin King
+ */
+public class Item {
+ private Long id;
+ private String name;
+ private String description;
+
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ 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;
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cache/Item.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/Job.hbm.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/Job.hbm.xml
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/Job.hbm.xml 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping SYSTEM
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.cascade">
+
+ <class name="Job" table="T_JOB">
+ <id name="id" column="JOB_ID">
+ <generator class="native"/>
+ </id>
+
+ <many-to-one name="batch" class="JobBatch"
cascade="none" column="BATCH_ID"/>
+
+ <property name="status" type="int" column="JOB_STATUS"
not-null="true"/>
+ <property name="processingInstructions" type="string"
column="PI" not-null="true"/>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/Job.hbm.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/Job.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/Job.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/Job.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,53 @@
+// $Id$
+package mapping.cascade;
+
+/**
+ * Implementation of Job.
+ *
+ * @author Steve Ebersole
+ */
+public class Job {
+ private Long id;
+ private JobBatch batch;
+ private String processingInstructions;
+ private int status;
+
+ /** GCLIB constructor */
+ Job() {}
+
+ protected Job(JobBatch batch) {
+ this.batch = batch;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ /*package*/ void setId(Long id) {
+ this.id = id;
+ }
+
+ public JobBatch getBatch() {
+ return batch;
+ }
+
+ /*package*/ void setBatch(JobBatch batch) {
+ this.batch = batch;
+ }
+
+ public String getProcessingInstructions() {
+ return processingInstructions;
+ }
+
+ public void setProcessingInstructions(String processingInstructions) {
+ this.processingInstructions = processingInstructions;
+ }
+
+ public int getStatus() {
+ return status;
+ }
+
+ public void setStatus(int status) {
+ this.status = status;
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/Job.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/JobBatch.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/JobBatch.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/JobBatch.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,54 @@
+// $Id$
+package mapping.cascade;
+
+import java.util.Date;
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * Implementation of JobBatch.
+ *
+ * @author Steve Ebersole
+ */
+public class JobBatch {
+ private Long id;
+ private Date batchDate;
+ private Set jobs = new HashSet();
+
+ /** CGLIB constructor */
+ JobBatch() {}
+
+ public JobBatch(Date batchDate) {
+ this.batchDate = batchDate;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public Date getBatchDate() {
+ return batchDate;
+ }
+
+ public void setBatchDate(Date batchDate) {
+ this.batchDate = batchDate;
+ }
+
+ public Set getJobs() {
+ return jobs;
+ }
+
+ public void setJobs(Set jobs) {
+ this.jobs = jobs;
+ }
+
+ public Job createJob() {
+ Job job = new Job( this );
+ jobs.add( job );
+ return job;
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cascade/JobBatch.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/LineItem.hbm.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/LineItem.hbm.xml
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/LineItem.hbm.xml 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+
+ This mapping demonstrates
+
+ (1) composite keys and many-to-one associations on
+ composite keys
+
+ (2) use of insert="false" update="false" on an
+ association mapping, when the foreign key is
+ also part of the primary key
+
+-->
+
+<hibernate-mapping package="mapping.cid">
+
+ <class name="LineItem">
+
+ <composite-id name="id"
+ class="LineItem$Id">
+ <key-property name="customerId" length="10"/>
+ <key-property name="orderNumber"/>
+ <key-property name="productId" length="10"/>
+ </composite-id>
+
+ <property name="quantity"/>
+
+ <many-to-one name="order"
+ insert="false"
+ update="false"
+ not-null="true">
+ <column name="customerId"/>
+ <column name="orderNumber"/>
+ </many-to-one>
+
+ <many-to-one name="product"
+ insert="false"
+ update="false"
+ not-null="true"
+ column="productId"/>
+
+ </class>
+
+
+</hibernate-mapping>
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/LineItem.hbm.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/LineItem.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/LineItem.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/LineItem.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,137 @@
+//$Id$
+package mapping.cid;
+
+import java.io.Serializable;
+
+/**
+ * @author Gavin King
+ */
+public class LineItem {
+ public static class Id implements Serializable {
+ private String customerId;
+ private int orderNumber;
+ private String productId;
+
+ public Id(String customerId, int orderNumber, String productId) {
+ this.customerId = customerId;
+ this.orderNumber = orderNumber;
+ this.productId = productId;
+ }
+ public Id() {}
+
+ /**
+ * @return Returns the customerId.
+ */
+ public String getCustomerId() {
+ return customerId;
+ }
+ /**
+ * @param customerId The customerId to set.
+ */
+ public void setCustomerId(String customerId) {
+ this.customerId = customerId;
+ }
+ /**
+ * @return Returns the productId.
+ */
+ public String getProductId() {
+ return productId;
+ }
+ /**
+ * @param productId The productId to set.
+ */
+ public void setProductId(String productId) {
+ this.productId = productId;
+ }
+ /**
+ * @return Returns the orderNumber.
+ */
+ public int getOrderNumber() {
+ return orderNumber;
+ }
+ /**
+ * @param orderNumber The orderNumber to set.
+ */
+ public void setOrderNumber(int orderNumber) {
+ this.orderNumber = orderNumber;
+ }
+ public int hashCode() {
+ return customerId.hashCode() + orderNumber + productId.hashCode();
+ }
+ public boolean equals(Object other) {
+ if (other instanceof Id) {
+ Id that = (Id) other;
+ return that.customerId.equals(this.customerId) &&
+ that.productId.equals(this.productId) &&
+ that.orderNumber == this.orderNumber;
+ }
+ else {
+ return false;
+ }
+ }
+ }
+
+ private Id id = new Id();
+ private int quantity;
+ private Order order;
+ private Product product;
+
+ public LineItem(Order o, Product p) {
+ this.order = o;
+ this.id.orderNumber = o.getId().getOrderNumber();
+ this.id.customerId = o.getId().getCustomerId();
+ this.id.productId = p.getProductId();
+ o.getLineItems().add(this);
+ }
+
+ public LineItem() {}
+
+ /**
+ * @return Returns the order.
+ */
+ public Order getOrder() {
+ return order;
+ }
+ /**
+ * @param order The order to set.
+ */
+ public void setOrder(Order order) {
+ this.order = order;
+ }
+ /**
+ * @return Returns the product.
+ */
+ public Product getProduct() {
+ return product;
+ }
+ /**
+ * @param product The product to set.
+ */
+ public void setProduct(Product product) {
+ this.product = product;
+ }
+ /**
+ * @return Returns the quantity.
+ */
+ public int getQuantity() {
+ return quantity;
+ }
+ /**
+ * @param quantity The quantity to set.
+ */
+ public void setQuantity(int quantity) {
+ this.quantity = quantity;
+ }
+ /**
+ * @return Returns the id.
+ */
+ public Id getId() {
+ return id;
+ }
+ /**
+ * @param id The id to set.
+ */
+ public void setId(Id id) {
+ this.id = id;
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/LineItem.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/Product.hbm.xml
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/Product.hbm.xml
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/Product.hbm.xml 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,40 @@
+<?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.cid">
+
+<!--
+
+ This mapping demonstrates
+
+ (1) use of a derived property which performs a
+ subselect against an associated table
+
+ (2) use of <synchronize/> to ensure that auto-flush
+ works correctly for an entity with a property
+ derived from another table
+
+
+-->
+
+ <class name="Product">
+ <synchronize table="LineItem"/>
+
+ <id name="productId"
+ length="10">
+ <generator class="assigned"/>
+ </id>
+
+ <property name="description"
+ not-null="true"
+ length="200"/>
+ <property name="price" length="3"
column="cost"/>
+ <property name="numberAvailable"/>
+
+ <property name="numberOrdered"
+ formula="( select sum(li.quantity) from LineItem li where li.productId =
productId )"/>
+ </class>
+
+</hibernate-mapping>
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/Product.hbm.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/Product.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/Product.java
(rev 0)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/Product.java 2008-01-15
14:46:54 UTC (rev 5700)
@@ -0,0 +1,75 @@
+//$Id$
+package mapping.cid;
+
+import java.math.BigDecimal;
+
+/**
+ * @author Gavin King
+ */
+public class Product {
+ private String productId;
+ private String description;
+ private BigDecimal price;
+ private int numberAvailable;
+ private int numberOrdered;
+ /**
+ * @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 numberAvailable.
+ */
+ public int getNumberAvailable() {
+ return numberAvailable;
+ }
+ /**
+ * @param numberAvailable The numberAvailable to set.
+ */
+ public void setNumberAvailable(int numberAvailable) {
+ this.numberAvailable = numberAvailable;
+ }
+ /**
+ * @return Returns the numberOrdered.
+ */
+ public int getNumberOrdered() {
+ return numberOrdered;
+ }
+ /**
+ * @param numberOrdered The numberOrdered to set.
+ */
+ public void setNumberOrdered(int numberOrdered) {
+ this.numberOrdered = numberOrdered;
+ }
+ /**
+ * @return Returns the productId.
+ */
+ public String getProductId() {
+ return productId;
+ }
+ /**
+ * @param productId The productId to set.
+ */
+ public void setProductId(String productId) {
+ this.productId = productId;
+ }
+ /**
+ * @return Returns the price.
+ */
+ public BigDecimal getPrice() {
+ return price;
+ }
+ /**
+ * @param price The price to set.
+ */
+ public void setPrice(BigDecimal price) {
+ this.price = price;
+ }
+}
Property changes on:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/mapping/cid/Product.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native