All Packages Class Hierarchy This Package Previous Next Index
Class xBaseJ.DateField
java.lang.Object
|
+----xBaseJ.Field
|
+----xBaseJ.DateField
- public class DateField
- extends Field
-
DateField(String)
-
public method for creating a DateField object.
-
compareTo(Calendar)
-
public method for comparing a Java Calendar object.
-
compareTo(DateField)
-
public method for comparing a DateField object.
-
get(int)
-
public method for getting individual field values
-
getCalendar()
-
public method for returing the date field in a Java Calendar object.
-
getType()
- return the character 'D' indicating a date field
-
put(Calendar)
-
sets field contents by a Java Calendar object.
-
put(Date)
-
sets field contents by a Java Date object.
-
put(long)
-
sets field contents by a long value
-
put(String)
-
sets field contents by a String parameter.
-
set(int, int)
-
public method for setting individual field values
-
type()
- return the character 'D' indicating a date field
Deprecated.
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
type
public char type()
- Note: type() is deprecated.
use getType
- return the character 'D' indicating a date field
- Overrides:
- type in class Field
getType
public char getType()
- return the character 'D' indicating a date field
- Overrides:
- getType in class Field
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
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
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
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
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
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
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
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
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