org.opengts.dbtypes
Class DTTemplate

java.lang.Object
  extended by org.opengts.dbtools.DBFieldType
      extended by org.opengts.dbtypes.DTTemplate

public class DTTemplate
extends DBFieldType


Nested Class Summary
static class DTTemplate.Field
          DTTemplate Field inner class
 
Constructor Summary
DTTemplate()
          Default constructor
DTTemplate(java.sql.ResultSet rs, java.lang.String fldName)
          Constructor
DTTemplate(java.lang.String template)
          Constructor
 
Method Summary
 void clearFields()
          Clears all fields defined by this DTTemplate
 DTTemplate.Field getField(int ndx)
          Returns the field at the specified index
 int getFieldCount()
          Gets the field count
 java.lang.Object getObject()
          Returns the String representation of this DTTemplate
 void setField(int ndx, DTTemplate.Field fld)
          Sets the field at the specified index
 java.lang.String toString()
          Returns the String representation of this DTTemplate
 
Methods inherited from class org.opengts.dbtools.DBFieldType
equals
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DTTemplate

public DTTemplate()
Default constructor


DTTemplate

public DTTemplate(java.lang.String template)
Constructor

Parameters:
template - The template String representation

DTTemplate

public DTTemplate(java.sql.ResultSet rs,
                  java.lang.String fldName)
           throws java.sql.SQLException
Constructor

Parameters:
rs - SQL ResultSet
fldName - Field name in ResultSet containing the field template
Throws:
java.sql.SQLException
Method Detail

getObject

public java.lang.Object getObject()
Returns the String representation of this DTTemplate

Specified by:
getObject in class DBFieldType
Returns:
The String representation of this DTTemplate

toString

public java.lang.String toString()
Returns the String representation of this DTTemplate

Specified by:
toString in class DBFieldType
Returns:
The String representation of this DTTemplate

clearFields

public void clearFields()
Clears all fields defined by this DTTemplate


getField

public DTTemplate.Field getField(int ndx)
Returns the field at the specified index

Parameters:
ndx - The index of the field to return
Returns:
The field at the specified index, or null if the field does not exist

getFieldCount

public int getFieldCount()
Gets the field count

Returns:
The cusrrent number of fields

setField

public void setField(int ndx,
                     DTTemplate.Field fld)
Sets the field at the specified index

Parameters:
ndx - The index of the field to set
fld - The field to set