Author: mdryakhlenkov
Date: 2007-07-19 10:03:56 -0400 (Thu, 19 Jul 2007)
New Revision: 2524
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Car.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Car.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Plane.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Plane.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Product.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Product.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Radio.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Radio.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idbag/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idbag/Group.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idbag/User.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idbag/UserGroup.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/Customer.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/Customer.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/CustomerId.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/FavoriteCustomer.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/Basic.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/Entity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/HiLo.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/Pooled.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/Basic.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/Entity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/HiLo.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/Pooled.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/Basic.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/Entity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/HiLo.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/Pooled.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/LineItem.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/LineItemPK.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/Mapping.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/Order.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/Person.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/immutable/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/immutable/Contract.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/immutable/ContractVariation.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/immutable/ContractVariation.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/Group.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/Mapping.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/Membership.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/User.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/CustomBlobType.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Document.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Documents.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Entity.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Folder.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Owner.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Problematic.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Problematic.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/CollectionInterceptor.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/Image.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/Image.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/Log.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/PropertyInterceptor.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/StatefulInterceptor.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/User.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/User.java
Log:
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Car.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Car.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Car.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,25 @@
+<?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 the use of
+ the EJB3 compliant table hilo generator
+
+-->
+
+<hibernate-mapping package="mapping.id">
+
+ <class name="Car">
+
+ <id name="id">
+ <generator class="org.hibernate.id.MultipleHiLoPerTableGenerator">
+ <param name="max_lo">0</param>
+ </generator>
+ </id>
+ <property name="color"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Car.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Car.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Car.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,26 @@
+//$Id: Car.java 5686 2005-02-12 07:27:32Z steveebersole $
+package mapping.id;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class Car {
+ private Long id;
+ private String color;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getColor() {
+ return color;
+ }
+
+ public void setColor(String color) {
+ this.color = color;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Plane.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Plane.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Plane.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,25 @@
+<?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 the use of
+ the EJB3 compliant table hilo generator
+
+-->
+
+<hibernate-mapping package="mapping.id">
+
+ <class name="Plane">
+
+ <id name="id">
+ <generator class="org.hibernate.id.MultipleHiLoPerTableGenerator">
+ <param name="max_lo">2</param>
+ </generator>
+ </id>
+ <property name="nbrOfSeats"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Plane.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Plane.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Plane.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,26 @@
+//$Id: Plane.java 5686 2005-02-12 07:27:32Z steveebersole $
+package mapping.id;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class Plane {
+ private Long id;
+ private int nbrOfSeats;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public int getNbrOfSeats() {
+ return nbrOfSeats;
+ }
+
+ public void setNbrOfSeats(int nbrOfSeats) {
+ this.nbrOfSeats = nbrOfSeats;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Product.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Product.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Product.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,19 @@
+<?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.id">
+
+ <class name="Product" table="t_product">
+ <id name="name">
+ <generator class="uuid"/>
+ </id>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Product.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Product.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Product.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,17 @@
+//$Id: $
+package mapping.id;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class Product {
+ private String name;
+
+ 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/id/Radio.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Radio.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Radio.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -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">
+
+<!--
+
+ This mapping demonstrates the use of
+ the EJB3 compliant table hilo generator
+ with all the parameters
+
+-->
+
+<hibernate-mapping package="mapping.id">
+
+ <class name="Radio">
+
+ <id name="id">
+ <generator class="org.hibernate.id.MultipleHiLoPerTableGenerator">
+ <param name="table">sequences</param>
+ <param name="value_column">hi_value</param>
+ <param name="primary_key_column">name</param>
+ <param name="primary_key_length">50</param>
+ <param name="max_lo">2</param>
+ <param name="primary_key_value">Radio</param>
+ </generator>
+ </id>
+ <property name="frequency"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Radio.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Radio.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/id/Radio.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,26 @@
+//$Id: Radio.java 5686 2005-02-12 07:27:32Z steveebersole $
+package mapping.id;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class Radio {
+ private Integer id;
+ private String frequency;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getFrequency() {
+ return frequency;
+ }
+
+ public void setFrequency(String frequency) {
+ this.frequency = frequency;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idbag/Group.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idbag/Group.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idbag/Group.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,24 @@
+//$Id: Group.java 6058 2005-03-11 17:05:19Z oneovthafew $
+package mapping.idbag;
+
+/**
+ * @author Gavin King
+ */
+public class Group {
+ private String name;
+
+ Group() {}
+
+ public Group(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ void setName(String name) {
+ this.name = name;
+ }
+
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idbag/User.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idbag/User.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idbag/User.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,37 @@
+//$Id: User.java 6058 2005-03-11 17:05:19Z oneovthafew $
+package mapping.idbag;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Gavin King
+ */
+public class User {
+ private String name;
+ private List groups = new ArrayList();
+
+ User() {}
+
+ public User(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+
+ void setName(String name) {
+ this.name = name;
+ }
+
+ public List getGroups() {
+ return groups;
+ }
+
+ void setGroups(List groups) {
+ this.groups = groups;
+ }
+
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idbag/UserGroup.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idbag/UserGroup.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idbag/UserGroup.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,38 @@
+<?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 how to use an idbag to represent
+ a many-to-many association where the association table has
+ a surrogate key.
+
+-->
+
+<hibernate-mapping package="mapping.idbag">
+
+ <class name="User" table="`Users`">
+ <id name="name"/>
+
+ <idbag name="groups"
+ order-by="groupName asc"
+ table="`UserGroups`">
+ <collection-id column="userGroupId"
+ type="long">
+ <generator class="increment"/>
+ </collection-id>
+ <key column="userName"/>
+ <many-to-many column="groupName"
+ class="Group"/>
+ </idbag>
+
+ </class>
+
+ <class name="Group" table="`Groups`">
+ <id name="name"/>
+ </class>
+
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/Customer.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/Customer.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/Customer.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,27 @@
+<?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 how to use an id class not
+ embedded in the entity. Only the property values are
+ shared between the 2. This mimic the EJB2.1 and EJB3
+ semantic.
+
+-->
+
+<hibernate-mapping package="mapping.idclass">
+
+ <class name="Customer">
+ <composite-id class="CustomerId" mapped="true">
+ <key-property name="orgName" column="org_name"/>
+ <key-property name="customerName" column="cust_name"/>
+ </composite-id>
+ <discriminator column="disc"/>
+ <property name="address"/>
+ <subclass name="FavoriteCustomer"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/Customer.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/Customer.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/Customer.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,90 @@
+//$Id: Customer.java 7858 2005-08-11 21:46:58Z epbernard $
+
+package mapping.idclass;
+
+
+
+
+
+public class Customer {
+
+
+
+ public Customer() {
+
+ super();
+
+ }
+
+
+
+ public Customer(String orgName, String custName, String add) {
+
+ this.orgName = orgName;
+
+ this.customerName = custName;
+
+ this.address = add;
+
+ }
+
+
+
+ private String orgName;
+
+ private String customerName;
+
+ private String address;
+
+
+
+ public String getAddress() {
+
+ return address;
+
+ }
+
+
+
+ public void setAddress(String address) {
+
+ this.address = address;
+
+ }
+
+
+
+ public String getCustomerName() {
+
+ return customerName;
+
+ }
+
+
+
+ public void setCustomerName(String customerName) {
+
+ this.customerName = customerName;
+
+ }
+
+
+
+ public String getOrgName() {
+
+ return orgName;
+
+ }
+
+
+
+ public void setOrgName(String orgName) {
+
+ this.orgName = orgName;
+
+ }
+
+
+
+}
+
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/CustomerId.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/CustomerId.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/CustomerId.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,36 @@
+//$Id: CustomerId.java 7239 2005-06-20 09:44:54Z oneovthafew $
+package mapping.idclass;
+
+import java.io.Serializable;
+
+public class CustomerId implements Serializable {
+
+ private String orgName;
+ private String customerName;
+
+ public CustomerId() {
+ super();
+ }
+
+ public CustomerId(String orgName, String custName) {
+ this.orgName = orgName;
+ this.customerName = custName;
+ }
+
+ public String getCustomerName() {
+ return customerName;
+ }
+
+ public void setCustomerName(String customerName) {
+ this.customerName = customerName;
+ }
+
+ public String getOrgName() {
+ return orgName;
+ }
+
+ public void setOrgName(String orgName) {
+ this.orgName = orgName;
+ }
+
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/FavoriteCustomer.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/FavoriteCustomer.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idclass/FavoriteCustomer.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,14 @@
+//$Id: FavoriteCustomer.java 7858 2005-08-11 21:46:58Z epbernard $
+package mapping.idclass;
+
+/**
+ * @author Emmanuel Bernard
+ */
+public class FavoriteCustomer extends Customer {
+ public FavoriteCustomer() {
+ }
+
+ public FavoriteCustomer(String orgName, String custName, String add) {
+ super( orgName, custName, add );
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/Basic.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/Basic.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/Basic.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+ Demonstrates use of the enhanced sequence-based identifier
+ generator, with no performance optimizations (the DB is hit
+ everytime when generating a value).
+-->
+
+<hibernate-mapping package="mapping.idgen.enhanced.forcedtable">
+
+ <class name="Entity" table="ID_SEQ_TBL_BSC_ENTITY">
+ <id name="id" column="ID" type="long">
+ <generator
class="org.hibernate.id.enhanced.SequenceStyleGenerator">
+ <param
name="table_name">ID_SEQ_TBL_BSC_SEQ</param>
+ <param name="value_column">hi_val</param>
+ <param name="initial_value">1</param>
+ <param name="increment_size">1</param>
+ <param name="optimizer">none</param>
+ <param name="force_tbl_use">true</param>
+ </generator>
+ </id>
+ <property name="name" type="string"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/Entity.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/Entity.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/Entity.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,34 @@
+package mapping.idgen.enhanced.forcedtable;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class Entity {
+ private Long id;
+ private String name;
+
+ public Entity() {
+ }
+
+ public Entity(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;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/HiLo.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/HiLo.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/HiLo.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+ Demonstrates use of the enhanced table-based identifier
+ generator, using a hilo algorithm as the optimization (to
+ avoid hitting the database to generate each value).
+-->
+
+<hibernate-mapping package="mapping.idgen.enhanced.forcedtable">
+
+ <class name="Entity" table="ID_SEQ_TBL_HILO_ENTITY">
+ <id name="id" column="ID" type="long">
+ <generator
class="org.hibernate.id.enhanced.SequenceStyleGenerator">
+ <param
name="table_name">ID_SEQ_TBL_HILO_SEQ</param>
+ <param name="initial_value">1</param>
+ <param name="increment_size">10</param>
+ <param name="optimizer">hilo</param>
+ <param name="force_tbl_use">true</param>
+ </generator>
+ </id>
+ <property name="name" type="string"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/Pooled.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/Pooled.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/forcedtable/Pooled.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+ Demonstrates use of the enhanced table-based identifier
+ generator, using a hilo algorithm as the optimization (to
+ avoid hitting the database to generate each value).
+-->
+
+<hibernate-mapping package="mapping.idgen.enhanced.forcedtable">
+
+ <class name="Entity" table="ID_SEQ_TBL_POOL_ENTITY">
+ <id name="id" column="ID" type="long">
+ <generator
class="org.hibernate.id.enhanced.SequenceStyleGenerator">
+ <param
name="table_name">ID_SEQ_TBL_POOL_SEQ</param>
+ <param name="initial_value">1</param>
+ <param name="increment_size">10</param>
+ <param name="optimizer">pooled</param>
+ <param name="force_tbl_use">true</param>
+ </generator>
+ </id>
+ <property name="name" type="string"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/Basic.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/Basic.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/Basic.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -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">
+
+<!--
+ Demonstrates use of the enhanced sequence-based identifier
+ generator, with no performance optimizations (the DB is hit
+ everytime when generating a value).
+-->
+
+<hibernate-mapping package="mapping.idgen.enhanced.sequence">
+
+ <class name="Entity" table="ID_SEQ_BSC_ENTITY">
+ <id name="id" column="ID" type="long">
+ <generator
class="org.hibernate.id.enhanced.SequenceStyleGenerator">
+ <param name="sequence_name">ID_SEQ_BSC_SEQ</param>
+ <param name="initial_value">1</param>
+ <param name="increment_size">1</param>
+ <param name="optimizer">none</param>
+ </generator>
+ </id>
+ <property name="name" type="string"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/Entity.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/Entity.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/Entity.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,34 @@
+package mapping.idgen.enhanced.sequence;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class Entity {
+ private Long id;
+ private String name;
+
+ public Entity() {
+ }
+
+ public Entity(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;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/HiLo.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/HiLo.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/HiLo.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -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">
+
+<!--
+ Demonstrates use of the enhanced sequence-based identifier
+ generator, using a hilo algorithm as the optimization (to
+ avoid hitting the database to generate each value).
+-->
+
+<hibernate-mapping package="mapping.idgen.enhanced.sequence">
+
+ <class name="Entity" table="ID_SEQ_HILO_ENTITY">
+ <id name="id" column="ID" type="long">
+ <generator
class="org.hibernate.id.enhanced.SequenceStyleGenerator">
+ <param
name="sequence_name">ID_SEQ_HILO_SEQ</param>
+ <param name="initial_value">1</param>
+ <param name="increment_size">10</param>
+ <param name="optimizer">hilo</param>
+ </generator>
+ </id>
+ <property name="name" type="string"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/Pooled.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/Pooled.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/sequence/Pooled.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -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">
+
+<!--
+ Demonstrates use of the enhanced sequence-based identifier
+ generator, using a pooled algorithm as the optimization (to
+ avoid hitting the database to generate each value).
+-->
+
+<hibernate-mapping package="mapping.idgen.enhanced.sequence">
+
+ <class name="Entity" table="ID_SEQ_POOL_ENTITY">
+ <id name="id" column="ID" type="long">
+ <generator
class="org.hibernate.id.enhanced.SequenceStyleGenerator">
+ <param
name="sequence_name">ID_SEQ_POOL_SEQ</param>
+ <param name="initial_value">1</param>
+ <param name="increment_size">10</param>
+ <param name="optimizer">pooled</param>
+ </generator>
+ </id>
+ <property name="name" type="string"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/Basic.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/Basic.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/Basic.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,21 @@
+<?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.idgen.enhanced.table">
+
+ <class name="Entity" table="ID_TBL_BSC_ENTITY">
+ <id name="id" column="ID" type="long">
+ <generator class="org.hibernate.id.enhanced.TableGenerator">
+ <param name="table_name">ID_TBL_BSC_TBL</param>
+ <param name="segment_value">test</param>
+ <param name="initial_value">1</param>
+ <param name="increment_size">1</param>
+ <param name="optimizer">none</param>
+ </generator>
+ </id>
+ <property name="name" type="string"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/Entity.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/Entity.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/Entity.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,34 @@
+package mapping.idgen.enhanced.table;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class Entity {
+ private Long id;
+ private String name;
+
+ public Entity() {
+ }
+
+ public Entity(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;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/HiLo.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/HiLo.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/HiLo.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,21 @@
+<?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.idgen.enhanced.table">
+
+ <class name="Entity" table="ID_TBL_HILO_ENTITY">
+ <id name="id" column="ID" type="long">
+ <generator class="org.hibernate.id.enhanced.TableGenerator">
+ <param name="table_name">ID_TBL_HILO_TBL</param>
+ <param name="segment_value">test</param>
+ <param name="initial_value">1</param>
+ <param name="increment_size">10</param>
+ <param name="optimizer">hilo</param>
+ </generator>
+ </id>
+ <property name="name" type="string"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/Pooled.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/Pooled.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idgen/enhanced/table/Pooled.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+ Demonstrates use of the enhanced sequence-based identifier
+ generator, using a pooled algorithm as the optimization (to
+ avoid hitting the database to generate each value).
+-->
+
+<hibernate-mapping package="mapping.idgen.enhanced.table">
+
+ <class name="Entity" table="ID_TBL_POOL_ENTITY">
+ <id name="id" column="ID" type="long">
+ <generator class="org.hibernate.id.enhanced.TableGenerator">
+ <param name="table_name">ID_TBL_POOL_TBL</param>
+ <param name="segment_value">test</param>
+ <param name="initial_value">1</param>
+ <param name="increment_size">10</param>
+ <param name="optimizer">pooled</param>
+ </generator>
+ </id>
+ <property name="name" type="string"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/LineItem.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/LineItem.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/LineItem.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,49 @@
+package mapping.idprops;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class LineItem {
+ private LineItemPK pk;
+ private int quantity;
+ private String id;
+
+ public LineItem() {
+ }
+
+ public LineItem(LineItemPK pk, int quantity) {
+ this.pk = pk;
+ this.quantity = quantity;
+ this.pk.getOrder().getLineItems().add( this );
+ }
+
+ public LineItem(Order order, String productCode, int quantity) {
+ this( new LineItemPK( order, productCode ), quantity );
+ }
+
+ public LineItemPK getPk() {
+ return pk;
+ }
+
+ public void setPk(LineItemPK pk) {
+ this.pk = pk;
+ }
+
+ public int getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(int quantity) {
+ this.quantity = quantity;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/LineItemPK.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/LineItemPK.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/LineItemPK.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,64 @@
+package mapping.idprops;
+
+import java.io.Serializable;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class LineItemPK implements Serializable {
+ private Order order;
+ private String productCode;
+
+ public LineItemPK() {
+ }
+
+ public LineItemPK(Order order, String productCode) {
+ this.order = order;
+ this.productCode = productCode;
+ }
+
+ public Order getOrder() {
+ return order;
+ }
+
+ public void setOrder(Order order) {
+ this.order = order;
+ }
+
+ public String getProductCode() {
+ return productCode;
+ }
+
+ public void setProductCode(String productCode) {
+ this.productCode = productCode;
+ }
+
+ public boolean equals(Object o) {
+ if ( this == o ) {
+ return true;
+ }
+ if ( o == null || getClass() != o.getClass() ) {
+ return false;
+ }
+
+ LineItemPK that = ( LineItemPK ) o;
+
+ if ( !order.equals( that.order ) ) {
+ return false;
+ }
+ if ( !productCode.equals( that.productCode ) ) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public int hashCode() {
+ int result;
+ result = order.hashCode();
+ result = 31 * result + productCode.hashCode();
+ return result;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/Mapping.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/Mapping.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/Mapping.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+
+<!DOCTYPE hibernate-mapping SYSTEM
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.idprops">
+
+ <!--
+ Person has an identitifer property named something other than 'id';
+ additionally, it has a non-identitifer property named 'id'
+ -->
+ <class name="Person" table="T_ID_PERSON">
+ <id name="pk" column="PK" type="long">
+ <generator class="assigned"/>
+ </id>
+ <property name="name" column="NAME"
type="string"/>
+ <property name="id" column="ID_NON_ID"
type="int" />
+ </class>
+
+ <!--
+ Order has an identitifer property named something other than 'id';
+ it has no non-identitifer property named 'id'
+ -->
+ <class name="Order" table="T_ID_ORDER">
+ <id name="number" column="PK" type="long">
+ <generator class="assigned"/>
+ </id>
+ <property name="placed" column="ORDR_DT"
type="timestamp"/>
+ <many-to-one name="orderee" class="Person"
column="ORDEREE"/>
+ <set name="lineItems" cascade="all-delete-orphan"
lazy="true" inverse="true">
+ <key column="ORDR_ID"/>
+ <one-to-many class="LineItem"/>
+ </set>
+ </class>
+
+ <!--
+ LineItem has a composite identitifer property named something other than
'id';
+ additionally, it has a non-identitifer property named 'id'
+ -->
+ <class name="LineItem" table="T_ID_LINE_ITEM">
+ <composite-id class="LineItemPK" name="pk">
+ <key-many-to-one name="order" class="Order"
column="ORDR_ID" />
+ <key-property name="productCode" column="PROD_CODE"
type="string"/>
+ </composite-id>
+ <property name="quantity" column="QTY"
type="int"/>
+ <property name="id" column="ID_NON_ID2"
type="string"/>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/Order.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/Order.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/Order.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,60 @@
+package mapping.idprops;
+
+import java.util.Date;
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class Order {
+ private Long number;
+ private Date placed;
+ private Person orderee;
+
+ private Set lineItems = new HashSet();
+
+ public Order() {
+ }
+
+ public Order(Long number, Person orderee) {
+ this.number = number;
+ this.orderee = orderee;
+ this.placed = new Date();
+ }
+
+ public Long getNumber() {
+ return number;
+ }
+
+ public void setNumber(Long number) {
+ this.number = number;
+ }
+
+ public Date getPlaced() {
+ return placed;
+ }
+
+ public void setPlaced(Date placed) {
+ this.placed = placed;
+ }
+
+ public Person getOrderee() {
+ return orderee;
+ }
+
+ public void setOrderee(Person orderee) {
+ this.orderee = orderee;
+ }
+
+
+ public Set getLineItems() {
+ return lineItems;
+ }
+
+ public void setLineItems(Set lineItems) {
+ this.lineItems = lineItems;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/Person.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/Person.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/idprops/Person.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,45 @@
+package mapping.idprops;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class Person {
+ private Long pk;
+ private String name;
+ private int id;
+
+ public Person() {
+ }
+
+ public Person(Long pk, String name, int id) {
+ this.pk = pk;
+ this.name = name;
+ this.id = id;
+ }
+
+ public Long getPk() {
+ return pk;
+ }
+
+ public void setPk(Long pk) {
+ this.pk = pk;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/immutable/Contract.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/immutable/Contract.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/immutable/Contract.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,57 @@
+//$Id: Contract.java 7222 2005-06-19 17:22:01Z oneovthafew $
+package mapping.immutable;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+public class Contract implements Serializable {
+
+ private long id;
+ private String customerName;
+ private String type;
+ private List variations;
+
+ public Contract() {
+ super();
+ }
+
+ public Contract(String customerName, String type) {
+ this.customerName = customerName;
+ this.type = type;
+ variations = new ArrayList();
+ }
+
+ public String getCustomerName() {
+ return customerName;
+ }
+
+ public void setCustomerName(String customerName) {
+ this.customerName = customerName;
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public List getVariations() {
+ return variations;
+ }
+
+ public void setVariations(List variations) {
+ this.variations = variations;
+ }
+
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/immutable/ContractVariation.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/immutable/ContractVariation.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/immutable/ContractVariation.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<!--
+
+ Test for immutable classes/collections.
+
+-->
+
+<hibernate-mapping package="mapping.immutable">
+
+ <class name="Contract" mutable="false">
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <property name="customerName" not-null="true"/>
+ <property name="type" not-null="true"/>
+ <bag name="variations" inverse="true" order-by="version
asc"
+ mutable="false" cascade="all" fetch="join">
+ <key column="contract"/>
+ <one-to-many class="ContractVariation"/>
+ </bag>
+ </class>
+
+ <class name="ContractVariation" mutable="false">
+ <composite-id>
+ <key-many-to-one name="contract"/>
+ <key-property name="version"/>
+ </composite-id>
+ <property name="text" type="text"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/immutable/ContractVariation.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/immutable/ContractVariation.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/immutable/ContractVariation.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,45 @@
+//$Id: ContractVariation.java 7222 2005-06-19 17:22:01Z oneovthafew $
+package mapping.immutable;
+
+import java.io.Serializable;
+
+public class ContractVariation implements Serializable {
+
+ private int version;
+ private Contract contract;
+ private String text;
+
+ public Contract getContract() {
+ return contract;
+ }
+
+ public void setContract(Contract contract) {
+ this.contract = contract;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ public int getVersion() {
+ return version;
+ }
+
+ public void setVersion(int version) {
+ this.version = version;
+ }
+
+ public ContractVariation() {
+ super();
+ }
+
+ public ContractVariation(int version, Contract contract) {
+ this.contract = contract;
+ this.version = version;
+ contract.getVariations().add(this);
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/Group.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/Group.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/Group.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,29 @@
+package mapping.insertordering;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class Group {
+ private Long id;
+ private String name;
+
+ /**
+ * for persistence
+ */
+ Group() {
+ }
+
+ public Group(String name) {
+ this.name = name;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/Mapping.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/Mapping.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/Mapping.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,35 @@
+<?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.insertordering"
default-access="field">
+
+ <class name="User" table="INS_ORD_USR">
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <property name="username" column="USR_NM" />
+ <set name="memberships" fetch="select"
lazy="true" inverse="true" cascade="all">
+ <key column="USR_ID"/>
+ <one-to-many class="Membership"/>
+ </set>
+ </class>
+
+ <class name="Group" table="INS_ORD_GRP">
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <property name="name"/>
+ </class>
+
+ <class name="Membership" table="INS_ORD_MEM">
+ <id name="id">
+ <generator class="increment" />
+ </id>
+ <many-to-one name="user" class="User"
column="USR_ID" cascade="all"/>
+ <many-to-one name="group" class="Group"
column="GRP_ID" cascade="all"/>
+ <property name="activationDate" type="timestamp"
column="JN_DT"/>
+ </class>
+</hibernate-mapping>
+
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/Membership.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/Membership.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/Membership.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,47 @@
+package mapping.insertordering;
+
+import java.util.Date;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class Membership {
+ private Long id;
+ private User user;
+ private Group group;
+ private Date activationDate;
+
+ /**
+ * For persistence
+ */
+ Membership() {
+ }
+
+ public Membership(User user, Group group) {
+ this( user, group, new Date() );
+ }
+
+ public Membership(User user, Group group, Date activationDate) {
+ this.user = user;
+ this.group = group;
+ this.activationDate = activationDate;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public User getUser() {
+ return user;
+ }
+
+ public Group getGroup() {
+ return group;
+ }
+
+ public Date getActivationDate() {
+ return activationDate;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/User.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/User.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/insertordering/User.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,44 @@
+package mapping.insertordering;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Iterator;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class User {
+ private Long id;
+ private String username;
+ private Set memberships = new HashSet();
+
+ /**
+ * for persistence
+ */
+ User() {
+ }
+
+ public User(String username) {
+ this.username = username;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public Iterator getMemberships() {
+ return memberships.iterator();
+ }
+
+ public Membership addMembership(Group group) {
+ Membership membership = new Membership( this, group );
+ memberships.add( membership );
+ return membership;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/CustomBlobType.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/CustomBlobType.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/CustomBlobType.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,109 @@
+package mapping.instrument.domain;
+
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Types;
+import java.util.Arrays;
+
+import org.hibernate.HibernateException;
+import org.hibernate.Hibernate;
+import org.hibernate.usertype.UserType;
+
+/**
+ * A simple byte[]-based custom type.
+ */
+public class CustomBlobType implements UserType {
+ /**
+ * {@inheritDoc}
+ */
+ public Object nullSafeGet(ResultSet rs, String names[], Object owner) throws
SQLException {
+ // cast just to make sure...
+ return ( byte[] ) Hibernate.BINARY.nullSafeGet( rs, names );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void nullSafeSet(PreparedStatement ps, Object value, int index) throws
SQLException, HibernateException {
+ // cast just to make sure...
+ Hibernate.BINARY.nullSafeSet( ps, ( byte[] ) value, index );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object deepCopy(Object value) {
+ byte result[] = null;
+
+ if ( value != null ) {
+ byte bytes[] = ( byte[] ) value;
+
+ result = new byte[bytes.length];
+ System.arraycopy( bytes, 0, result, 0, bytes.length );
+ }
+
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isMutable() {
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int[] sqlTypes() {
+ return new int[] { Types.VARBINARY };
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Class returnedClass() {
+ return byte[].class;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean equals(Object x, Object y) {
+ return Arrays.equals( ( byte[] ) x, ( byte[] ) y );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object assemble(Serializable arg0, Object arg1)
+ throws HibernateException {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Serializable disassemble(Object arg0)
+ throws HibernateException {
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int hashCode(Object arg0)
+ throws HibernateException {
+ return 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Object replace(Object arg0, Object arg1, Object arg2)
+ throws HibernateException {
+ return null;
+ }
+}
\ No newline at end of file
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Document.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Document.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Document.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,110 @@
+//$Id: Document.java 9538 2006-03-04 00:17:57Z steve.ebersole(a)jboss.com $
+package mapping.instrument.domain;
+
+import java.util.Date;
+
+/**
+ * @author Gavin King
+ */
+public class Document {
+ private Long id;
+ private String name;
+ private String upperCaseName;
+ private String summary;
+ private String text;
+ private Owner owner;
+ private Folder folder;
+ private Date lastTextModification = new Date();
+ /**
+ * @return Returns the folder.
+ */
+ public Folder getFolder() {
+ return folder;
+ }
+ /**
+ * @param folder The folder to set.
+ */
+ public void setFolder(Folder folder) {
+ this.folder = folder;
+ }
+ /**
+ * @return Returns the owner.
+ */
+ public Owner getOwner() {
+ return owner;
+ }
+ /**
+ * @param owner The owner to set.
+ */
+ public void setOwner(Owner owner) {
+ this.owner = owner;
+ }
+ /**
+ * @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 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.
+ */
+ private void setText(String text) {
+ this.text = text;
+ }
+ /**
+ * @return Returns the upperCaseName.
+ */
+ public String getUpperCaseName() {
+ return upperCaseName;
+ }
+ /**
+ * @param upperCaseName The upperCaseName to set.
+ */
+ public void setUpperCaseName(String upperCaseName) {
+ this.upperCaseName = upperCaseName;
+ }
+
+ public void updateText(String newText) {
+ if ( !newText.equals(text) ) {
+ this.text = newText;
+ lastTextModification = new Date();
+ }
+ }
+
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Documents.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Documents.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Documents.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,67 @@
+<?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) use of lazy properties - this feature requires buildtime
+ bytecode instrumentation; we don't think this is a very
+ necessary feature, but provide it for completeleness; if
+ Hibernate encounters uninstrumented classes, lazy property
+ fetching will be silently disabled, to enable testing
+
+ (2) use of a formula to define a "derived property"
+
+-->
+
+<hibernate-mapping package="mapping.instrument.domain"
default-access="field">
+
+ <class name="Folder" table="folders">
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <property name="name" not-null="true"
length="50"/>
+ <many-to-one name="parent"/>
+ <bag name="subfolders" inverse="true"
cascade="save-update">
+ <key column="parent"/>
+ <one-to-many class="Folder"/>
+ </bag>
+ <bag name="documents" inverse="true"
cascade="all-delete-orphan">
+ <key column="folder"/>
+ <one-to-many class="Document"/>
+ </bag>
+ </class>
+
+ <class name="Owner" table="owners" lazy="false">
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <property name="name" not-null="true"
length="50"/>
+ </class>
+
+ <class name="Document" table="documents">
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <property name="name" not-null="true"
length="50"/>
+ <property name="upperCaseName" formula="upper(name)"
lazy="true"/>
+ <property name="summary" not-null="true"
length="200" lazy="true"/>
+ <many-to-one name="folder" not-null="true"
lazy="no-proxy"/>
+ <many-to-one name="owner" not-null="true"
lazy="no-proxy" fetch="select"/>
+ <property name="text" not-null="true" length="2000"
lazy="true"/>
+ <property name="lastTextModification" not-null="true"
lazy="true" access="field"/>
+ </class>
+
+ <class name="Entity" table="entity">
+ <id name="id" column="ID" type="long">
+ <generator class="increment"/>
+ </id>
+ <property name="name" column="NAME"
type="string" lazy="true"/>
+ <many-to-one name="child" column="PRNT_ID"
class="Entity" lazy="proxy" cascade="all" />
+ <many-to-one name="sibling" column="RIGHT_ID"
class="Entity" lazy="no-proxy" cascade="all" />
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Entity.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Entity.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Entity.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,52 @@
+package mapping.instrument.domain;
+
+/**
+ * todo: describe Entity
+ *
+ * @author Steve Ebersole
+ */
+public class Entity {
+ private Long id;
+ private String name;
+ private Entity child;
+ private Entity sibling;
+
+ public Entity() {
+ }
+
+ public Entity(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 Entity getChild() {
+ return child;
+ }
+
+ public void setChild(Entity child) {
+ this.child = child;
+ }
+
+ public Entity getSibling() {
+ return sibling;
+ }
+
+ public void setSibling(Entity sibling) {
+ this.sibling = sibling;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Folder.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Folder.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Folder.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,80 @@
+//$Id: Folder.java 9538 2006-03-04 00:17:57Z steve.ebersole(a)jboss.com $
+package mapping.instrument.domain;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+/**
+ * @author Gavin King
+ */
+public class Folder {
+ private Long id;
+ private String name;
+ private Folder parent;
+ private Collection subfolders = new ArrayList();
+ private Collection documents = new ArrayList();
+
+ public boolean nameWasread;
+
+ /**
+ * @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() {
+ nameWasread = true;
+ return name;
+ }
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * @return Returns the documents.
+ */
+ public Collection getDocuments() {
+ return documents;
+ }
+ /**
+ * @param documents The documents to set.
+ */
+ public void setDocuments(Collection documents) {
+ this.documents = documents;
+ }
+ /**
+ * @return Returns the parent.
+ */
+ public Folder getParent() {
+ return parent;
+ }
+ /**
+ * @param parent The parent to set.
+ */
+ public void setParent(Folder parent) {
+ this.parent = parent;
+ }
+ /**
+ * @return Returns the subfolders.
+ */
+ public Collection getSubfolders() {
+ return subfolders;
+ }
+ /**
+ * @param subfolders The subfolders to set.
+ */
+ public void setSubfolders(Collection subfolders) {
+ this.subfolders = subfolders;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Owner.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Owner.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Owner.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,34 @@
+//$Id: Owner.java 9538 2006-03-04 00:17:57Z steve.ebersole(a)jboss.com $
+package mapping.instrument.domain;
+
+/**
+ * @author Gavin King
+ */
+public class Owner {
+ private Long id;
+ private String name;
+ /**
+ * @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;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Problematic.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Problematic.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Problematic.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,14 @@
+<?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.instrument.domain">
+ <class name="Problematic">
+ <id name="id" type="long" column="ID">
+ <generator class="increment" />
+ </id>
+ <property name="name" type="string"
column="NAME" />
+ <property name="bytes"
type="org.hibernate.test.instrument.domain.CustomBlobType"
column="DATA" lazy="true" />
+ </class>
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Problematic.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Problematic.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/instrument/domain/Problematic.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,69 @@
+package mapping.instrument.domain;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class Problematic {
+ private Long id;
+ private String name;
+ private byte[] bytes;
+
+ private Representation representation;
+
+ 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 byte[] getBytes() {
+ return bytes;
+ }
+
+ public void setBytes(byte[] bytes) {
+ this.bytes = bytes;
+ }
+
+ public Representation getRepresentation() {
+ if ( representation == null ) {
+ representation = ( ( bytes == null ) ? null : new Representation( bytes ) );
+ }
+ return representation;
+ }
+
+ public void setRepresentation(Representation rep) {
+ bytes = rep.getBytes();
+ }
+
+ public static class Representation {
+ private byte[] bytes;
+
+ public Representation(byte[] bytes) {
+ this.bytes = bytes;
+ }
+
+ public byte[] getBytes() {
+ return bytes;
+ }
+
+ public String toString() {
+ String result = "";
+ for ( int i = 0; i < bytes.length; i++ ) {
+ result += bytes[i];
+ }
+ return result;
+ }
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/CollectionInterceptor.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/CollectionInterceptor.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/CollectionInterceptor.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,21 @@
+//$Id: CollectionInterceptor.java 7700 2005-07-30 05:02:47Z oneovthafew $
+package mapping.interceptor;
+
+import java.io.Serializable;
+
+import org.hibernate.EmptyInterceptor;
+import org.hibernate.type.Type;
+
+public class CollectionInterceptor extends EmptyInterceptor {
+
+ public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState,
Object[] previousState, String[] propertyNames, Type[] types) {
+ ( (User) entity ).getActions().add("updated");
+ return false;
+ }
+
+ public boolean onSave(Object entity, Serializable id, Object[] state, String[]
propertyNames, Type[] types) {
+ ( (User) entity ).getActions().add("created");
+ return false;
+ }
+
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/Image.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/Image.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/Image.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,19 @@
+<?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.interceptor">
+
+ <class name="Image" table="image" abstract="false"
select-before-update="true" >
+ <id name="id" type="java.lang.Long"
column="id">
+ <generator class="native"/>
+ </id>
+ <component name="details" class="Image$Details">
+ <property name="perm1" not-null="true"
type="long" column="permissions"/>
+ <property name="comment" type="string"
column="comment_txt"/>
+ </component>
+ <property name="name" type="java.lang.String"
column="name" not-null="true"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/Image.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/Image.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/Image.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,63 @@
+package mapping.interceptor;
+
+public class Image {
+
+ private Long id;
+ private String name;
+ private Details details;
+
+ public Details getDetails() {
+ return details;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setDetails(Details details) {
+ this.details = details;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String toString() {
+ return "Image/" + ( details == null ? "no details" :
details.toString() );
+ }
+
+ public static class Details {
+ private long perm1 = -1; // all bits turned on.
+ private String comment;
+
+ protected long getPerm1() {
+ return this.perm1;
+ }
+
+ protected void setPerm1(long value) {
+ this.perm1 = value;
+ }
+
+ public String getComment() {
+ return comment;
+ }
+
+ public void setComment(String comment) {
+ this.comment = comment;
+ }
+
+ public String toString() {
+ return "Details=" + perm1;
+ }
+ }
+
+}
+
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/Log.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/Log.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/Log.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,53 @@
+//$Id: Log.java 7700 2005-07-30 05:02:47Z oneovthafew $
+package mapping.interceptor;
+
+import java.util.Calendar;
+
+public class Log {
+ private Long id;
+ private String entityName;
+ private String entityId;
+ private String action;
+ private Calendar time;
+
+ public Log(String action, String id, String name) {
+ super();
+ this.action = action;
+ entityId = id;
+ entityName = name;
+ time = Calendar.getInstance();
+ }
+ public Log() {
+ super();
+ }
+ public String getAction() {
+ return action;
+ }
+ public void setAction(String action) {
+ this.action = action;
+ }
+ public String getEntityId() {
+ return entityId;
+ }
+ public void setEntityId(String entityId) {
+ this.entityId = entityId;
+ }
+ public String getEntityName() {
+ return entityName;
+ }
+ public void setEntityName(String entityName) {
+ this.entityName = entityName;
+ }
+ public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ public Calendar getTime() {
+ return time;
+ }
+ public void setTime(Calendar time) {
+ this.time = time;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/PropertyInterceptor.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/PropertyInterceptor.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/PropertyInterceptor.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,22 @@
+//$Id: PropertyInterceptor.java 7700 2005-07-30 05:02:47Z oneovthafew $
+package mapping.interceptor;
+
+import java.io.Serializable;
+import java.util.Calendar;
+
+import org.hibernate.EmptyInterceptor;
+import org.hibernate.type.Type;
+
+public class PropertyInterceptor extends EmptyInterceptor {
+
+ public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState,
Object[] previousState, String[] propertyNames, Type[] types) {
+ currentState[1] = Calendar.getInstance();
+ return true;
+ }
+
+ public boolean onSave(Object entity, Serializable id, Object[] state, String[]
propertyNames, Type[] types) {
+ state[2] = Calendar.getInstance();
+ return true;
+ }
+
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/StatefulInterceptor.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/StatefulInterceptor.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/StatefulInterceptor.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,47 @@
+//$Id: StatefulInterceptor.java 7701 2005-07-30 05:07:01Z oneovthafew $
+package mapping.interceptor;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.hibernate.EmptyInterceptor;
+import org.hibernate.Session;
+import org.hibernate.type.Type;
+
+public class StatefulInterceptor extends EmptyInterceptor {
+
+ private Session session;
+
+ private List list = new ArrayList();
+
+ public boolean onSave(Object entity, Serializable id, Object[] state, String[]
propertyNames, Type[] types) {
+ if ( !(entity instanceof Log) ) {
+ list.add( new Log( "insert", (String) id, entity.getClass().getName() ) );
+ }
+ return false;
+ }
+
+ public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState,
Object[] previousState, String[] propertyNames, Type[] types) {
+ if ( !(entity instanceof Log) ) {
+ list.add( new Log( "update", (String) id, entity.getClass().getName() ) );
+ }
+ return false;
+ }
+
+ public void postFlush(Iterator entities) {
+ if ( list.size()>0 ) {
+ for ( Iterator iter = list.iterator(); iter.hasNext(); ) {
+ session.persist( iter.next() );
+ }
+ list.clear();
+ session.flush();
+ }
+ }
+
+ public void setSession(Session s) {
+ session = s;
+ }
+
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/User.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/User.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/User.hbm.xml 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,35 @@
+<?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.interceptor">
+
+ <class name="User" table="users">
+ <id name="name"/>
+ <property name="password"/>
+ <property name="lastUpdated"/>
+ <property name="created"/>
+ <set name="actions" lazy="false" fetch="join">
+ <key column="user_name"/>
+ <element column="action" type="string"/>
+ </set>
+ </class>
+
+ <class name="Log" table="log_entries">
+ <id name="id">
+ <generator class="increment"/>
+ </id>
+ <property name="entityName" column="entity_name"/>
+ <property name="entityId" column="entity_id"/>
+ <property name="action"/>
+ <property name="time" column="action_time"/>
+ </class>
+
+</hibernate-mapping>
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/User.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/User.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/interceptor/User.java 2007-07-19
14:03:56 UTC (rev 2524)
@@ -0,0 +1,53 @@
+//$Id: User.java 7700 2005-07-30 05:02:47Z oneovthafew $
+package mapping.interceptor;
+
+import java.util.Calendar;
+import java.util.HashSet;
+import java.util.Set;
+
+public class User {
+ private String name;
+ private String password;
+ private Set actions = new HashSet();
+ private Calendar lastUpdated;
+ private Calendar created;
+
+ public User(String name, String password) {
+ super();
+ this.name = name;
+ this.password = password;
+ }
+ public User() {
+ super();
+ }
+ public Calendar getLastUpdated() {
+ return lastUpdated;
+ }
+ public void setLastUpdated(Calendar lastUpdated) {
+ this.lastUpdated = lastUpdated;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public String getPassword() {
+ return password;
+ }
+ public void setPassword(String password) {
+ this.password = password;
+ }
+ public Set getActions() {
+ return actions;
+ }
+ public void setActions(Set actions) {
+ this.actions = actions;
+ }
+ public Calendar getCreated() {
+ return created;
+ }
+ public void setCreated(Calendar created) {
+ this.created = created;
+ }
+}