com.hardcode.gdbms.engine.data.metadata
Class DefaultDriverMetadata

java.lang.Object
  extended by com.hardcode.gdbms.engine.data.metadata.DefaultDriverMetadata
All Implemented Interfaces:
DriverMetadata
Direct Known Subclasses:
DefaultSpatialDriverMetadata

public class DefaultDriverMetadata
extends java.lang.Object
implements DriverMetadata


Constructor Summary
DefaultDriverMetadata()
           
 
Method Summary
 void addField(java.lang.String name, java.lang.String typeName)
           
 void addField(java.lang.String name, java.lang.String typeName, java.lang.String[] paramNames, java.lang.String[] paramValues)
           
 int getFieldCount()
          Gets the number of fields
 java.lang.String getFieldName(int fieldId)
          Gets the name of the field.
 java.lang.String getFieldParam(int fieldId, java.lang.String paramName)
           
 java.util.HashMap<java.lang.String,java.lang.String> getFieldParams(int fieldId)
          Gets the parameters for the specified field
 java.lang.String getFieldType(int fieldId)
          Gets the name of the field type.
 java.lang.String[] getParamNames(int fieldId)
          Gets the param names for the specified field
 java.lang.String[] getParamValues(int fieldId)
          Gets the param values for the specified field
 java.lang.String[] getPrimaryKeys()
          Gets the names of the fields which are primary key.
 void setFieldType(int fieldIndex, java.lang.String driverType)
           
 void setPrimaryKey(java.lang.String[] pks)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDriverMetadata

public DefaultDriverMetadata()
Method Detail

addField

public void addField(java.lang.String name,
                     java.lang.String typeName,
                     java.lang.String[] paramNames,
                     java.lang.String[] paramValues)

addField

public void addField(java.lang.String name,
                     java.lang.String typeName)

getFieldType

public java.lang.String getFieldType(int fieldId)
Description copied from interface: DriverMetadata
Gets the name of the field type. It should be one of the values returned by the getAvailableTypes method in the driver

Specified by:
getFieldType in interface DriverMetadata
Returns:

getFieldName

public java.lang.String getFieldName(int fieldId)
Description copied from interface: DriverMetadata
Gets the name of the field.

Specified by:
getFieldName in interface DriverMetadata
Returns:

getFieldCount

public int getFieldCount()
Description copied from interface: DriverMetadata
Gets the number of fields

Specified by:
getFieldCount in interface DriverMetadata
Returns:

getFieldParam

public java.lang.String getFieldParam(int fieldId,
                                      java.lang.String paramName)
Specified by:
getFieldParam in interface DriverMetadata
Returns:

getParamNames

public java.lang.String[] getParamNames(int fieldId)
Description copied from interface: DriverMetadata
Gets the param names for the specified field

Specified by:
getParamNames in interface DriverMetadata
Returns:

getParamValues

public java.lang.String[] getParamValues(int fieldId)
Description copied from interface: DriverMetadata
Gets the param values for the specified field

Specified by:
getParamValues in interface DriverMetadata
Returns:

getFieldParams

public java.util.HashMap<java.lang.String,java.lang.String> getFieldParams(int fieldId)
                                                                    throws DriverException
Description copied from interface: DriverMetadata
Gets the parameters for the specified field

Specified by:
getFieldParams in interface DriverMetadata
Returns:
Throws:
DriverException

setFieldType

public void setFieldType(int fieldIndex,
                         java.lang.String driverType)

setPrimaryKey

public void setPrimaryKey(java.lang.String[] pks)

getPrimaryKeys

public java.lang.String[] getPrimaryKeys()
Description copied from interface: DriverMetadata
Gets the names of the fields which are primary key. An array of zero elements if there isn't any primary key

Specified by:
getPrimaryKeys in interface DriverMetadata
Returns:


Copyright © 2005-2006 . All Rights Reserved.