org.postgresql.core
Class Field

java.lang.Object
  extended by org.postgresql.core.Field

public class Field
extends Object


Field Summary
static int BINARY_FORMAT
           
static int TEXT_FORMAT
           
 
Constructor Summary
Field(String name, int oid)
          Constructor without mod parameter.
Field(String name, int oid, int length, int mod)
          Construct a field based on the information fed to it.
Field(String columnLabel, String columnName, int oid, int length, int mod, int tableOid, int positionInTable)
          Construct a field based on the information fed to it.
 
Method Summary
 boolean getAutoIncrement()
           
 String getColumnLabel()
           
 String getColumnName()
           
 int getFormat()
           
 int getLength()
           
 int getMod()
           
 int getNullable()
           
 int getOID()
           
 String getPGType()
           
 int getPositionInTable()
           
 String getSchemaName()
           
 int getSQLType()
           
 String getTableName()
           
 int getTableOid()
           
 boolean isTypeInitialized()
           
 void setAutoIncrement(boolean autoIncrement)
           
 void setColumnName(String columnName)
           
 void setFormat(int format)
           
 void setNullable(int nullable)
           
 void setPGType(String pgType)
           
 void setSchemaName(String schemaName)
           
 void setSQLType(int sqlType)
           
 void setTableName(String tableName)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TEXT_FORMAT

public static final int TEXT_FORMAT
See Also:
Constant Field Values

BINARY_FORMAT

public static final int BINARY_FORMAT
See Also:
Constant Field Values
Constructor Detail

Field

public Field(String name,
             int oid,
             int length,
             int mod)
Construct a field based on the information fed to it.

Parameters:
name - the name (column name and label) of the field
oid - the OID of the field
length - the length of the field
mod - modifier

Field

public Field(String name,
             int oid)
Constructor without mod parameter.

Parameters:
name - the name (column name and label) of the field
oid - the OID of the field

Field

public Field(String columnLabel,
             String columnName,
             int oid,
             int length,
             int mod,
             int tableOid,
             int positionInTable)
Construct a field based on the information fed to it.

Parameters:
columnLabel - the column label of the field
columnName - the column label the name of the field
oid - the OID of the field
length - the length of the field
mod - modifier
tableOid - the OID of the columns' table
positionInTable - the position of column in the table (first column is 1, second column is 2, etc...)
Method Detail

getOID

public int getOID()
Returns:
the oid of this Field's data type

getMod

public int getMod()
Returns:
the mod of this Field's data type

getColumnLabel

public String getColumnLabel()
Returns:
the column label of this Field's data type

getLength

public int getLength()
Returns:
the length of this Field's data type

getFormat

public int getFormat()
Returns:
the format of this Field's data (text=0, binary=1)

setFormat

public void setFormat(int format)
Parameters:
format - the format of this Field's data (text=0, binary=1)

getTableOid

public int getTableOid()
Returns:
the columns' table oid, zero if no oid available

getPositionInTable

public int getPositionInTable()

setNullable

public void setNullable(int nullable)

getNullable

public int getNullable()

setAutoIncrement

public void setAutoIncrement(boolean autoIncrement)

getAutoIncrement

public boolean getAutoIncrement()

setColumnName

public void setColumnName(String columnName)

getColumnName

public String getColumnName()

setTableName

public void setTableName(String tableName)

getTableName

public String getTableName()

setSchemaName

public void setSchemaName(String schemaName)

getSchemaName

public String getSchemaName()

toString

public String toString()
Overrides:
toString in class Object

setSQLType

public void setSQLType(int sqlType)

getSQLType

public int getSQLType()

setPGType

public void setPGType(String pgType)

getPGType

public String getPGType()

isTypeInitialized

public boolean isTypeInitialized()


Copyright © 2016 PostgreSQL Global Development Group. All rights reserved.