java.lang.Object
org.firebirdsql.jdbc.field.FBField
org.firebirdsql.jdbc.field.FBLongVarCharField
- All Implemented Interfaces:
BlobListenableField,FBCloseableField,FBFlushableField,TrimmableField
public class FBLongVarCharField
extends FBField
implements FBCloseableField, FBFlushableField, BlobListenableField
This is Blob-based implementation of
FBStringField. It should be used
for fields declared in database as BLOB SUB_TYPE 1. This
implementation provides all conversion routines FBStringField has.- Author:
- Roman Rokytskyy, Mark Rotteveel
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.firebirdsql.jdbc.field.FBFlushableField
FBFlushableField.CachedObject -
Field Summary
FieldsFields inherited from class org.firebirdsql.jdbc.field.FBField
fieldDescriptor, gdsHelper, requiredType -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this field.voidFlush cached data to the database server.getBlob()booleanbytegetByte()byte[]getBytes()byte[]Get cached data.@NonNull FBFlushableField.CachedObjectgetClob()doublefloatgetFloat()intgetInt()longgetLong()shortgetShort()final booleanvoidsetBigDecimal(BigDecimal value) voidsetBigInteger(BigInteger value) protected voidsetBinaryStreamInternal(InputStream in, long length) voidvoidvoidsetBlobListener(FBObjectListener.BlobListener blobListener) Sets the blob listener of the field.voidsetBoolean(boolean value) voidsetByte(byte value) voidsetBytes(byte[] value) voidsetCachedObject(@NonNull FBFlushableField.CachedObject cachedObject) protected voidsetCharacterStreamInternal(Reader in, long length) voidvoidvoidsetDouble(double value) voidsetFloat(float value) voidsetInteger(int value) voidsetLong(long value) voidsetNull()voidsetShort(short value) voidvoidsetTimestamp(Timestamp value) voidsetTimestamp(Timestamp value, Calendar cal) final voidsetTrimTrailing(boolean trimTrailing) Enable or disable trimming of trailing spaces.Methods inherited from class org.firebirdsql.jdbc.field.FBField
createField, getAlias, getArray, getBigDecimal, getCharacterStream, getDatatypeCoder, getDate, getDate, getDecimal, getDecimal, getFieldData, getName, getObject, getObject, getRef, getRelationName, getRowId, getTime, getTime, getTimestamp, isNull, setBinaryStream, setBinaryStream, setBinaryStream, setCharacterStream, setCharacterStream, setCharacterStream, setConnection, setDate, setDate, setDecimal, setFieldData, setObject, setObject, setRequiredType, setRowId, setTime, setTime
-
Field Details
-
possibleCharLength
protected final int possibleCharLength
-
-
Method Details
-
setBlobListener
Description copied from interface:BlobListenableFieldSets the blob listener of the field.- Specified by:
setBlobListenerin interfaceBlobListenableField- Parameters:
blobListener- blob listener
-
close
Description copied from interface:FBCloseableFieldClose this field. This method tells field implementation to release all resources allocated when field methods were called.- Specified by:
closein interfaceFBCloseableField- Throws:
SQLException- if field cannot be closed.
-
getBlob
- Overrides:
getBlobin classFBField- Throws:
SQLException
-
getClob
- Overrides:
getClobin classFBField- Throws:
SQLException
-
getBinaryStream
- Throws:
SQLException
-
getBytes
- Throws:
SQLException
-
getCachedData
Description copied from interface:FBFlushableFieldGet cached data.- Specified by:
getCachedDatain interfaceFBFlushableField- Returns:
- cached object of this field.
- Throws:
SQLException- if something went wrong.
-
getCachedObject
- Specified by:
getCachedObjectin interfaceFBFlushableField- Throws:
SQLException
-
setCachedObject
- Specified by:
setCachedObjectin interfaceFBFlushableField
-
getString
- Throws:
SQLException
-
setBlob
- Overrides:
setBlobin classFBField- Throws:
SQLException
-
setBlob
- Overrides:
setBlobin classFBField- Throws:
SQLException
-
setClob
- Overrides:
setClobin classFBField- Throws:
SQLException
-
setClob
- Overrides:
setClobin classFBField- Throws:
SQLException
-
setCharacterStreamInternal
-
setString
- Throws:
SQLException
-
setBytes
- Throws:
SQLException
-
setBinaryStreamInternal
-
flushCachedData
Description copied from interface:FBFlushableFieldFlush cached data to the database server.- Specified by:
flushCachedDatain interfaceFBFlushableField- Throws:
SQLException- if something went wrong.
-
setNull
public void setNull() -
setTrimTrailing
public final void setTrimTrailing(boolean trimTrailing) Description copied from interface:TrimmableFieldEnable or disable trimming of trailing spaces.NOTE: The behaviour applies to
FBField.getString()and code paths that work throughgetString()(this usually includesFBField.getObject().- Specified by:
setTrimTrailingin interfaceTrimmableField- Parameters:
trimTrailing-truetrim trailing spaces
-
isTrimTrailing
public final boolean isTrimTrailing()- Specified by:
isTrimTrailingin interfaceTrimmableField- Returns:
truetrim trailing enabled,falsetrim trailing disabled
-
getObject
- Overrides:
getObjectin classFBField- Throws:
SQLException
-
getByte
- Overrides:
getBytein classFBField- Throws:
SQLException
-
getShort
- Overrides:
getShortin classFBField- Throws:
SQLException
-
getInt
- Overrides:
getIntin classFBField- Throws:
SQLException
-
getLong
- Overrides:
getLongin classFBField- Throws:
SQLException
-
getBigDecimal
- Overrides:
getBigDecimalin classFBField- Throws:
SQLException
-
getFloat
- Overrides:
getFloatin classFBField- Throws:
SQLException
-
getDouble
- Overrides:
getDoublein classFBField- Throws:
SQLException
-
getBoolean
- Overrides:
getBooleanin classFBField- Throws:
SQLException
-
getTimestamp
- Overrides:
getTimestampin classFBField- Throws:
SQLException
-
getBigInteger
- Overrides:
getBigIntegerin classFBField- Throws:
SQLException
-
setByte
- Overrides:
setBytein classFBField- Throws:
SQLException
-
setShort
- Overrides:
setShortin classFBField- Throws:
SQLException
-
setInteger
- Overrides:
setIntegerin classFBField- Throws:
SQLException
-
setLong
- Overrides:
setLongin classFBField- Throws:
SQLException
-
setFloat
- Overrides:
setFloatin classFBField- Throws:
SQLException
-
setDouble
- Overrides:
setDoublein classFBField- Throws:
SQLException
-
setBigDecimal
- Overrides:
setBigDecimalin classFBField- Throws:
SQLException
-
setBoolean
- Overrides:
setBooleanin classFBField- Throws:
SQLException
-
setTimestamp
- Overrides:
setTimestampin classFBField- Throws:
SQLException
-
setTimestamp
- Overrides:
setTimestampin classFBField- Throws:
SQLException
-
setBigInteger
- Overrides:
setBigIntegerin classFBField- Throws:
SQLException
-