com.jgoodies.validation.tutorial.shared
Class Order

java.lang.Object
  extended by com.jgoodies.binding.beans.Model
      extended by com.jgoodies.validation.tutorial.shared.Order
All Implemented Interfaces:
com.jgoodies.binding.beans.Observable, Serializable

public class Order
extends com.jgoodies.binding.beans.Model

Describes an order that demonstrates different types of constraints. The property constraints are: mandatory vs. optional, minimum and maximum length, minimum and maximum values, linked constraints. Provides the following bound properties: orderNo, orderDate, deliveryDate, deliveryNotes.

Version:
$Revision: 1.10 $
Author:
Karsten Lentzsch
See Also:
Serialized Form

Field Summary
static String PROPERTYNAME_DELIVERY_DATE
           
static String PROPERTYNAME_DELIVERY_NOTES
           
static String PROPERTYNAME_ORDER_DATE
           
static String PROPERTYNAME_ORDER_NO
           
 
Constructor Summary
Order()
          Constructs an empty Order.
 
Method Summary
 Date getDeliveryDate()
          Returns the date that describes when the product has been delivered.
 String getDeliveryNotes()
          Returns this order's optional delivery notes that describe the delivery, packaging or shipment.
 Date getOrderDate()
          Returns the date that describes when this order has been initiated by the customer.
 String getOrderNo()
          Returns this order's unique id.
 void setDeliveryDate(Date newDate)
          Sets this order's delivery date.
 void setDeliveryNotes(String newNotes)
          Sets this order's optional delivery notes that describe the delivery, packaging or shipment.
 void setOrderDate(Date newDate)
          Sets this order's order date that describes when the order has been initiated by the customer.
 void setOrderNo(String newValue)
          Sets a new unique order number.
 
Methods inherited from class com.jgoodies.binding.beans.Model
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTYNAME_DELIVERY_DATE

public static final String PROPERTYNAME_DELIVERY_DATE
See Also:
Constant Field Values

PROPERTYNAME_DELIVERY_NOTES

public static final String PROPERTYNAME_DELIVERY_NOTES
See Also:
Constant Field Values

PROPERTYNAME_ORDER_DATE

public static final String PROPERTYNAME_ORDER_DATE
See Also:
Constant Field Values

PROPERTYNAME_ORDER_NO

public static final String PROPERTYNAME_ORDER_NO
See Also:
Constant Field Values
Constructor Detail

Order

public Order()
Constructs an empty Order.

Method Detail

getOrderNo

public String getOrderNo()
Returns this order's unique id.

Returns:
the order's no, a system wide unique id
See Also:
setOrderNo(String)

setOrderNo

public void setOrderNo(String newValue)
Sets a new unique order number.

Parameters:
newValue - the order number to be set
See Also:
getOrderNo()

getOrderDate

public Date getOrderDate()
Returns the date that describes when this order has been initiated by the customer.

Returns:
the order date
See Also:
setOrderDate(Date)

setOrderDate

public void setOrderDate(Date newDate)
Sets this order's order date that describes when the order has been initiated by the customer. Stores the new Date's time, not the Date itself, to avoid external modifications.

Parameters:
newDate - the order date to be set
See Also:
getOrderDate(), getDeliveryDate()

getDeliveryDate

public Date getDeliveryDate()
Returns the date that describes when the product has been delivered.

Returns:
the delivery date
See Also:
setDeliveryDate(Date), getOrderDate()

setDeliveryDate

public void setDeliveryDate(Date newDate)
Sets this order's delivery date. Stores the new Date's time, not the Date itself, to avoid external modifications.

Parameters:
newDate - the delivery date to be set
See Also:
getDeliveryDate(), getOrderDate()

getDeliveryNotes

public String getDeliveryNotes()
Returns this order's optional delivery notes that describe the delivery, packaging or shipment.

Returns:
the delivery notes
See Also:
setDeliveryNotes(String)

setDeliveryNotes

public void setDeliveryNotes(String newNotes)
Sets this order's optional delivery notes that describe the delivery, packaging or shipment.

Parameters:
newNotes - the delivery notes to be set
See Also:
getDeliveryNotes()


Copyright © 2003-2008 JGoodies Karsten Lentzsch. All Rights Reserved.