public class Field
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BINARY_FORMAT |
private java.lang.String |
columnLabel |
private int |
format |
private int |
length |
private FieldMetadata |
metadata |
private int |
mod |
private static java.lang.String |
NOT_YET_LOADED |
private int |
oid |
private java.lang.String |
pgType |
private int |
positionInTable |
private int |
sqlType |
private int |
tableOid |
static int |
TEXT_FORMAT |
Constructor and Description |
---|
Field(java.lang.String name,
int oid)
Constructor without mod parameter.
|
Field(java.lang.String name,
int oid,
int length,
int mod)
Construct a field based on the information fed to it.
|
Field(java.lang.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 |
---|---|
java.lang.String |
getColumnLabel() |
int |
getFormat() |
int |
getLength() |
FieldMetadata |
getMetadata() |
int |
getMod() |
int |
getOID() |
java.lang.String |
getPGType() |
int |
getPositionInTable() |
int |
getSQLType() |
int |
getTableOid() |
boolean |
isTypeInitialized() |
void |
setFormat(int format) |
void |
setMetadata(FieldMetadata metadata) |
void |
setPGType(java.lang.String pgType) |
void |
setSQLType(int sqlType) |
java.lang.String |
toString() |
public static final int TEXT_FORMAT
public static final int BINARY_FORMAT
private final int length
private final int oid
private final int mod
private final java.lang.String columnLabel
private int format
private final int tableOid
private final int positionInTable
private FieldMetadata metadata
private int sqlType
private java.lang.String pgType
private static final java.lang.String NOT_YET_LOADED
public Field(java.lang.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(java.lang.String name, int oid)
name
- the name (column name and label) of the fieldoid
- the OID of the fieldpublic Field(java.lang.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 java.lang.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 java.lang.String toString()
toString
in class java.lang.Object
public void setSQLType(int sqlType)
public int getSQLType()
public void setPGType(java.lang.String pgType)
public java.lang.String getPGType()
public boolean isTypeInitialized()