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

java.lang.Object
  extended by com.hardcode.gdbms.engine.data.metadata.DefaultMetadata
All Implemented Interfaces:
Metadata

public class DefaultMetadata
extends java.lang.Object
implements Metadata


Constructor Summary
DefaultMetadata(DriverMetadata driverMetadata, TypeConverter driver, boolean[] readOnly, java.lang.String[] pks)
           
DefaultMetadata(int[] fieldTypes, java.lang.String[] fieldNames, java.lang.String[] fieldPrimaryKeys, boolean[] fieldReadOnly)
           
 
Method Summary
 int getFieldCount()
           
 java.lang.String getFieldName(int fieldId)
          Gets the name of the specified field
 int getFieldType(int fieldId)
          Gets the type of the specified field
 java.lang.String[] getPrimaryKey()
          Gets the names of the primary key fields
 java.lang.Boolean isReadOnly(int fieldId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMetadata

public DefaultMetadata(int[] fieldTypes,
                       java.lang.String[] fieldNames,
                       java.lang.String[] fieldPrimaryKeys,
                       boolean[] fieldReadOnly)

DefaultMetadata

public DefaultMetadata(DriverMetadata driverMetadata,
                       TypeConverter driver,
                       boolean[] readOnly,
                       java.lang.String[] pks)
                throws DriverException
Throws:
DriverException
Method Detail

getFieldCount

public int getFieldCount()
Specified by:
getFieldCount in interface Metadata
Returns:
Number of fields

getFieldType

public int getFieldType(int fieldId)
Description copied from interface: Metadata
Gets the type of the specified field

Specified by:
getFieldType in interface Metadata
Parameters:
fieldId - index of the field
Returns:

getFieldName

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

Specified by:
getFieldName in interface Metadata
Parameters:
fieldId - index of the field
Returns:
String

getPrimaryKey

public java.lang.String[] getPrimaryKey()
Description copied from interface: Metadata
Gets the names of the primary key fields

Specified by:
getPrimaryKey in interface Metadata
Returns:

isReadOnly

public java.lang.Boolean isReadOnly(int fieldId)
Specified by:
isReadOnly in interface Metadata
Parameters:
fieldId - index of the field
Returns:
True if the field is read only, false if not and null if the underlying format does not have information about


Copyright © 2005-2006 . All Rights Reserved.