/**
 *  Generated with Tigerstripe(tm) Tigerstripe Workbench Feature 2.2.0.v20070419-1556-GFEkmUll2-0111E.
 *
 *  Tigerstripe(tm) is a registered trademark of Tigerstripe, Inc.
 *
 *  Plugin  : Sun Microsystems Inc./SunJavaSpecificationPlugin(1.0) (1.0)
 *
 *  DO NOT EDIT THIS CODE WAS AUTOMATICALLY GENERATED
 *
 *  Generated from source Tigerstipe Artifact :
 *        javax.oss.cbe.datatypes.TimePeriod
 *
 *  Using template :
 *        templates/1.3/datatypeInterface.vm
 *
 * Copyright 2002-2007 The Members of the OSS through Java(TM) Initiative.
 * All rights reserved. Use is subject to license terms.
 */
package javax.oss.cbe.datatypes;

import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.bind.annotation.XmlType;

import ossj.common.cbe.datatypes.TimePeriodAdapter;

@XmlType
@XmlJavaTypeAdapter(value=TimePeriodAdapter.class)

/**
 *  Public interface definition for TimePeriod.
 *
 * A base(value) entity used to represent a period of time.
 * A <CODE>TimePeriod</CODE> is a value entity and does not have any business
 * identity.
 *
 */
public interface TimePeriod 
	extends java.lang.Cloneable, java.io.Serializable {


    /**
     * Deep copy of this object.
     *
     * @return The cloned object
     */
    public Object clone();


    /**
     *
     * Attribute getter for startDateTime.
     *
     *
     * Sets the instant of time, starting the TimePeriod
     *
     * @return the value of the startDateTime field.
     *
     */
    public java.util.Date getStartDateTime( );


    /**
     * Attribute setter for startDateTime.
     *
     *
     * Sets the instant of time, starting the TimePeriod
     * @param value - the value to use to set the startDateTime attribute.
     * @throws java.lang.IllegalArgumentException
     *         Thrown to report that a bad argument was provided to the method.
     *
     */
    public void setStartDateTime(java.util.Date value)
        throws
        java.lang.IllegalArgumentException;

    /**
     *
     * Attribute getter for endDateTime.
     *
     *
     * Sets the instant of time, ending the TimePeriod
     *
     * @return the value of the endDateTime field.
     *
     */
    public java.util.Date getEndDateTime( );


    /**
     * Attribute setter for endDateTime.
     *
     *
     * Sets the instant of time, ending the TimePeriod
     * @param value - the value to use to set the endDateTime attribute.
     * @throws java.lang.IllegalArgumentException
     *         Thrown to report that a bad argument was provided to the method.
     *
     */
    public void setEndDateTime(java.util.Date value)
        throws
        java.lang.IllegalArgumentException;


    /**
     * User specified method - isWithin.
     *
     * true if current Date within the TimePeriod
     * (implementation may add time margins on both sides)
     *
     *    This method is MANDATORY
     * @return boolean
     * @param currentDate - 
     *
     */
    public boolean isWithin ( 
        java.util.Date currentDate);


}
