public class MOTableRelation extends Object
MOTableRelation class models table relations like sparse
table relationship and augmentation. This class implements the augmentation
relationship. In order to implement a sparse table relationship, sub-classing
MOTableRelation is needed and the methods
hasDependentRow(org.snmp4j.agent.mo.MOTableRow) and getDependentIndexes(org.snmp4j.agent.mo.MOTableRow) must be overwritten
then.| Modifier and Type | Class and Description |
|---|---|
protected class |
MOTableRelation.RelationShipListener |
| Constructor and Description |
|---|
MOTableRelation(MOTable baseTable,
MOTable dependentTable)
Creates a table relation from a base table and the dependent table.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDependentRows(MOTableRow baseTableRow)
Adds all dependent rows for the specified base table row to the dependent
table.
|
void |
createRelationShip()
Actually sets up the relationship between base and dependent table by
adding this instance as row listener to the base table.
|
protected MOTableRowListener |
createRelationShipListener() |
org.snmp4j.smi.OID[] |
getDependentIndexes(MOTableRow baseRow)
Returns the dependent indexes for the specified base row.
|
boolean |
hasDependentRow(MOTableRow baseTableRow)
Indicates whether the specified baseTableRow has any dependent rows.
|
protected MOTableRow[] |
removeDependentRows(MOTableRow baseTableRow)
Removes all dependent rows for the specified base table row
from the dependent table.
|
public MOTableRelation(MOTable baseTable, MOTable dependentTable)
createRelationShip() needs to be called.baseTable - the base table.dependentTable - the dependent (augmenting) table.public void createRelationShip()
protected MOTableRowListener createRelationShipListener()
public boolean hasDependentRow(MOTableRow baseTableRow)
true because the default
implementation represents an augmentation relationship.
Overwrite this method in a sub-class to implement a sparse table
relationship.baseTableRow - a row of the base table.true if the row has dependent rows.public org.snmp4j.smi.OID[] getDependentIndexes(MOTableRow baseRow)
baseRow - a row of the base table.protected void addDependentRows(MOTableRow baseTableRow)
createRelationShip()
has been called.baseTableRow - a row of the base table.protected MOTableRow[] removeDependentRows(MOTableRow baseTableRow)
createRelationShip() has been called.baseTableRow - a row of the base table.Copyright © 2014 SNMP4J.org. All Rights Reserved.