public class Field extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BINARY_FORMAT |
static int |
TEXT_FORMAT |
Constructor and Description |
---|
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,
int oid,
int length,
int mod,
int tableOid,
int positionInTable)
Construct a field based on the information fed to it.
|
Modifier and Type | Method and Description |
---|---|
String |
getColumnLabel() |
int |
getFormat() |
int |
getLength() |
FieldMetadata |
getMetadata() |
int |
getMod() |
int |
getOID() |
String |
getPGType() |
int |
getPositionInTable() |
int |
getSQLType() |
int |
getTableOid() |
boolean |
isTypeInitialized() |
void |
setFormat(int format) |
void |
setMetadata(FieldMetadata metadata) |
void |
setPGType(String pgType) |
void |
setSQLType(int sqlType) |
String |
toString()
Returns a string representation of the object.
|
public static final int TEXT_FORMAT
public static final int BINARY_FORMAT
public Field(String name, int oid, int length, int mod)
name
- the name (column name and label) of the fieldoid
- the OID of the fieldlength
- the length of the fieldmod
- modifierpublic Field(String name, int oid)
name
- the name (column name and label) of the fieldoid
- the OID of the fieldpublic Field(String columnLabel, int oid, int length, int mod, int tableOid, int positionInTable)
columnLabel
- the column label of the fieldoid
- the OID of the fieldlength
- the length of the fieldmod
- modifiertableOid
- the OID of the columns' tablepositionInTable
- the position of column in the table (first column is 1, second column is 2, etc...)public int getOID()
public int getMod()
public String getColumnLabel()
public int getLength()
public int getFormat()
public void setFormat(int format)
format
- the format of this Field's data (text=0, binary=1)public int getTableOid()
public int getPositionInTable()
public FieldMetadata getMetadata()
public void setMetadata(FieldMetadata metadata)
public String toString()
java.lang.Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public void setSQLType(int sqlType)
public int getSQLType()
public void setPGType(String pgType)
public String getPGType()
public boolean isTypeInitialized()
Copyright © 2018 PostgreSQL Global Development Group. All rights reserved.