net.sourceforge.jpalm.mobiledb.field.definition
Class DateDefinition

java.lang.Object
  extended by net.sourceforge.jpalm.mobiledb.field.definition.DateDefinition
All Implemented Interfaces:
Definition

public class DateDefinition
extends java.lang.Object
implements Definition

A date field in a MobileDB record.

Use Date with this field.


Constructor Summary
DateDefinition()
          Creates a new date that does not default to the current date.
DateDefinition(boolean defaultToCurrentDate)
          Creates a new date.
DateDefinition(java.lang.String indicator)
          Creates a new date from the string representation for this type.
 
Method Summary
 java.lang.String getIndicator()
          Gets the string representation for this definition.
 java.lang.String getRegex()
          Gets the regular expression for this definition.
 boolean isDefaultToCurrentDate()
          Gets the defaultToCurrentDate property.
 void setDefaultToCurrentDate(boolean defaultToCurrentDate)
          Sets the defaultToCurrentDate property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateDefinition

public DateDefinition()
Creates a new date that does not default to the current date.


DateDefinition

public DateDefinition(boolean defaultToCurrentDate)
Creates a new date.

Parameters:
defaultToCurrentDate - true if the field should default to the current date; false otherwise

DateDefinition

public DateDefinition(java.lang.String indicator)
Creates a new date from the string representation for this type.

Parameters:
indicator - the string representation
Method Detail

getIndicator

public java.lang.String getIndicator()
Description copied from interface: Definition
Gets the string representation for this definition.

Specified by:
getIndicator in interface Definition
Returns:
the string representation

getRegex

public java.lang.String getRegex()
Description copied from interface: Definition
Gets the regular expression for this definition. The regular expression is compared to a field and if the field matches the expression then that field is of this definition.

Specified by:
getRegex in interface Definition
Returns:
the regular expression for this definition

isDefaultToCurrentDate

public boolean isDefaultToCurrentDate()
Gets the defaultToCurrentDate property.

Returns:
true if the date should default to the current date; false if it should default to null

setDefaultToCurrentDate

public void setDefaultToCurrentDate(boolean defaultToCurrentDate)
Sets the defaultToCurrentDate property.

Parameters:
defaultToCurrentDate - true if the date should default to the current date; false if it should default to null