public class ComparisonStatementHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
attributes
all retrievable attributes from running this statement; may remain empty
|
protected java.util.HashMap |
attributesByObjects |
protected java.util.Map |
linkValue |
protected boolean |
loaded |
protected java.lang.String |
objectName
MBO object name; same as the database table or a view underlying the
MBO.
|
protected ReconInfo |
reconInfo |
protected ReconValueSet |
recordData
The records read from the database
|
protected java.util.List |
specAttributes |
protected int |
type
The statement type
|
protected java.util.Map |
units
Map for requested units to their attributes; may remain null; (as of
20050202 used for deployed assets only, authorized have their own
mechanism to read measurement units)
|
protected int[] |
unitToAttributeIndex
maps measurement unit attribute order in the SQL statement to position of
their corresponding value attributes in the AssetData object
|
Constructor and Description |
---|
ComparisonStatementHelper(ReconInfo reconInfo,
java.lang.String objectName) |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(java.lang.String attribute) |
void |
addAttribute(java.lang.String attribute,
java.lang.String unit) |
void |
addAttributeByObject(java.lang.String objectName,
java.lang.String attributeName) |
void |
changeType(int type) |
java.util.List |
getAttributes() |
protected DataSet |
getDataSet() |
java.lang.String |
getObjectName() |
int |
getOperationType() |
int |
getRecordCount(java.lang.String qualifiedName)
the qualified name should be in the form of,
ObjectName Or ObjectName?ClassstructureID |
ReconValueSet |
getRecordData() |
java.lang.String |
getSelectClauseForUnits() |
java.util.List |
getSpecAttributes() |
int |
getType() |
java.util.Map |
getUnitsMap() |
int[] |
getUnitToAttributeIndex() |
void |
initializeReconValueSet()
Initialize the data structure that holds what's read from the database
|
boolean |
isFilter() |
boolean |
isForDataSet1() |
boolean |
isLoaded() |
void |
prepare() |
void |
reset() |
void |
setLinkValue(java.util.Map linkValue) |
void |
setLoaded(boolean loaded) |
protected ReconInfo reconInfo
protected int type
protected java.util.List attributes
protected java.util.List specAttributes
protected boolean loaded
protected java.util.Map units
protected int[] unitToAttributeIndex
protected java.lang.String objectName
protected ReconValueSet recordData
protected java.util.HashMap attributesByObjects
protected java.util.Map linkValue
public ComparisonStatementHelper(ReconInfo reconInfo, java.lang.String objectName)
userInfo
- objectName
- public void prepare() throws MXException, java.rmi.RemoteException, java.sql.SQLException
MXException
java.rmi.RemoteException
java.sql.SQLException
public java.lang.String getSelectClauseForUnits()
public void initializeReconValueSet() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public void addAttribute(java.lang.String attribute)
public void addAttribute(java.lang.String attribute, java.lang.String unit)
public int getType()
public int getOperationType()
public boolean isFilter()
public boolean isForDataSet1()
protected DataSet getDataSet()
public void changeType(int type)
type
- The type to set. Will not overwrite FILTER typespublic java.lang.String getObjectName()
public java.util.List getAttributes()
public java.util.List getSpecAttributes()
public void reset()
public ReconValueSet getRecordData()
public int getRecordCount(java.lang.String qualifiedName) throws MXException, java.rmi.RemoteException, java.sql.SQLException
MXException
java.rmi.RemoteException
java.sql.SQLException
public void addAttributeByObject(java.lang.String objectName, java.lang.String attributeName)
public java.util.Map getUnitsMap()
public int[] getUnitToAttributeIndex()
public void setLoaded(boolean loaded)
public boolean isLoaded()
public void setLinkValue(java.util.Map linkValue)