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

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

public class TimeDefinition
extends java.lang.Object
implements Definition

A time field in a MobileDB record.

Use Time with this field.


Constructor Summary
TimeDefinition()
          Creates a new time field that does not default to the current time.
TimeDefinition(boolean defaultToCurrentTime)
          Creates a new time field.
TimeDefinition(java.lang.String indicator)
          Creates a new time field 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 isDefaultToCurrentTime()
          Gets the defaultToCurrentTime property.
 void setDefaultToCurrentTime(boolean defaultToCurrentDate)
          Sets the defaultToCurrentTime property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeDefinition

public TimeDefinition()
Creates a new time field that does not default to the current time.


TimeDefinition

public TimeDefinition(boolean defaultToCurrentTime)
Creates a new time field.

Parameters:
defaultToCurrentTime - true if the field should default to the current time; false otherwise

TimeDefinition

public TimeDefinition(java.lang.String indicator)
Creates a new time field 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

isDefaultToCurrentTime

public boolean isDefaultToCurrentTime()
Gets the defaultToCurrentTime property.

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

setDefaultToCurrentTime

public void setDefaultToCurrentTime(boolean defaultToCurrentDate)
Sets the defaultToCurrentTime property.

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