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 TypeMethodDescriptionvoid
close()
Close this field.void
Flush cached data to the database server.getBlob()
boolean
byte
getByte()
byte[]
getBytes()
byte[]
Get cached data.@NonNull FBFlushableField.CachedObject
getClob()
double
float
getFloat()
int
getInt()
long
getLong()
short
getShort()
final boolean
void
setBigDecimal
(BigDecimal value) void
setBigInteger
(BigInteger value) protected void
setBinaryStreamInternal
(InputStream in, long length) void
void
void
setBlobListener
(FBObjectListener.BlobListener blobListener) Sets the blob listener of the field.void
setBoolean
(boolean value) void
setByte
(byte value) void
setBytes
(byte[] value) void
setCachedObject
(@NonNull FBFlushableField.CachedObject cachedObject) protected void
setCharacterStreamInternal
(Reader in, long length) void
void
void
setDouble
(double value) void
setFloat
(float value) void
setInteger
(int value) void
setLong
(long value) void
setNull()
void
setShort
(short value) void
void
setTimestamp
(Timestamp value) void
setTimestamp
(Timestamp value, Calendar cal) final void
setTrimTrailing
(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:BlobListenableField
Sets the blob listener of the field.- Specified by:
setBlobListener
in interfaceBlobListenableField
- Parameters:
blobListener
- blob listener
-
close
Description copied from interface:FBCloseableField
Close this field. This method tells field implementation to release all resources allocated when field methods were called.- Specified by:
close
in interfaceFBCloseableField
- Throws:
SQLException
- if field cannot be closed.
-
getBlob
- Overrides:
getBlob
in classFBField
- Throws:
SQLException
-
getClob
- Overrides:
getClob
in classFBField
- Throws:
SQLException
-
getBinaryStream
- Throws:
SQLException
-
getBytes
- Throws:
SQLException
-
getCachedData
Description copied from interface:FBFlushableField
Get cached data.- Specified by:
getCachedData
in interfaceFBFlushableField
- Returns:
- cached object of this field.
- Throws:
SQLException
- if something went wrong.
-
getCachedObject
- Specified by:
getCachedObject
in interfaceFBFlushableField
- Throws:
SQLException
-
setCachedObject
- Specified by:
setCachedObject
in interfaceFBFlushableField
-
getString
- Throws:
SQLException
-
setBlob
- Overrides:
setBlob
in classFBField
- Throws:
SQLException
-
setBlob
- Overrides:
setBlob
in classFBField
- Throws:
SQLException
-
setClob
- Overrides:
setClob
in classFBField
- Throws:
SQLException
-
setClob
- Overrides:
setClob
in classFBField
- Throws:
SQLException
-
setCharacterStreamInternal
-
setString
- Throws:
SQLException
-
setBytes
- Throws:
SQLException
-
setBinaryStreamInternal
-
flushCachedData
Description copied from interface:FBFlushableField
Flush cached data to the database server.- Specified by:
flushCachedData
in interfaceFBFlushableField
- Throws:
SQLException
- if something went wrong.
-
setNull
public void setNull() -
setTrimTrailing
public final void setTrimTrailing(boolean trimTrailing) Description copied from interface:TrimmableField
Enable 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:
setTrimTrailing
in interfaceTrimmableField
- Parameters:
trimTrailing
-true
trim trailing spaces
-
isTrimTrailing
public final boolean isTrimTrailing()- Specified by:
isTrimTrailing
in interfaceTrimmableField
- Returns:
true
trim trailing enabled,false
trim trailing disabled
-
getObject
- Overrides:
getObject
in classFBField
- Throws:
SQLException
-
getByte
- Overrides:
getByte
in classFBField
- Throws:
SQLException
-
getShort
- Overrides:
getShort
in classFBField
- Throws:
SQLException
-
getInt
- Overrides:
getInt
in classFBField
- Throws:
SQLException
-
getLong
- Overrides:
getLong
in classFBField
- Throws:
SQLException
-
getBigDecimal
- Overrides:
getBigDecimal
in classFBField
- Throws:
SQLException
-
getFloat
- Overrides:
getFloat
in classFBField
- Throws:
SQLException
-
getDouble
- Overrides:
getDouble
in classFBField
- Throws:
SQLException
-
getBoolean
- Overrides:
getBoolean
in classFBField
- Throws:
SQLException
-
getTimestamp
- Overrides:
getTimestamp
in classFBField
- Throws:
SQLException
-
getBigInteger
- Overrides:
getBigInteger
in classFBField
- Throws:
SQLException
-
setByte
- Overrides:
setByte
in classFBField
- Throws:
SQLException
-
setShort
- Overrides:
setShort
in classFBField
- Throws:
SQLException
-
setInteger
- Overrides:
setInteger
in classFBField
- Throws:
SQLException
-
setLong
- Overrides:
setLong
in classFBField
- Throws:
SQLException
-
setFloat
- Overrides:
setFloat
in classFBField
- Throws:
SQLException
-
setDouble
- Overrides:
setDouble
in classFBField
- Throws:
SQLException
-
setBigDecimal
- Overrides:
setBigDecimal
in classFBField
- Throws:
SQLException
-
setBoolean
- Overrides:
setBoolean
in classFBField
- Throws:
SQLException
-
setTimestamp
- Overrides:
setTimestamp
in classFBField
- Throws:
SQLException
-
setTimestamp
- Overrides:
setTimestamp
in classFBField
- Throws:
SQLException
-
setBigInteger
- Overrides:
setBigInteger
in classFBField
- Throws:
SQLException
-