com.exponto.jstock.db
Class DBIndicatorParameters
java.lang.Object
com.exponto.jstock.db.DBIndicatorParameters
- public class DBIndicatorParameters
- extends java.lang.Object
- Author:
- kaare
Used to load parametervalues to/from database. In order to keep the db
related code away from the indicatorparameter classes, this class will be
used for that.
It is important that if the parameters of an indicator is changed, the
hashcode must be updated, otherwise e.g. lines would be completly
wrong.
A negative index means that this parameter is new to the database.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
DBIndicatorParameters
public DBIndicatorParameters()
DBIndicatorParameters
public DBIndicatorParameters(int index,
java.lang.String indicator,
java.lang.String value,
int code,
boolean isDisplayed)
- Creates a new DBIndicatorParameters.
- Parameters:
index
- - The db indexindicator
- - name of the indicatorvalue
- - Astring representing the parameters of the indicator.code
- - hash code of the indicator parametersisDisplayed
- - true if this indicator shall be displayed, false otherwise
The indicators shall be able to create and decode this string.
equals
public boolean equals(java.lang.Object o)
hashCode
public int hashCode()
compareIndicator
public boolean compareIndicator(DBIndicatorParameters dbIndParam)
- Compares this DBIndicatorParameters with anotherone and return true
if parameter value and indicator are equal.
Note that this methode don't care about the db index etc.
- Parameters:
dbIndParam
- the one to compare with
- Returns:
- true if this is the same parameter false otherwise
getIndex
public int getIndex()
- Returns:
- Returns the index.
setIndex
public void setIndex(int index)
getIndicatorName
public java.lang.String getIndicatorName()
- Returns:
- Returns the indicatorName.
setIndicatorName
public void setIndicatorName(java.lang.String name)
- Parameters:
name
- The IndicatorName to set.
getParameterValue
public java.lang.String getParameterValue()
- Returns:
- Returns the parameterValue.
setParameterValue
public void setParameterValue(java.lang.String value)
- Parameters:
value
- The parameterValue to set.
isDeleted
public boolean isDeleted()
- Returns:
- Returns the isDeleted.
delete
public void delete()
undelete
public void undelete()
getIndicatorCode
public int getIndicatorCode()
- Returns:
- Returns the m_indicatorcode.
setIndicatorCode
public void setIndicatorCode(int indicatorcode)
setDisplayed
public void setDisplayed(boolean b)
isDisplayed
public boolean isDisplayed()
Copyright © 2004 Kaare Ranum