public class RowStampInfo
extends java.lang.Object
implements java.io.Serializable
This class is used as part of business object information to to get rowstamp information for a business object.
This class is used to keep track of the rowstamp details of a business object. If a business object is based directly on a database table, then the rowstamp information is very simple and contains only the rowstamp column. If a business object is based on a database view and is persistent, then each table that the view is based on may have a rowstamp column for optimistic locking functionality. The rowstamp information for it would contain the column names specified in the view to fetch the rowstamp values from database as well as the appropriate table names that are involved.
Constructor and Description |
---|
RowStampInfo() |
Modifier and Type | Method and Description |
---|---|
void |
addRowStamp(java.lang.String tableName,
java.lang.String entityColumnName)
Add rowstamp information by generating RowStamp object based
on the passed information.
|
java.util.Iterator |
getFetchColumnNames()
Returns an Iterator to iterate over column names of rowstamp
columns that are specified in the view select statement.
|
int |
getRowStampNumber(java.lang.String tableName)
Finds out the rowstamp number for the given table name
and returns it.
|
java.lang.String |
getRowStampTableName(int rowStampNumber)
Returns the tablename for a given rowstamp number.
|
java.lang.String |
getRowStampTableName(java.lang.String fetchColumnName)
Returns the tablename for a given fetch column name.
|
int |
size()
Returns the number of rowstamps.
|
public void addRowStamp(java.lang.String tableName, java.lang.String entityColumnName)
tableName
- a table name that has rowstamp columnentityColumnName
- a column name used in the view to fetch
rowstamp value from database.java.lang.IllegalStateException
- if this method is called twice
to add rowstamp to the same table.public java.util.Iterator getFetchColumnNames()
public int getRowStampNumber(java.lang.String tableName)
tableName
- a table name for which rowstamp number is needed.java.lang.IllegalStateException
- if this method is called for
a table name that does not have rowstamp.public java.lang.String getRowStampTableName(int rowStampNumber)
rowStampNumber
- a rowstamp number for which table name
is needed.java.lang.IllegalStateException
- if the rowstamp number is not valid.public java.lang.String getRowStampTableName(java.lang.String fetchColumnName)
fetchColumnName
- a rowstamp fetch column for which
table name is needed.java.lang.IllegalStateException
- if the rowstamp fetch column
is not valid.public int size()