Author: mdryakhlenkov
Date: 2007-07-17 12:32:28 -0400 (Tue, 17 Jul 2007)
New Revision: 2478
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.hbm.xml
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.java
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/defs.hbm.xml
Log:
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.hbm.xml 2007-07-17
16:32:28 UTC (rev 2478)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping
+ SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.filter">
+
+ <class name="Category" table="CATEGORY">
+ <id name="id" column="CAT_ID" >
+ <generator class="native"/>
+ </id>
+
+ <property name="name" type="string"/>
+ <property name="effectiveStartDate" column="eff_start_dt"
type="java.util.Date"/>
+ <property name="effectiveEndDate" column="eff_end_dt"
type="java.util.Date"/>
+
+ <set cascade="none" inverse="true" name="products"
table="PROD_CAT">
+ <key column="CAT_ID"/>
+ <many-to-many column="PROD_ID" class="Product"/>
+ </set>
+
+ <filter name="effectiveDate" condition=":asOfDate BETWEEN
eff_start_dt and eff_end_dt"/>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Category.java 2007-07-17
16:32:28 UTC (rev 2478)
@@ -0,0 +1,104 @@
+// $Id: Category.java 6507 2005-04-25 16:57:32Z steveebersole $
+package mapping.filter;
+
+import java.util.Date;
+import java.util.Set;
+
+/**
+ * Implementation of Category.
+ *
+ * @author Steve Ebersole
+ */
+public class Category {
+ private Long id;
+ private String name;
+ private Date effectiveStartDate;
+ private Date effectiveEndDate;
+ private Set products;
+
+ public Category() {
+ }
+
+ public Category(String name) {
+ this.name = name;
+ }
+
+ public Category(String name, Date effectiveStartDate, Date effectiveEndDate) {
+ this.name = name;
+ this.effectiveStartDate = effectiveStartDate;
+ this.effectiveEndDate = effectiveEndDate;
+ }
+
+ 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 Date getEffectiveStartDate() {
+ return effectiveStartDate;
+ }
+
+ public void setEffectiveStartDate(Date effectiveStartDate) {
+ this.effectiveStartDate = effectiveStartDate;
+ }
+
+ public Date getEffectiveEndDate() {
+ return effectiveEndDate;
+ }
+
+ public void setEffectiveEndDate(Date effectiveEndDate) {
+ this.effectiveEndDate = effectiveEndDate;
+ }
+
+ public Set getProducts() {
+ return products;
+ }
+
+ public void setProducts(Set products) {
+ this.products = products;
+ }
+
+ public boolean equals(Object o) {
+ if ( this == o ) return true;
+ if ( !( o instanceof Category ) ) return false;
+
+ final Category category = ( Category ) o;
+
+ if ( !name.equals( category.name ) ) {
+ return false;
+ }
+
+ if ( effectiveEndDate != null ?
+ !effectiveEndDate.equals( category.effectiveEndDate ) :
+ category.effectiveEndDate != null ) {
+ return false;
+ }
+
+ if ( effectiveStartDate != null ?
+ !effectiveStartDate.equals( category.effectiveStartDate ) :
+ category.effectiveStartDate != null ) {
+ return false;
+ }
+
+ return true;
+ }
+
+ public int hashCode() {
+ int result;
+ result = name.hashCode();
+ result = 29 * result + ( effectiveStartDate != null ? effectiveStartDate.hashCode() : 0
);
+ result = 29 * result + ( effectiveEndDate != null ? effectiveEndDate.hashCode() : 0 );
+ return result;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.hbm.xml 2007-07-17
16:32:28 UTC (rev 2478)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping
+ SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.filter">
+
+ <class name="Department" table="DEPARTMENT">
+ <id name="id" column="DEPT_ID" type="long">
+ <generator class="native"/>
+ </id>
+
+ <property name="name" column="REG"
type="string"/>
+
+ <set name="salespersons" cascade="save-update"
inverse="true">
+ <key column="DEPT_ID"/>
+ <one-to-many class="Salesperson"/>
+ <filter name="seniorSalespersons"><![CDATA[`hire dt` <
:asOfDate]]></filter>
+ </set>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Department.java 2007-07-17
16:32:28 UTC (rev 2478)
@@ -0,0 +1,40 @@
+// $Id: Department.java 4448 2004-08-28 02:29:05Z steveebersole $
+package mapping.filter;
+
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * Implementation of Department.
+ *
+ * @author Steve
+ */
+public class Department {
+ private Long id;
+ private String name;
+ private Set salespersons = new HashSet();
+
+ 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 Set getSalespersons() {
+ return salespersons;
+ }
+
+ public void setSalespersons(Set salespersons) {
+ this.salespersons = salespersons;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.hbm.xml 2007-07-17
16:32:28 UTC (rev 2478)
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping
+ SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.filter">
+
+ <class name="LineItem" table="ORDER_ITEM">
+ <id name="id" column="ITEM_ID" >
+ <generator class="native"/>
+ </id>
+
+ <many-to-one name="order" class="Order"
column="ORDER_ID" cascade="none"/>
+ <property name="sequence" column="SEQ"
type="int"/>
+ <many-to-one name="product" class="Product"
column="PRODUCT_ID" cascade="none"/>
+ <property name="quantity" column="AMT"
type="long"/>
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/LineItem.java 2007-07-17
16:32:28 UTC (rev 2478)
@@ -0,0 +1,67 @@
+// $Id: LineItem.java 4046 2004-07-20 04:07:40Z steveebersole $
+package mapping.filter;
+
+/**
+ * Implementation of LineItem.
+ *
+ * @author Steve
+ */
+public class LineItem {
+ private Long id;
+ private Order order;
+ private int sequence;
+ private Product product;
+ private long quantity;
+
+ /*package*/ LineItem() {}
+
+ public static LineItem generate(Order order, int sequence, Product product, long
quantity) {
+ LineItem item = new LineItem();
+ item.order = order;
+ item.sequence = sequence;
+ item.product = product;
+ item.quantity = quantity;
+ item.order.getLineItems().add(sequence, item);
+ return item;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public Order getOrder() {
+ return order;
+ }
+
+ public void setOrder(Order order) {
+ this.order = order;
+ }
+
+ public int getSequence() {
+ return sequence;
+ }
+
+ public void setSequence(int sequence) {
+ this.sequence = sequence;
+ }
+
+ public Product getProduct() {
+ return product;
+ }
+
+ public void setProduct(Product product) {
+ this.product = product;
+ }
+
+ public long getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(long quantity) {
+ this.quantity = quantity;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.hbm.xml 2007-07-17
16:32:28 UTC (rev 2478)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping
+ SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.filter">
+
+ <class name="Order" table="T_ORDER">
+ <id name="id" column="ORDER_ID" type="long">
+ <generator class="native"/>
+ </id>
+
+ <property name="region" column="REG"
type="string"/>
+ <property name="buyer" column="BUYER"
type="string"/>
+ <property name="placementDate" column="`ord dt`"
type="java.util.Date"/>
+ <property name="fulfillmentDate" column="`close dt`"
type="java.util.Date"/>
+
+ <many-to-one name="salesperson" class="Salesperson"
column="SALES_PERSON_ID"/>
+
+ <list cascade="all-delete-orphan" inverse="true"
name="lineItems">
+ <key column="ORDER_ID"/>
+ <index column="SEQ"/>
+ <one-to-many class="LineItem"/>
+ </list>
+
+ <filter name="region" condition="REG = :region"/>
+ <filter name="fulfilledOrders"><![CDATA[`close dt` <
:asOfDate]]></filter>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Order.java 2007-07-17
16:32:28 UTC (rev 2478)
@@ -0,0 +1,87 @@
+// $Id: Order.java 4222 2004-08-10 05:19:46Z steveebersole $
+package mapping.filter;
+
+import java.util.Date;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author Steve Ebersole
+ */
+public class Order {
+ private Long id;
+ private String region;
+ private Date placementDate;
+ private Date fulfillmentDate;
+ private Salesperson salesperson;
+ private String buyer;
+ private List lineItems = new ArrayList();
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public Date getPlacementDate() {
+ return placementDate;
+ }
+
+ public void setPlacementDate(Date placementDate) {
+ this.placementDate = placementDate;
+ }
+
+ public Date getFulfillmentDate() {
+ return fulfillmentDate;
+ }
+
+ public void setFulfillmentDate(Date fulfillmentDate) {
+ this.fulfillmentDate = fulfillmentDate;
+ }
+
+ public Salesperson getSalesperson() {
+ return salesperson;
+ }
+
+ public void setSalesperson(Salesperson salesperson) {
+ this.salesperson = salesperson;
+ }
+
+ public String getBuyer() {
+ return buyer;
+ }
+
+ public void setBuyer(String buyer) {
+ this.buyer = buyer;
+ }
+
+ public List getLineItems() {
+ return lineItems;
+ }
+
+ protected void setLineItems(List lineItems) {
+ this.lineItems = lineItems;
+ }
+
+ public LineItem addLineItem(Product product, long quantity) {
+ return LineItem.generate(this, getLineItems().size(), product, quantity);
+ }
+
+ public void removeLineItem(LineItem item) {
+ removeLineItem( item.getSequence() );
+ }
+
+ public void removeLineItem(int sequence) {
+ getLineItems().remove(sequence);
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.hbm.xml 2007-07-17
16:32:28 UTC (rev 2478)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping
+ SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.filter">
+
+ <class name="Product" table="PRODUCT">
+ <id name="id" column="PROD_ID" >
+ <generator class="native"/>
+ </id>
+
+ <property name="name" type="string"/>
+ <property name="stockNumber" column="STOCK_NUM"
type="int"/>
+
+ <property name="effectiveStartDate" column="eff_start_dt"
type="java.util.Date"/>
+ <property name="effectiveEndDate" column="eff_end_dt"
type="java.util.Date"/>
+
+ <set cascade="none" inverse="true"
name="orderLineItems">
+ <key column="PROD_ID"/>
+ <one-to-many class="LineItem"/>
+ </set>
+
+ <set cascade="all" inverse="false"
name="categories" fetch="join" table="PROD_CAT" >
+ <key column="PROD_ID"/>
+ <many-to-many class="Category" column="CAT_ID"
fetch="join" >
+ <filter name="effectiveDate" condition=":asOfDate BETWEEN
eff_start_dt and eff_end_dt"/>
+ <filter name="cat" condition="CAT_ID = :catId"/>
+ </many-to-many>
+ </set>
+
+ <filter name="effectiveDate" condition=":asOfDate BETWEEN
eff_start_dt and eff_end_dt"/>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Product.java 2007-07-17
16:32:28 UTC (rev 2478)
@@ -0,0 +1,99 @@
+// $Id: Product.java 6507 2005-04-25 16:57:32Z steveebersole $
+package mapping.filter;
+
+import java.util.Set;
+import java.util.Date;
+import java.util.HashSet;
+
+/**
+ * @author Steve Ebersole
+ */
+public class Product {
+ private Long id;
+ private String name;
+ private int stockNumber; // int for ease of hashCode() impl
+ private Date effectiveStartDate;
+ private Date effectiveEndDate;
+ private Set orderLineItems;
+ private Set categories;
+
+ 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 Set getOrderLineItems() {
+ return orderLineItems;
+ }
+
+ public void setOrderLineItems(Set orderLineItems) {
+ this.orderLineItems = orderLineItems;
+ }
+
+ public int getStockNumber() {
+ return stockNumber;
+ }
+
+ public void setStockNumber(int stockNumber) {
+ this.stockNumber = stockNumber;
+ }
+
+ public int hashCode() {
+ return stockNumber;
+ }
+
+ public boolean equals(Object obj) {
+ return ( (Product) obj ).stockNumber == this.stockNumber;
+ }
+
+ public Date getEffectiveStartDate() {
+ return effectiveStartDate;
+ }
+
+ public void setEffectiveStartDate(Date effectiveStartDate) {
+ this.effectiveStartDate = effectiveStartDate;
+ }
+
+ public Date getEffectiveEndDate() {
+ return effectiveEndDate;
+ }
+
+ public void setEffectiveEndDate(Date effectiveEndDate) {
+ this.effectiveEndDate = effectiveEndDate;
+ }
+
+ public Set getCategories() {
+ return categories;
+ }
+
+ public void setCategories(Set categories) {
+ this.categories = categories;
+ }
+
+ public void addCategory(Category category) {
+ if ( category == null ) {
+ return;
+ }
+
+ if ( categories == null ) {
+ categories = new HashSet();
+ }
+
+ categories.add( category );
+ if ( category.getProducts() == null ) {
+ category.setProducts( new HashSet() );
+ }
+ category.getProducts().add( this );
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.hbm.xml 2007-07-17
16:32:28 UTC (rev 2478)
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping
+ SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping package="mapping.filter">
+
+ <class name="Salesperson" table="SALES_PERSON">
+ <id name="id" column="SALES_PERSON_ID" >
+ <generator class="native"/>
+ </id>
+
+ <property name="name" column="NAME"
type="string"/>
+ <property name="region" column="REG"
type="string"/>
+
+ <many-to-one name="department" cascade="none"
class="Department" column="DEPT_ID"/>
+
+ <property name="hireDate" column="`hire dt`"
type="java.util.Date"/>
+
+ <set name="orders" cascade="none" inverse="true"
fetch="join">
+ <key column="SALES_PERSON_ID"/>
+ <one-to-many class="Order"/>
+ <filter name="region" condition="REG = :region"/>
+ <filter name="fulfilledOrders"><![CDATA[`close dt` <
:asOfDate]]></filter>
+ </set>
+
+ <filter name="region" condition="REG = :region"/>
+ <filter name="regionlist" condition="REG IN (:regions)"/>
+
+ </class>
+
+</hibernate-mapping>
\ No newline at end of file
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.java
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.java
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/Salesperson.java 2007-07-17
16:32:28 UTC (rev 2478)
@@ -0,0 +1,68 @@
+// $Id: Salesperson.java 4448 2004-08-28 02:29:05Z steveebersole $
+package mapping.filter;
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Date;
+
+/**
+ * Implementation of Salesperson.
+ *
+ * @author Steve
+ */
+public class Salesperson {
+ private Long id;
+ private String name;
+ private String region;
+ private Date hireDate;
+ private Department department;
+ private Set orders = new HashSet();
+
+ 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 String getRegion() {
+ return region;
+ }
+
+ public void setRegion(String region) {
+ this.region = region;
+ }
+
+ public Set getOrders() {
+ return orders;
+ }
+
+ public void setOrders(Set orders) {
+ this.orders = orders;
+ }
+
+ public Date getHireDate() {
+ return hireDate;
+ }
+
+ public void setHireDate(Date hireDate) {
+ this.hireDate = hireDate;
+ }
+
+ public Department getDepartment() {
+ return department;
+ }
+
+ public void setDepartment(Department department) {
+ this.department = department;
+ }
+}
Added:
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/defs.hbm.xml
===================================================================
---
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/defs.hbm.xml
(rev 0)
+++
trunk/hibernatetools/sampleprojects/org.jboss.tools.hibernate.sampleproject.mappingtypes/src/mapping/filter/defs.hbm.xml 2007-07-17
16:32:28 UTC (rev 2478)
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping
+ SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
+
+<hibernate-mapping>
+ <filter-def name="region">
+ <filter-param name="region" type="string"/>
+ </filter-def>
+
+ <filter-def name="regionlist">
+ <filter-param name="regions" type="string"/>
+ </filter-def>
+
+ <filter-def name="fulfilledOrders">
+ <filter-param name="asOfDate" type="timestamp"/>
+ </filter-def>
+
+ <filter-def name="effectiveDate">
+ <filter-param name="asOfDate" type="timestamp"/>
+ </filter-def>
+
+ <filter-def name="seniorSalespersons">
+ <filter-param name="asOfDate" type="timestamp"/>
+ </filter-def>
+
+ <filter-def name="cat">
+ <filter-param name="catId" type="long"/>
+ </filter-def>
+</hibernate-mapping>
\ No newline at end of file
Show replies by date