psdi.mbo

Class RowStampInfo

  • java.lang.Object
    • psdi.mbo.RowStampInfo
  • All Implemented Interfaces:
    java.io.Serializable


    public class RowStampInfo
    extends java.lang.Object
    implements java.io.Serializable
    A class that represents optimistic locking column information.

    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.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      RowStampInfo() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RowStampInfo

        public RowStampInfo()
    • Method Detail

      • addRowStamp

        public void addRowStamp(java.lang.String tableName,
                                java.lang.String entityColumnName)
        Add rowstamp information by generating RowStamp object based on the passed information.
        Parameters:
        tableName - a table name that has rowstamp column
        entityColumnName - a column name used in the view to fetch rowstamp value from database.
        Throws:
        java.lang.IllegalStateException - if this method is called twice to add rowstamp to the same table.
      • getFetchColumnNames

        public java.util.Iterator getFetchColumnNames()
        Returns an Iterator to iterate over column names of rowstamp columns that are specified in the view select statement. Columns are always returned in the sorted rowstamp number order
      • getRowStampNumber

        public int getRowStampNumber(java.lang.String tableName)
        Finds out the rowstamp number for the given table name and returns it.
        Parameters:
        tableName - a table name for which rowstamp number is needed.
        Returns:
        the rowstamp number for the given table name.
        Throws:
        java.lang.IllegalStateException - if this method is called for a table name that does not have rowstamp.
      • getRowStampTableName

        public java.lang.String getRowStampTableName(int rowStampNumber)
        Returns the tablename for a given rowstamp number.
        Parameters:
        rowStampNumber - a rowstamp number for which table name is needed.
        Returns:
        the tablename for a given rowstamp number.
        Throws:
        java.lang.IllegalStateException - if the rowstamp number is not valid.
      • getRowStampTableName

        public java.lang.String getRowStampTableName(java.lang.String fetchColumnName)
        Returns the tablename for a given fetch column name.
        Parameters:
        fetchColumnName - a rowstamp fetch column for which table name is needed.
        Returns:
        the tablename for a given rowstamp fetch column.
        Throws:
        java.lang.IllegalStateException - if the rowstamp fetch column is not valid.
      • size

        public int size()
        Returns the number of rowstamps.
        Returns:
        the number of rowstamps.