public class TableDataObject
extends java.lang.Object
This class represents a row in a physical table.
Each business object mediator must generate a list of TableDataObject to be persisted by a DataWriter.
Constructor and Description |
---|
TableDataObject(java.lang.String aTableName)
Constructor for creating a table data object, representing a table.
|
Modifier and Type | Method and Description |
---|---|
void | addColumnData(java.lang.String aColumnName, java.lang.Object aColumnValue)
Add the column name and value to the column data map.
|
void | addMultipleColumnData(java.util.Map columnData)
Add multiple column data to column data map.
|
static TableDataObject | findByPrimaryKey(java.lang.String tableName, java.util.Map primaryKeyData)
Find a row from the table by primary key and return the populated TableDataObject.
|
java.util.Map | getColumnDataMap()
This method returns the column data map.
|
java.lang.String | getColumnValue(java.lang.String aColumnName)
Get the column value for a given column name.
|
char | getOpMode()
Get the operation mode.
|
java.lang.String | getTableName()
This method returns the table name.
|
boolean | isInsertForced()
Checks if the flag is set.
|
void | setColumnDataMap(java.util.Map aColumnDataMap)
This method sets the column data map.
|
void | setInsertForced(boolean insertForced)
Sets the flag true or false
|
void | setOpMode(char anOpMode)
Set the operation mode.
|
void | setTableName(java.lang.String aTableName)
This method sets the table name.
|
java.lang.String | toString()
Format the object to have a better display.
|
public TableDataObject(java.lang.String aTableName)
Constructor for creating a table data object, representing a table. Table name should be in upper case.
public static TableDataObject findByPrimaryKey(java.lang.String tableName, java.util.Map primaryKeyData) throws DataLoadException
public java.util.Map getColumnDataMap()
This method returns the column data map. The key is the column name and value is the column value. All column names are in upper case.
public void setColumnDataMap(java.util.Map aColumnDataMap)
This method sets the column data map. The key is the column name and value is the column value. All column names are in upper case.
public java.lang.String getTableName()
This method returns the table name.
public void setTableName(java.lang.String aTableName)
This method sets the table name.
public char getOpMode()
Get the operation mode. The operation mode can be 'I', 'U', 'D' for insert, update and delete.
public void setOpMode(char anOpMode)
Set the operation mode. The operation mode can be 'I', 'U', 'D' for insert, update and delete.
public java.lang.String getColumnValue(java.lang.String aColumnName)
Get the column value for a given column name. aColumnName is in upper case.
public void addColumnData(java.lang.String aColumnName, java.lang.Object aColumnValue)
Add the column name and value to the column data map. aColumnName is in upper case.
public void addMultipleColumnData(java.util.Map columnData)
Add multiple column data to column data map. The key in the columnData is the column name and the value is the column value. All column name are in upper cases.
public boolean isInsertForced()
public void setInsertForced(boolean insertForced)
public java.lang.String toString()
Format the object to have a better display.