satin.aro
Class AROdateTime

java.lang.Object
  |
  +--satin.aro.AROdateTime

public class AROdateTime
extends java.lang.Object

A simple date & time class for use in ARO requests. This class encapsulates the syntax for using a date & time in ARO requests. A date/time is represented in the ARO protocol syntax as a compound datum whose ARO data type is "datetime", and which contains six integer elements named, in order: "year", "month", "day", "hour", "minute", and "second".

Author:
Ed Stauff

Field Summary
final int day
          The day of the month (1-31).
final int hour
          The hour (0-23).
final int minute
          The minute (0-59).
final int month
          The month (1-12).
final int second
          The second (0-59).
final int year
          The year (full 4-digit value).
 
Constructor Summary
AROdateTime(AROcompoundDatum datum, int position)
          Constructs a date/time from the given data element.
AROdateTime(AROcompoundDatum datum, int position, java.lang.String paramName)
          Constructs a date/time from the given data element.
AROdateTime(int year, int month, int day, int hour, int minute, int second)
          Simple constructor.
 
Method Summary
void add(AROoutgoingData data)
          Adds a date/time to the given data.
static void add(AROoutgoingData data, int year, int month, int day, int hour, int minute, int second)
          Adds a date/time to the given data.
static void add(AROoutgoingData data, int year, int month, int day, int hour, int minute, int second, java.lang.String paramName)
          Adds a date/time to the given data.
void add(AROoutgoingData data, java.lang.String paramName)
          Adds a date/time to the given data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

year

public final int year
The year (full 4-digit value).

month

public final int month
The month (1-12).

day

public final int day
The day of the month (1-31).

hour

public final int hour
The hour (0-23).

minute

public final int minute
The minute (0-59).

second

public final int second
The second (0-59).
Constructor Detail

AROdateTime

public AROdateTime(int year,
                   int month,
                   int day,
                   int hour,
                   int minute,
                   int second)
Simple constructor.

Parameters:
year
year (full 4 digits).
month
month (1-12).
day
day of month (1-31).
hour
hour (0-23).
minute
minute (0-59).
second
second (0-59).

AROdateTime

public AROdateTime(AROcompoundDatum datum,
                   int position,
                   java.lang.String paramName)
Constructs a date/time from the given data element. The data element of 'datum', identified by 'position' and/or 'paramName', must be a compound data element that meets the requirements described above.

Parameters:
datum
the data element to get the date/time from.
position
the default position of the date/time data element.
paramName
the name of the date/time data element.

AROdateTime

public AROdateTime(AROcompoundDatum datum,
                   int position)
Constructs a date/time from the given data element. The data element of 'datum', identified by 'position' and/or 'paramName', must be a compound data element that meets the requirements described above.

Parameters:
datum
the data element to get the date/time from.
position
the position of the date/time data element.
Method Detail

add

public void add(AROoutgoingData data,
                java.lang.String paramName)
Adds a date/time to the given data.

Parameters:
data
the data to add the date/time to.
paramName
the parameter name for the date/time, null.

add

public void add(AROoutgoingData data)
Adds a date/time to the given data.

Parameters:
data
the data to add the date/time to.

add

public static void add(AROoutgoingData data,
                       int year,
                       int month,
                       int day,
                       int hour,
                       int minute,
                       int second,
                       java.lang.String paramName)
Adds a date/time to the given data.

Parameters:
year
year (full 4 digits).
month
month (1-12).
day
day of month (1-31).
hour
hour (0-23).
minute
minute (0-59).
second
second (0-59).
data
the data to add the date/time to.
paramName
the parameter name for the date/time, or null.

add

public static void add(AROoutgoingData data,
                       int year,
                       int month,
                       int day,
                       int hour,
                       int minute,
                       int second)
Adds a date/time to the given data.

Parameters:
year
year (full 4 digits).
month
month (1-12).
day
day of month (1-31).
hour
hour (0-23).
minute
minute (0-59).
second
second (0-59).
data
the data to add the date/time to.
Revision History

4/6/01 Ed Stauff - changes per initial code review.

4/6/01 Ed Stauff - file created.



Generated on 5/9/2001 19:37 from AROdateTime.java (PRIVATE SOURCES)