|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--planetj.database.Field | +--planetj.database.field.DateField
Nested Class Summary |
Nested classes inherited from class planetj.database.Field |
Field.FieldLocation |
Field Summary | |
static String |
DEFAULT_FORMAT
|
static Date |
INVALID_DATE
|
static String |
ISO_FORMAT
|
static String |
LENIENT
|
static Date |
NULL_DATE
|
Fields inherited from interface planetj.dataengine.security.IGuarded |
TYPE_ID_UNKNOWN, TYPE_NAME_FIELD, TYPE_NAME_SQLOPERATION, TYPE_SECURED_BY_LEVEL, TYPE_SECURED_BY_OPERATION, TYPE_UNSECURED |
Constructor Summary | |
DateField()
|
Method Summary | |
Field |
cloneField()
Returns a clone of the Field. |
Object |
createObject(String pStringValue)
Create an object for this Field type using the given String. |
Object |
getCopiedValue()
Gets an independent copy of this field's value. |
String |
getCSVField()
Returns the String value of the Object, that will be written to the CSV file. |
String |
getCSVFormat()
Returns the CSV Format Creation date: (5/11/2002 7:56:58 PM) |
Object |
getCurrentValue(ExecutingContext ec)
Gets the default current value for this field as a String. |
String |
getCurrentValueAsString(ExecutingContext ec)
Gets the default current value for this field as a String. |
String |
getDefaultDatabaseValue()
Subclass must override this method and return a default value to be placed in the database when this field is Not-nullable and not required. |
String |
getDefaultFormat()
Returns the Default Format Creation date: (5/11/2002 7:56:58 PM) |
String |
getDisplayFormat()
Returns the Default Format Creation date: (5/11/2002 7:56:58 PM) |
String |
getDisplayValue()
Returns the display value of this field as a String. |
String |
getDisplayValue(Object value)
Returns the display value of this field as a String. |
String |
getISOFormat()
Returns the CSV Format Creation date: (5/11/2002 7:56:58 PM) |
String |
getJulianFormat()
|
static String |
getNullString()
Returns the CSV Format Creation date: (5/11/2002 7:56:58 PM) |
String |
getPossibleFormats()
This method should be overriden by subclasses that want to display possible or valid values to a user Example PhoneNumber would return "Examples: (123) 456-7890, 1234567890, 123-456-78890" Creation date: (4/5/2002 2:52:46 PM) |
Object |
getSQLObject()
Gets this field's value as an Object in SQL format. |
String |
getSQLValue(boolean pUseOriginalValue)
Returns the Field's name and value in SQL format. |
String |
getValidValuesString()
This method should be overriden by subclasses that want to display possible or valid values to a user Example PhoneNumber would return "Examples: (123) 456-7890, 1234567890, 123-456-78890" Creation date: (4/5/2002 2:52:46 PM) |
Object |
getValue()
Returns the value of this field as a Date Object The display value is detirmined by the FieldClass parameter Creation date: (4/8/2002 9:42:38 AM) |
boolean |
getValueAsBoolean()
Subclasses must override this to detirmine what their boolean value is. |
String |
getValueAsString()
Returns the value of this field as a String. |
String |
getValueAsString(Object value)
Returns the value of this field as a String. |
static short |
guessFieldClassProbability(FieldDescriptorRow pFDRow,
RowCollection pSampleData)
Subclasses will override to take an educated guess at what the Field Class will be for this FD Row. |
boolean |
isDate()
Subclasses should override to change the value |
boolean |
isValidLength(ExecutingContext ec)
Validate this Field based on its max length attribute. |
boolean |
isValidValue(ExecutingContext ec)
Validate this Field value. |
boolean |
isValueEqual(Object obj)
Returns a boolean indicating if this field is equal to the supplied object. |
boolean |
isValueGreaterThan(Object obj)
Returns a boolean indicating if this field is greater than the supplied object. |
boolean |
isValueLessThan(Object obj)
Returns a boolean indicating if this field is less then the supplied object. |
void |
setValue(long millis)
Sets the current value of the Field to the specified value, and also sets the old value to the previous value. |
void |
setValue(Object pValue)
Sets the current value of the Field to the specified value, and also sets the old value to the previous value. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String DEFAULT_FORMAT
public static String ISO_FORMAT
public static final Date NULL_DATE
public static final Date INVALID_DATE
public static final String LENIENT
Constructor Detail |
public DateField()
Method Detail |
public Field cloneField() throws CMException
cloneField
in class Field
CMException
public Object createObject(String pStringValue) throws ValidationException
createObject
in class Field
pStringValue
- String
ValidationException
public Object getCopiedValue()
getCopiedValue
in class Field
public String getCSVField()
Character string in the format MM/DD/YYYY where MM and DD have leading zeros for values less than ten. If this is a TimeField the format is HH:mm:ss where HH, mm, and ss have leading zeros for values less than ten. The string is not enclosed by double quotation marks.
In a CMException was thrown, or there were problems, then [Invalid Field] will be returned Creation date: (4/22/2002 2:28:48 PM)
getCSVField
in interface ICSVField
getCSVField
in class Field
public String getCSVFormat()
public Object getCurrentValue(ExecutingContext ec)
getCurrentValue
in class Field
public String getCurrentValueAsString(ExecutingContext ec)
getCurrentValueAsString
in class Field
public String getDefaultDatabaseValue() throws CMException
Example: A SS# is not required to be filled in by users, but the database does not allow nulls in that field. SocialSecurityField must override this method and return a default value like -1; Creation date: (4/9/2002 4:51:06 PM)
getDefaultDatabaseValue
in class Field
CMException
public String getDefaultFormat()
public String getDisplayFormat()
public String getDisplayValue()
getDisplayValue
in class Field
public String getDisplayValue(Object value)
public String getISOFormat()
public String getJulianFormat()
public static String getNullString()
public String getPossibleFormats() throws CMException
CMException
public Object getSQLObject() throws CMException
getSQLObject
in class Field
CMException
public String getSQLValue(boolean pUseOriginalValue) throws CMException
getSQLValue
in class Field
pUseOriginalValue
-
CMException
public String getValidValuesString() throws CMException
getValidValuesString
in class Field
CMException
public Object getValue()
getValue
in interface INamed
getValue
in class Field
public boolean getValueAsBoolean()
getValueAsBoolean
in class Field
public String getValueAsString()
getValueAsString
in class Field
public String getValueAsString(Object value)
public static short guessFieldClassProbability(FieldDescriptorRow pFDRow, RowCollection pSampleData)
public boolean isDate()
isDate
in class Field
public boolean isValidLength(ExecutingContext ec)
isValidLength
in class Field
ec
- The current executing context, which may be null
public boolean isValidValue(ExecutingContext ec)
isValidValue
in class Field
ec
- The executing context, which may be null
public boolean isValueEqual(Object obj)
isValueEqual
in class Field
public boolean isValueGreaterThan(Object obj)
isValueGreaterThan
in class Field
public boolean isValueLessThan(Object obj)
isValueLessThan
in class Field
public void setValue(long millis) throws CMException
Field
setValue
in class Field
CMException
public void setValue(Object pValue) throws CMException
setValue
in class Field
CMException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |