|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xBaseJ.fields.Field
org.xBaseJ.fields.DateField
public class DateField
This class is courtesy of the xBaseJ project: http://xbasej.sourceforge.net/ Copyright 1997-2007 - American Coders, LTD - Raleigh NC USA
American Coders, Ltd P. O. Box 97462 Raleigh, NC 27615 USA 1-919-846-2014 http://www.americancoders.com
| Field Summary |
|---|
| Fields inherited from class org.xBaseJ.fields.Field |
|---|
buffer, bytebuffer, deleted, myoffset, name, nength, otherValidCharacters |
| Constructor Summary | |
|---|---|
DateField(String iName)
public method for creating a DateField object. |
|
DateField(String iName,
ByteBuffer inBuffer)
|
|
| Method Summary | |
|---|---|
Object |
clone()
|
int |
compareTo(Calendar compareThis)
public method for comparing a Java Calendar object. |
int |
compareTo(DateField compareThis)
public method for comparing a DateField object. |
String |
get(int field)
public method for getting individual field values |
Calendar |
getCalendar()
public method for returing the date field in a Java Calendar object. |
char |
getType()
return the character 'D' indicating a date field |
void |
put(Calendar inValue)
sets field contents by a Java Calendar object. |
void |
put(Date inValue)
sets field contents by a Java Date object. |
void |
put(long inValue)
sets field contents by a long value |
void |
put(String inValue)
sets field contents by a String parameter. |
void |
set(int field,
int value)
public method for setting individual field values |
| Methods inherited from class org.xBaseJ.fields.Field |
|---|
get, getBytes, getDecimalPositionCount, getLength, getName, put, read, readExternal, setBuffer, setBufferSpace, setField, update, write, writeExternal |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DateField(String iName,
ByteBuffer inBuffer)
throws xBaseJException
xBaseJException
public DateField(String iName)
throws IOException,
xBaseJException
iName - the name of the field
xBaseJException - exception caused in calling methods
IOException - can not occur but defined for calling methodsField| Method Detail |
|---|
public Object clone()
throws CloneNotSupportedException
clone in class FieldCloneNotSupportedExceptionpublic char getType()
getType in class Field
public void put(String inValue)
throws xBaseJException
put in class FieldinValue - String value to store - format CCYYMMDD
xBaseJException - most likely a format error
public void put(Date inValue)
throws xBaseJException
inValue - java.util.Date value to store
xBaseJException - most likely a format error
public void put(Calendar inValue)
throws xBaseJException
inValue - java.util.Calendare value to store
xBaseJException - most likely a format error
public void put(long inValue)
throws xBaseJException
inValue - long value to store - format CCYYMMDD
xBaseJException - most likely a format errorpublic int compareTo(DateField compareThis)
compareThis - the other DateField object to compare
public int compareTo(Calendar compareThis)
throws xBaseJException
compareThis - the Date object to compare
xBaseJException - exception caused in calling methods
public Calendar getCalendar()
throws xBaseJException
xBaseJException - exception caused in calling methods
public String get(int field)
throws xBaseJException
field - id, use Calendar.YEAR, Calendar.MONTh, Calendar.DAY_OF_MONTH
xBaseJException - exception caused in calling methods
public void set(int field,
int value)
throws xBaseJException
field - use Calendar.YEAR, Calendar.MONTh, Calendar.DAY_OF_MONTHvalue - - int value to set field
xBaseJException - exception caused in calling methods
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||