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 intgetCharsetId()Gets the column character set identifier (ID).oracle.sql.DatumgetColumnData()Gets the column data.intgetColumnDataType()Gets the column data type as defined in ColumnValue interface.java.lang.StringgetColumnName()Gets the column name.booleangetTDEFlag()Gets the Transparent Data Encryption (TDE) flag.booleanis32kData()Indicates whether the column is an extended size column (maximum size of 32767 bytes).booleanisBFile()booleanisUrowid()voidset32kData(boolean is32kData)Sets the extended size column flag (maximum size of 32767 bytes).voidsetBFile(boolean isBFile)voidsetCharsetId(int charsetId)Sets the Oracle character set ID for the column.voidsetColumnData(oracle.sql.Datum columnData, int columnDataType)Sets the column data.voidsetColumnName(java.lang.String columnName)Sets the column name.voidsetTDEFlag(boolean tdeFlag)Sets the TDE flag.voidsetUrowid(boolean isUrowid)java.lang.StringtoString()
-
-
-
Constructor Detail
-
DefaultColumnValue
public DefaultColumnValue(java.lang.String columnName, oracle.sql.Datum columnData, int columnDataType) throws StreamsExceptionConstructs 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 StreamsExceptionConstructs 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:
getColumnNamein interfaceColumnValue- Returns:
- A string contains the column name.
-
setColumnName
public void setColumnName(java.lang.String columnName)
Sets the column name.- Specified by:
setColumnNamein 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:
getColumnDatain interfaceColumnValue- Returns:
- A oracle.sql.Datum object that contains the column data.
-
setColumnData
public void setColumnData(oracle.sql.Datum columnData, int columnDataType) throws StreamsExceptionSets 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:
setColumnDatain 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:
getColumnDataTypein 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:
getTDEFlagin 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:
setTDEFlagin 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:
is32kDatain 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:
set32kDatain 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:
setCharsetIdin 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:
getCharsetIdin 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:
toStringin classjava.lang.Object
-
-