it.eng.spagobi.behaviouralmodel.lov.bo
Class LovResultHandler

java.lang.Object
  extended by it.eng.spagobi.behaviouralmodel.lov.bo.LovResultHandler

public class LovResultHandler
extends java.lang.Object

Defines method to manage lov result


Constructor Summary
LovResultHandler(java.lang.String lovResult)
          constructor.
 
Method Summary
 boolean containsValue(java.lang.String value, java.lang.String valueColumnName)
          Checks if a lov result contains a specific result.
 it.eng.spago.base.SourceBean getLovResultSB()
          Gets the sourcebean of the lov result.
 it.eng.spago.base.SourceBean getRow(java.lang.String value, java.lang.String valueColumnName)
          Gets the SourceBean of the row which value column contains the input value.
 java.util.List getRows()
          Gets the list of result rows.
 java.lang.String getValueDescription(java.lang.String value, java.lang.String valueColumnName, java.lang.String descriptionColumnName)
          Gets the description specified on descriptionColumnName relevant to the row that has valueColumnName equal to value.
 java.util.List getValues(java.lang.String valueColumnName)
          Gets the list of values contained into the lov result.
 boolean isSingleValue()
          Checks if the lov result as only one value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LovResultHandler

public LovResultHandler(java.lang.String lovResult)
                 throws it.eng.spago.base.SourceBeanException
constructor.

Parameters:
lovResult - the xml string representation of the lov result
Throws:
it.eng.spago.base.SourceBeanException - the source bean exception
Method Detail

getRows

public java.util.List getRows()
Gets the list of result rows.

Returns:
list of rows

getRow

public it.eng.spago.base.SourceBean getRow(java.lang.String value,
                                           java.lang.String valueColumnName)
Gets the SourceBean of the row which value column contains the input value.

Parameters:
value - input value which identifies the row
valueColumnName - name of the column that holds the values
Returns:
the SourceBean of the row

getValues

public java.util.List getValues(java.lang.String valueColumnName)
Gets the list of values contained into the lov result.

Parameters:
valueColumnName - name of the column that holds the values
Returns:
list of values

containsValue

public boolean containsValue(java.lang.String value,
                             java.lang.String valueColumnName)
Checks if a lov result contains a specific result.

Parameters:
value - the value to search
valueColumnName - name of the column that holds the values
Returns:
true if the value is contained, false otherwise

getValueDescription

public java.lang.String getValueDescription(java.lang.String value,
                                            java.lang.String valueColumnName,
                                            java.lang.String descriptionColumnName)
Gets the description specified on descriptionColumnName relevant to the row that has valueColumnName equal to value.

Parameters:
value - The value to search
valueColumnName - The value column
descriptionColumnName - The description column
Returns:
the description specified on descriptionColumnName relevant to the row that has valueColumnName equal to value

getLovResultSB

public it.eng.spago.base.SourceBean getLovResultSB()
Gets the sourcebean of the lov result.

Returns:
the sourcebean of the lov result

isSingleValue

public boolean isSingleValue()
Checks if the lov result as only one value.

Returns:
true if the result contains only one value, false otherwise