org.opennms.bb.common.filter.sql
Class VirtualColumn

java.lang.Object
  |
  +--org.opennms.bb.common.filter.sql.VirtualColumn

public class VirtualColumn
extends Object

This class is responsible for holding all information for a virtual column associated with a table in the PollerDatabaseSchema.xml file.

Version:
$Revision: 1.4 $
Author:
Jason Johns, OpenNMS

Field Summary
private  String columnName
          This string holds the virtual name of the column.
private  String originalTableName
          The name of the table that this virtual column appears in.
private  String substitution
          This string holds the substitution to be used in place of the column name.
private  String virtualTableName
          This string holds the name of the table that is going to be linked to in the substitution.
 
Constructor Summary
VirtualColumn()
          Default constructor, currently does nothing.
 
Method Summary
 String getName()
          This method returns the name of the virtual column.
 String getOriginalTableName()
          This method returns the original table name.
 String getSubstitution()
          This method returns the substitution.
 String getVirtualTableName()
          This method returns the table name to link to.
 void setName(String aName)
          This method sets the name of the virtual column.
 void setOriginalTableName(String aTable)
          This method sets the original table name.
 void setSubstitution(String aSub)
          This method sets the substitution string.
 void setVirtualTableName(String aTable)
          This method sets the name of the table to link to.
 String toString()
          This method returns the substitution string as a representation of this virtual column.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

columnName

private String columnName
This string holds the virtual name of the column.

virtualTableName

private String virtualTableName
This string holds the name of the table that is going to be linked to in the substitution.

substitution

private String substitution
This string holds the substitution to be used in place of the column name. This should have the comparision operation and the join condition to the virtual table.

originalTableName

private String originalTableName
The name of the table that this virtual column appears in.
Constructor Detail

VirtualColumn

public VirtualColumn()
Default constructor, currently does nothing.
Method Detail

setSubstitution

public void setSubstitution(String aSub)
This method sets the substitution string.
Parameters:
String - aSub, the substitution string for this virtual column

getSubstitution

public String getSubstitution()
This method returns the substitution.

setOriginalTableName

public void setOriginalTableName(String aTable)
This method sets the original table name.
Parameters:
String - aTable, the table name that the virtual column came from

getOriginalTableName

public String getOriginalTableName()
This method returns the original table name.

setVirtualTableName

public void setVirtualTableName(String aTable)
This method sets the name of the table to link to.
Parameters:
String - aTable, the name of the table that the vitual column should link to

getVirtualTableName

public String getVirtualTableName()
This method returns the table name to link to.

setName

public void setName(String aName)
This method sets the name of the virtual column.
Parameters:
String - aName, the name of the virtual column

getName

public String getName()
This method returns the name of the virtual column.

toString

public String toString()
This method returns the substitution string as a representation of this virtual column.
Overrides:
toString in class Object