psdi.mbo

Class ViewInfo

  • All Implemented Interfaces:
    java.io.Serializable, Entity


    public class ViewInfo
    extends CachedObjectPointer
    implements Entity
    A class to represents information about MAXIMO view used by a business object. The view information is obtained from the maxview table.
    See Also:
    Serialized Form
    • Field Detail

      • syncLock

        protected transient volatile java.lang.Object syncLock
    • Method Detail

      • getViewColumns

        public java.util.HashMap getViewColumns()
        Return viewColumns.
      • getViewFetchAttributeName

        public java.lang.String getViewFetchAttributeName(java.lang.String tbName,
                                                          java.lang.String tbColName)
        Given table name and table column name, return the view attribute name for fetching data.
        Parameters:
        tbName - Name of the underlying table.
        tbColName - Name of the underlying table column.
        Returns:
        Name of the view attribute containing the value of tbName.tbColName.
      • getViewFetchAttributeName

        public java.lang.String getViewFetchAttributeName(java.lang.String viewColName)
        Given view column name, return the view attribute name for fetching data. Usually this is the same name, unless there is "samestorageas."
        Parameters:
        tbColName - Name of the view column.
        Returns:
        Name of the view attribute containing the value.
      • clearColumnInfo

        public void clearColumnInfo()
        For use by MaximoDD cleanNonAutoViews.
      • addColumnInfo

        public void addColumnInfo(ViewColumnInfo viewColumnInfo)
        Adds column information to this view information.
        Parameters:
        viewColumnInfo - view column information to be added.
      • addTableInfo

        public void addTableInfo(java.lang.String tableName,
                                 TableInfo tableInfo)
        Adds table information to this view information. The table information passed indicates that the view is based on this table.
        Parameters:
        tableName - table name on which the view is based.
        tableInfo - information about the table on which the view is based.
      • getTables

        public java.util.Iterator getTables()
        Returns an Iterator to iterate over table names that this view is based on. The iterator objects are of type String. This method is provided to support the Entity interface. The order in which the table names are returned is not gauranteed.
        Specified by:
        getTables in interface Entity
        Returns:
        an Iterator to iterate over table names that this view is based on.
        See Also:
        Entity.getTables()
      • getTableInfos

        public java.util.Iterator getTableInfos()
        Returns an iterator to iterate over TableInfo objects that this view is based on. This is not on the Entity interface and only available on ViewInfo object.
        Returns:
      • getTableCount

        public int getTableCount()
        Returns the number of tables associated with this view. This method is provided to support the Entity interface.
        Specified by:
        getTableCount in interface Entity
        Returns:
        the number of tables that this view is based on.
        See Also:
        Entity.getTableCount()
      • getEntityColumns

        public java.util.Iterator getEntityColumns()
        Returns an Iterator to iterate over columns of this view. The iterator objects are of type String. This method is provided to support the Entity interface. The order in which the columns names are returned is not always gauranteed to be same.
        Specified by:
        getEntityColumns in interface Entity
        Returns:
        an Iterator to iterate over columns of this view.
        See Also:
        Entity.getEntityColumns()
      • getColumns

        public java.util.Iterator getColumns(java.lang.String tableName)
        Returns an Iterator to iterate over columns of the given table on which the view is based. The iterator objects are of type String. This method is provided to support the Entity interface. The order in which the columns names are returned is not always gauranteed to be same. Note: The columns returned are column names of the table. The column names returned by this method could be completely different from the getEntityColumns() method.
        Specified by:
        getColumns in interface Entity
        Parameters:
        tableName - a table name for which columns are needed.
        Returns:
        an Iterator to iterate over columns of this table.
        See Also:
        Entity.getColumns(java.lang.String)
      • getTableName

        public java.lang.String getTableName(java.lang.String entityColumnName)
        Returns the table name for the given view column name. This method is provided to support the Entity interface.
        Specified by:
        getTableName in interface Entity
        Parameters:
        entityColumnName - column name of the view
        Returns:
        table name, if exists, otherwise null.
        See Also:
        Entity.getTableName(java.lang.String)
      • getColumnName

        public java.lang.String getColumnName(java.lang.String entityColumnName)
        Returns the column name for the given view column name. This method is provided to support the Entity interface. A view column name is associated with a table's column, and the table's column is returned.
        Specified by:
        getColumnName in interface Entity
        Parameters:
        entityColumnName - view column name
        Returns:
        column name, if exists, otherwise null.
        See Also:
        Entity.getColumnName(java.lang.String)
      • getEntityColumnName

        public java.lang.String getEntityColumnName(java.lang.String tableColumnName,
                                                    java.lang.String tableName)
        Returns the Entity column name for the given table column name and table name. This method is provided to support the Entity interface.
        Specified by:
        getEntityColumnName in interface Entity
        Parameters:
        tableColumnName -
        tableName -
        Returns:
        entity Column Name
        See Also:
        Entity.getEntityColumnName(java.lang.String, java.lang.String)
      • getKeyColumns

        public java.util.Iterator getKeyColumns(java.lang.String tableName)
        Returns an Iterator to iterate over key column names. The iterator objects are of type String. This method is provided to support the Entity interface.
        Specified by:
        getKeyColumns in interface Entity
        Returns:
        an Iterator to iterate over key column names.
        See Also:
        Entity.getKeyColumns(java.lang.String)
      • getAuditTable

        public java.lang.String getAuditTable(java.lang.String tableName)
        Returns audit table associated with the given table, if any.
        Specified by:
        getAuditTable in interface Entity
        Returns:
        audit table associated with the given table, if any, otherwise returns null.
        See Also:
        Entity.getAuditTable(java.lang.String)
      • getLangColumnName

        public java.lang.String getLangColumnName(java.lang.String tableName)
        Returns language column Name associated with the given table, if any.
        Specified by:
        getLangColumnName in interface Entity
        Returns:
        language column Name associated with the given table, if any, otherwise returns null.
        See Also:
        Entity.getLangColumnName(java.lang.String)
      • getOrphans

        public java.util.HashMap getOrphans(java.lang.String tableName)
        Get rows from maxviewcolumn that have non-null "samestorageas" and are not the Rowstamp.
        Parameters:
        tableName - The underlying table in this view for which to check for orphans.
        Returns:
        Map where key = Column name from the table, value = attributename from the view that contains the value.
      • getRowStampInfo

        public RowStampInfo getRowStampInfo()
        Returns rowstamp information for this view, if rowstamp information exists with tables on which the view is based on. This method is provided to support the Entity interface.
        Specified by:
        getRowStampInfo in interface Entity
        Returns:
        rowstamp information in RowStampInfo object, if rowstamp exists, otherwise returns null.
        See Also:
        Entity.getRowStampInfo()
      • getTenantIdInfo

        public TenantIdInfo getTenantIdInfo()
        Description copied from interface: Entity
        Returns tenantif information related to this entity.
        Specified by:
        getTenantIdInfo in interface Entity
      • getColumnName

        public java.lang.String getColumnName(java.lang.String entityColumnName,
                                              java.lang.String tableName)
        Returns the column name for the given view column name and table name. This method is provided to support the Entity interface.
        Specified by:
        getColumnName in interface Entity
        Parameters:
        entityColumnName - view column name
        tableName - table name
        Returns:
        column name, if exists, otherwise null.
        See Also:
        Entity.getColumnName(java.lang.String, java.lang.String)
      • getViewName

        public java.lang.String getViewName()
        Returns the name of the view.
        Returns:
        the name of the view.
      • getAutoSelect

        public boolean getAutoSelect()
        Gets autoselect.
      • getViewSelect

        public java.lang.String getViewSelect()
        Gets viewselect. This is used only for non-autoselect views.
      • setTablesInHierarchyOrder

        public void setTablesInHierarchyOrder(java.util.ArrayList tableNames)
        Sets the list of table names in the hierarchy order from root to leaf node. The table names are organized in the business object hierarchy order.
        Parameters:
        tableNames - list of table names in the hierarchy order from root to leaf node. The element at index 0 indicates the table name of the top-most business object and the last element indicates the table name of the business object at the leaf node of the hierarchy.
      • getTablesInHierarchyOrder

        public java.util.Iterator getTablesInHierarchyOrder()
        Returns an Iterator to iterate over table names that this view is based on. The iterator objects are of type String. This method is provided to support the Entity interface. The order in which the table names are returned is always gauranteed to be in the hierarchy order from root to leaf i.e the first iterator object is the table name of the top-most business object.
        Specified by:
        getTablesInHierarchyOrder in interface Entity
        Returns:
        an Iterator to iterate over table names that this view is based on.
        See Also:
        Entity.getTablesInHierarchyOrder()
      • getTablesInReverseHierarchyOrder

        public java.util.Iterator getTablesInReverseHierarchyOrder()
        Returns an Iterator to iterate over table names that this view is based on. The iterator objects are of type String. This method is provided to support the Entity interface. The order in which the table names are returned is always gauranteed to be in the reverse hierarchy order from leaf to root i.e the last iterator object is the table name of the top-most business object.
        Specified by:
        getTablesInReverseHierarchyOrder in interface Entity
        Returns:
        an Iterator to iterate over table names that this view is based on.
        See Also:
        Entity.getTablesInReverseHierarchyOrder()
      • setTenantIdInfo

        public void setTenantIdInfo(TenantIdInfo tenantIdInfo)
      • setRowStampInfo

        public void setRowStampInfo(RowStampInfo rowStampInfo)
      • hasRowStamp

        public boolean hasRowStamp()
        Returns whether rowstamp information exists for this view or not. This method is provided to support the Entity interface.
        Specified by:
        hasRowStamp in interface Entity
        Returns:
        true, if rowstamp information exists, otherwise false.
        See Also:
        Entity.hasRowStamp()
      • hasImplicitTenantId

        public boolean hasImplicitTenantId(java.lang.String tableName)
        Description copied from interface: Entity
        Returns whether the entity has tenantid or not for the table tableName.
        Specified by:
        hasImplicitTenantId in interface Entity
      • hasImplicitTenantId

        public boolean hasImplicitTenantId()
        Description copied from interface: Entity
        Returns whether the entity has tenantid or not for any of the participating tables.
        Specified by:
        hasImplicitTenantId in interface Entity
      • getTypedReference

        public ViewInfoBase getTypedReference()
      • getTypedReferenceForSet

        public ViewInfoBase getTypedReferenceForSet()
      • isTenantOwned

        public boolean isTenantOwned()