All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class xBaseJ.DateField

java.lang.Object
   |
   +----xBaseJ.Field
           |
           +----xBaseJ.DateField

public class DateField
extends Field

Constructor Index

 o DateField(String)
public method for creating a DateField object.

Method Index

 o compareTo(Calendar)
public method for comparing a Java Calendar object.
 o compareTo(DateField)
public method for comparing a DateField object.
 o get(int)
public method for getting individual field values
 o getCalendar()
public method for returing the date field in a Java Calendar object.
 o getType()
return the character 'D' indicating a date field
 o put(Calendar)
sets field contents by a Java Calendar object.
 o put(Date)
sets field contents by a Java Date object.
 o put(long)
sets field contents by a long value
 o put(String)
sets field contents by a String parameter.
 o set(int, int)
public method for setting individual field values
 o type()
return the character 'D' indicating a date field Deprecated.

Constructors

 o DateField
 public DateField(String iName) throws IOException, xBaseJException
public method for creating a DateField object. It is not associated with a database but can be when used with some DBF methods.

Parameters:
Name - the name of the field
Throws: xBaseJException
exception caused in calling methods
Throws: IOException
can not occur but defined for calling methods
See Also:
Field

Methods

 o type
 public char type()
Note: type() is deprecated. use getType

return the character 'D' indicating a date field

Overrides:
type in class Field
 o getType
 public char getType()
return the character 'D' indicating a date field

Overrides:
getType in class Field
 o put
 public void put(String inValue) throws xBaseJException
sets field contents by a String parameter.

Parameters:
inValue - String value to store - format CCYYMMDD
Throws: xBaseJException
most likely a format error
Overrides:
put in class Field
 o put
 public void put(Date inValue) throws xBaseJException
sets field contents by a Java Date object.

Parameters:
inValue - java.util.Date value to store
Throws: xBaseJException
most likely a format error
 o put
 public void put(Calendar inValue) throws xBaseJException
sets field contents by a Java Calendar object.

Parameters:
inValue - java.util.Calendare value to store
Throws: xBaseJException
most likely a format error
 o put
 public void put(long inValue) throws xBaseJException
sets field contents by a long value

Parameters:
inValue - long value to store - format CCYYMMDD
Throws: xBaseJException
most likely a format error
 o compareTo
 public int compareTo(DateField compareThis)
public method for comparing a DateField object.

Parameters:
compareThis - the other DateField object to compare
Returns:
s negative if compareThis is larger, zero if equal, positive if smaller
 o compareTo
 public int compareTo(Calendar compareThis) throws xBaseJException
public method for comparing a Java Calendar object.

Parameters:
compareThis - the Date object to compare
Returns:
s negative if compareThis is larger, zero if equal, positive if smaller
Throws: xBaseJException
exception caused in calling methods
 o getCalendar
 public Calendar getCalendar() throws xBaseJException
public method for returing the date field in a Java Calendar object.

Returns:
s a Calendaar object
Throws: xBaseJException
exception caused in calling methods
 o get
 public String get(int field) throws xBaseJException
public method for getting individual field values

Parameters:
field - id, use Calendar.YEAR, Calendar.MONTh, Calendar.DAY_OF_MONTH
Returns:
s String of fields value
Throws: xBaseJException
exception caused in calling methods
 o set
 public void set(int field,
                 int value) throws xBaseJException
public method for setting individual field values

Parameters:
field - use Calendar.YEAR, Calendar.MONTh, Calendar.DAY_OF_MONTH
value - - int value to set field
Returns:
s String of fields value
Throws: xBaseJException
exception caused in calling methods

All Packages  Class Hierarchy  This Package  Previous  Next  Index