Package oracle.streams
Class DefaultColumnValue
- java.lang.Object
-
- oracle.streams.DefaultColumnValue
-
- All Implemented Interfaces:
ColumnValue
- Direct Known Subclasses:
DefaultChunkColumnValue
public class DefaultColumnValue extends java.lang.Object implements ColumnValue
The DefaultColumnValue class provides an Oracle default implementation of ColumnValue interface.- See Also:
RowLCR
-
-
Field Summary
-
Fields inherited from interface oracle.streams.ColumnValue
BFILE, BINARY_DOUBLE, BINARY_FLOAT, BOOLEAN, CHAR, DATE, INTERVALDS, INTERVALYM, NUMBER, RAW, RowID, TIMESTAMP, TIMESTAMPLTZ, TIMESTAMPTZ
-
-
Constructor Summary
Constructors Constructor Description DefaultColumnValue(java.lang.String columnName, oracle.sql.Datum columnData)
Constructs a DefaultColumnValue object with columnName and columnData.
This constructor can be used when columnData is not null.DefaultColumnValue(java.lang.String columnName, oracle.sql.Datum columnData, int columnDataType)
Constructs a DefaultColumnValue object with columnName, columnData, and columnDataType.
When columnData is NULL, a valid columnDataType is expected.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCharsetId()
Gets the column character set identifier (ID).oracle.sql.Datum
getColumnData()
Gets the column data.int
getColumnDataType()
Gets the column data type as defined in ColumnValue interface.java.lang.String
getColumnName()
Gets the column name.boolean
getTDEFlag()
Gets the Transparent Data Encryption (TDE) flag.boolean
is32kData()
Indicates whether the column is an extended size column (maximum size of 32767 bytes).boolean
isBFile()
boolean
isUrowid()
void
set32kData(boolean is32kData)
Sets the extended size column flag (maximum size of 32767 bytes).void
setBFile(boolean isBFile)
void
setCharsetId(int charsetId)
Sets the Oracle character set ID for the column.void
setColumnData(oracle.sql.Datum columnData, int columnDataType)
Sets the column data.void
setColumnName(java.lang.String columnName)
Sets the column name.void
setTDEFlag(boolean tdeFlag)
Sets the TDE flag.void
setUrowid(boolean isUrowid)
java.lang.String
toString()
-
-
-
Constructor Detail
-
DefaultColumnValue
public DefaultColumnValue(java.lang.String columnName, oracle.sql.Datum columnData, int columnDataType) throws StreamsException
Constructs a DefaultColumnValue object with columnName, columnData, and columnDataType.
When columnData is NULL, a valid columnDataType is expected. When columnData is not NULL, the columnDataType is ignored. The mapping is maintained internally.- Parameters:
columnName
- The column name, cannot be NULLcolumnData
- The column data.columnDataType
- The column data type.- Throws:
StreamsException
- is thrown if the columnName is NULL, or the columnData is NULL and the columnDataType is invalid
-
DefaultColumnValue
public DefaultColumnValue(java.lang.String columnName, oracle.sql.Datum columnData) throws StreamsException
Constructs a DefaultColumnValue object with columnName and columnData.
This constructor can be used when columnData is not null. The mapping between columnData and columnDataType is maintained internally.- Parameters:
columnName
- the column name, cannot be NULL.columnData
- the column data, cannot be NULL.- Throws:
StreamsException
- is thrown if the columnData is NULL and the columnDataType is invalid.
-
-
Method Detail
-
getColumnName
public java.lang.String getColumnName()
Gets the column name.- Specified by:
getColumnName
in interfaceColumnValue
- Returns:
- A string contains the column name.
-
setColumnName
public void setColumnName(java.lang.String columnName)
Sets the column name.- Specified by:
setColumnName
in interfaceColumnValue
- Parameters:
columnName
- The column name.
-
getColumnData
public oracle.sql.Datum getColumnData()
Gets the column data.
Column data can be an instance of one of the following oracle.sql.Datum subclasses:
oracle.sql.CHAR
oracle.sql.RAW
oracle.sql.DATE
oracle.sql.NUMBER
oracle.sql.BINARY_FLOAT
oracle.sql.BINARY_DOUBLE
oracle.sql.TIMESTAMP
oracle.sql.TIMESTAMPTZ
oracle.sql.TIMESTAMPLTZ
oracle.sql.INTERVALYM
oracle.sql.INTERVALDS
oracle.sql.BOOLEAN- Specified by:
getColumnData
in interfaceColumnValue
- Returns:
- A oracle.sql.Datum object that contains the column data.
-
setColumnData
public void setColumnData(oracle.sql.Datum columnData, int columnDataType) throws StreamsException
Sets the column data.
When columnData is NULL, columnDataType must be a valid non-NULL value. When columnData is non-NULL, the columnDataType is ignored. The mapping is maintained internally.- Specified by:
setColumnData
in interfaceColumnValue
- Parameters:
columnData
- the column data, instance of oracle.sql.Datum subclasses.columnDataType
- the column data type as defined in ColumnValue.- Throws:
StreamsException
- is thrown if the columnData is NULL and the columnDataType is invalid.
-
getColumnDataType
public int getColumnDataType()
Gets the column data type as defined in ColumnValue interface.- Specified by:
getColumnDataType
in interfaceColumnValue
- Returns:
- an integer that indicates the column data type.
-
getTDEFlag
public boolean getTDEFlag()
Gets the Transparent Data Encryption (TDE) flag. This flag indicates whether TDE was enabled for this column.- Specified by:
getTDEFlag
in interfaceColumnValue
- Returns:
- A boolean value indicates whether TDE was enabled.
-
setTDEFlag
public void setTDEFlag(boolean tdeFlag)
Sets the TDE flag. This method is used to set the TDE flag for the column. When this flag is set, the column data is encrypted if the LCR is spilled or put into an error queue.- Specified by:
setTDEFlag
in interfaceColumnValue
- Parameters:
tdeFlag
- A boolean value indicates whether TDE Flag should be set.
-
is32kData
public boolean is32kData()
Indicates whether the column is an extended size column (maximum size of 32767 bytes).- Specified by:
is32kData
in interfaceColumnValue
- Returns:
- a boolean flag that indicates if the column is an extended size column.
-
set32kData
public void set32kData(boolean is32kData)
Sets the extended size column flag (maximum size of 32767 bytes).
This flag indicates whether the column is an extended size column.- Specified by:
set32kData
in interfaceColumnValue
- Parameters:
is32kData
- The extended size column flag.
-
setCharsetId
public void setCharsetId(int charsetId)
Sets the Oracle character set ID for the column.
Some types of columns, such as XMLTYPE columns, contain character data stored in raw byte format (oracle.sql.RAW). The character set ID is required to interpret the character data properly.- Specified by:
setCharsetId
in interfaceColumnValue
- Parameters:
charsetId
- The character set ID.- See Also:
CharacterSet
-
getCharsetId
public int getCharsetId()
Gets the column character set identifier (ID).
Some types of columns, such as XMLTYPE columns, contain character data stored in raw byte format (oracle.sql.RAW). The character set ID is required to interpret the character data properly.- Specified by:
getCharsetId
in interfaceColumnValue
- Returns:
- An interger that identifies the character set.
- See Also:
CharacterSet
-
setUrowid
public void setUrowid(boolean isUrowid)
-
isUrowid
public boolean isUrowid()
-
setBFile
public void setBFile(boolean isBFile)
-
isBFile
public boolean isBFile()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-