org.syrup.helpers
Class TemplateImpl

java.lang.Object
  extended byorg.syrup.helpers.TemplateImpl
All Implemented Interfaces:
Template
Direct Known Subclasses:
LogEntryTemplateImpl, PTaskTemplateImpl

public class TemplateImpl
extends java.lang.Object
implements Template

A generic PTaskTemplate implementation.

Author:
Robbert van Dalen

Field Summary
protected  java.util.Hashtable operators
           
protected  java.util.Hashtable values
           
 
Fields inherited from interface org.syrup.Template
EQUAL, GREATER, GREATER_EQUAL, IGNORE, LESS, LESS_EQUAL, LIKE, NOT, NOT_LIKE
 
Constructor Summary
TemplateImpl(java.lang.String[] specification)
          Constructor for the TemplateImpl object
 
Method Summary
protected static int operator(java.lang.Object v)
          Maps an Object to a qualifier
protected static boolean to_boolean(java.lang.String b)
          Parses a String into a boolean.
protected static long to_date(java.lang.String l)
           
protected static long to_number(java.lang.String l)
          Parses a String into a long.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

operators

protected java.util.Hashtable operators

values

protected java.util.Hashtable values
Constructor Detail

TemplateImpl

public TemplateImpl(java.lang.String[] specification)
             throws java.lang.Exception
Constructor for the TemplateImpl object

Parameters:
specification - The query specification
Method Detail

to_date

protected static long to_date(java.lang.String l)
Parameters:
l - Description of the Parameter Description of the Return Value

to_number

protected static final long to_number(java.lang.String l)
Parses a String into a long.

Parameters:
l - The String to be parsed
Returns:
The parsed String.

to_boolean

protected static final boolean to_boolean(java.lang.String b)
Parses a String into a boolean.

Parameters:
b - Description of the Parameter
Returns:
The parsed String.

operator

protected static int operator(java.lang.Object v)
Maps an Object to a qualifier

Parameters:
v - The Object to be mapped. The Object should be of type String.
Returns:
The mapped qualifier.