Package org.firebirdsql.jdbc.field
Class FBField
- java.lang.Object
- 
- org.firebirdsql.jdbc.field.FBField
 
- 
- Direct Known Subclasses:
- FBLongVarCharField
 
 public abstract class FBField extends java.lang.ObjectBase class for fields (for use by prepared statement and result set to represent columns and parameters).- Author:
- Roman Rokytskyy, Mark Rotteveel
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected FieldDescriptorfieldDescriptorprotected GDSHelpergdsHelperprotected intrequiredType
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static FBFieldcreateField(FieldDescriptor fieldDescriptor, FieldDataProvider dataProvider, GDSHelper gdsHelper, boolean cached)This is a factory method that creates appropriate instance of theFBFieldclass according to the SQL datatype.java.lang.StringgetAlias()Returns the alias of the column as declared in XSQLVAR.java.sql.ArraygetArray()java.math.BigDecimalgetBigDecimal()java.math.BigDecimalgetBigDecimal(int scale)java.math.BigIntegergetBigInteger()java.io.InputStreamgetBinaryStream()java.sql.BlobgetBlob()booleangetBoolean()bytegetByte()byte[]getBytes()java.io.ReadergetCharacterStream()java.sql.ClobgetClob()protected DatatypeCodergetDatatypeCoder()java.sql.DategetDate()java.sql.DategetDate(java.util.Calendar cal)Decimal<?>getDecimal()Returns the value as a Decimal type.<D extends Decimal<D>>
 DgetDecimal(java.lang.Class<D> targetType)doublegetDouble()protected byte[]getFieldData()floatgetFloat()intgetInt()longgetLong()java.lang.StringgetName()Returns the name of the column as declared in the XSQLVAR.java.lang.ObjectgetObject()<T> TgetObject(java.lang.Class<T> type)java.lang.ObjectgetObject(java.util.Map<java.lang.String,java.lang.Class<?>> map)DatatypeCoder.RawDateTimeStructgetRawDateTimeStruct()Deprecated.usegetLocalDate(),getLocalTime(),getLocalDateTime(); will be removed in Jaybird 6java.sql.RefgetRef()java.lang.StringgetRelationName()Returns the relation to which belongs column as declared in XSQLVAR.java.sql.RowIdgetRowId()shortgetShort()java.lang.StringgetString()java.sql.TimegetTime()java.sql.TimegetTime(java.util.Calendar cal)java.sql.TimestampgetTimestamp()java.sql.TimestampgetTimestamp(java.util.Calendar cal)protected booleanisInvertTimeZone()booleanisNull()voidsetBigDecimal(java.math.BigDecimal value)voidsetBigInteger(java.math.BigInteger value)voidsetBinaryStream(java.io.InputStream in)voidsetBinaryStream(java.io.InputStream in, int length)voidsetBinaryStream(java.io.InputStream in, long length)protected voidsetBinaryStreamInternal(java.io.InputStream in, long length)voidsetBlob(java.sql.Blob blob)voidsetBlob(FBBlob blob)voidsetBoolean(boolean value)voidsetByte(byte value)voidsetBytes(byte[] value)voidsetCharacterStream(java.io.Reader in)voidsetCharacterStream(java.io.Reader in, int length)voidsetCharacterStream(java.io.Reader in, long length)protected voidsetCharacterStreamInternal(java.io.Reader in, long length)voidsetClob(java.sql.Clob clob)voidsetClob(FBClob clob)voidsetConnection(GDSHelper gdsHelper)voidsetDate(java.sql.Date value)voidsetDate(java.sql.Date value, java.util.Calendar cal)voidsetDecimal(Decimal<?> decimal)Sets the value as a Decimal type.voidsetDouble(double value)protected voidsetFieldData(byte[] data)voidsetFloat(float value)voidsetInteger(int value)voidsetLong(long value)voidsetNull()voidsetObject(java.lang.Object value)voidsetRawDateTimeStruct(DatatypeCoder.RawDateTimeStruct raw)Deprecated.usesetLocalDate(LocalDate),setLocalTime(LocalTime),setLocalDateTime(LocalDateTime); will be removed in Jaybird 6voidsetRequiredType(int requiredType)Set the required type forgetObject()conversion.voidsetRowId(java.sql.RowId rowId)voidsetShort(short value)voidsetString(java.lang.String value)voidsetTime(java.sql.Time value)voidsetTime(java.sql.Time value, java.util.Calendar cal)voidsetTimestamp(java.sql.Timestamp value)voidsetTimestamp(java.sql.Timestamp value, java.util.Calendar cal)
 
- 
- 
- 
Field Detail- 
fieldDescriptorprotected final FieldDescriptor fieldDescriptor 
 - 
gdsHelperprotected GDSHelper gdsHelper 
 - 
requiredTypeprotected int requiredType 
 
- 
 - 
Method Detail- 
getFieldDataprotected final byte[] getFieldData() 
 - 
setFieldDataprotected final void setFieldData(byte[] data) 
 - 
getDatatypeCoderprotected final DatatypeCoder getDatatypeCoder() 
 - 
isNullpublic final boolean isNull() throws java.sql.SQLException- Returns:
- trueif the corresponding field is- null, otherwise- false
- Throws:
- java.sql.SQLException
 
 - 
setNullpublic void setNull() 
 - 
setConnectionpublic void setConnection(GDSHelper gdsHelper) 
 - 
setRequiredTypepublic void setRequiredType(int requiredType) Set the required type forgetObject()conversion.- Parameters:
- requiredType- required type, one of the- Typesconstants.
 
 - 
createFieldpublic static FBField createField(FieldDescriptor fieldDescriptor, FieldDataProvider dataProvider, GDSHelper gdsHelper, boolean cached) throws java.sql.SQLException This is a factory method that creates appropriate instance of theFBFieldclass according to the SQL datatype. This instance knows how to perform all necessary type conversions.- Throws:
- java.sql.SQLException
 
 - 
getNamepublic java.lang.String getName() Returns the name of the column as declared in the XSQLVAR.
 - 
getAliaspublic java.lang.String getAlias() Returns the alias of the column as declared in XSQLVAR.
 - 
getRelationNamepublic java.lang.String getRelationName() Returns the relation to which belongs column as declared in XSQLVAR.
 - 
getBytepublic byte getByte() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getShortpublic short getShort() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getIntpublic int getInt() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getLongpublic long getLong() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getFloatpublic float getFloat() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getDoublepublic double getDouble() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getBigDecimalpublic java.math.BigDecimal getBigDecimal() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getBigDecimalpublic final java.math.BigDecimal getBigDecimal(int scale) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getBooleanpublic boolean getBoolean() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getStringpublic java.lang.String getString() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getObjectpublic java.lang.Object getObject() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getObjectpublic java.lang.Object getObject(java.util.Map<java.lang.String,java.lang.Class<?>> map) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getObjectpublic <T> T getObject(java.lang.Class<T> type) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getBinaryStreampublic java.io.InputStream getBinaryStream() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getCharacterStreampublic java.io.Reader getCharacterStream() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getBytespublic byte[] getBytes() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getBlobpublic java.sql.Blob getBlob() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getDatepublic java.sql.Date getDate() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getDatepublic java.sql.Date getDate(java.util.Calendar cal) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getTimepublic java.sql.Time getTime() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getTimepublic java.sql.Time getTime(java.util.Calendar cal) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getTimestamppublic java.sql.Timestamp getTimestamp() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getTimestamppublic java.sql.Timestamp getTimestamp(java.util.Calendar cal) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getRefpublic java.sql.Ref getRef() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getClobpublic java.sql.Clob getClob() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getArraypublic java.sql.Array getArray() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getBigIntegerpublic java.math.BigInteger getBigInteger() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getRowIdpublic java.sql.RowId getRowId() throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setBytepublic void setByte(byte value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setShortpublic void setShort(short value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setIntegerpublic void setInteger(int value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setLongpublic void setLong(long value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setFloatpublic void setFloat(float value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setDoublepublic void setDouble(double value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setBigDecimalpublic void setBigDecimal(java.math.BigDecimal value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setBooleanpublic void setBoolean(boolean value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setStringpublic void setString(java.lang.String value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setBigIntegerpublic void setBigInteger(java.math.BigInteger value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setObjectpublic void setObject(java.lang.Object value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setBinaryStreamInternalprotected void setBinaryStreamInternal(java.io.InputStream in, long length) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setBinaryStreampublic final void setBinaryStream(java.io.InputStream in, long length) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setBinaryStreampublic final void setBinaryStream(java.io.InputStream in) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setBinaryStreampublic final void setBinaryStream(java.io.InputStream in, int length) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setCharacterStreamInternalprotected void setCharacterStreamInternal(java.io.Reader in, long length) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setCharacterStreampublic final void setCharacterStream(java.io.Reader in, long length) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setCharacterStreampublic final void setCharacterStream(java.io.Reader in) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setCharacterStreampublic final void setCharacterStream(java.io.Reader in, int length) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setBytespublic void setBytes(byte[] value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setDatepublic void setDate(java.sql.Date value, java.util.Calendar cal) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setDatepublic void setDate(java.sql.Date value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setTimepublic void setTime(java.sql.Time value, java.util.Calendar cal) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setTimepublic void setTime(java.sql.Time value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setTimestamppublic void setTimestamp(java.sql.Timestamp value, java.util.Calendar cal) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setTimestamppublic void setTimestamp(java.sql.Timestamp value) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setBlobpublic void setBlob(FBBlob blob) throws java.sql.SQLException - Throws:
- java.sql.SQLException
 
 - 
setBlobpublic void setBlob(java.sql.Blob blob) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setClobpublic void setClob(FBClob clob) throws java.sql.SQLException - Throws:
- java.sql.SQLException
 
 - 
setClobpublic void setClob(java.sql.Clob clob) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
setRowIdpublic void setRowId(java.sql.RowId rowId) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getRawDateTimeStruct@Deprecated public DatatypeCoder.RawDateTimeStruct getRawDateTimeStruct() throws java.sql.SQLException Deprecated.usegetLocalDate(),getLocalTime(),getLocalDateTime(); will be removed in Jaybird 6- Throws:
- java.sql.SQLException
 
 - 
setRawDateTimeStruct@Deprecated public void setRawDateTimeStruct(DatatypeCoder.RawDateTimeStruct raw) throws java.sql.SQLException Deprecated.usesetLocalDate(LocalDate),setLocalTime(LocalTime),setLocalDateTime(LocalDateTime); will be removed in Jaybird 6- Throws:
- java.sql.SQLException
 
 - 
getDecimalpublic Decimal<?> getDecimal() throws java.sql.SQLException Returns the value as a Decimal type.The default for this method is implemented in terms of getBigDecimal(), and returning aDecimal128. Implementations may return aDecimal64(or evenDecimal32).- Returns:
- The value as decimal
- Throws:
- java.sql.SQLException- For database access errors, or values that cannot be converted.
 
 - 
getDecimalpublic final <D extends Decimal<D>> D getDecimal(java.lang.Class<D> targetType) throws java.sql.SQLException - Throws:
- java.sql.SQLException
 
 - 
setDecimalpublic void setDecimal(Decimal<?> decimal) throws java.sql.SQLException Sets the value as a Decimal type.The default for this method is implemented in terms of setBigDecimal(BigDecimal).- Parameters:
- decimal- Value to set
- Throws:
- java.sql.SQLException
 
 - 
isInvertTimeZoneprotected boolean isInvertTimeZone() 
 
- 
 
-