|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FilterCondition
Warning: This interface is no longer functional from the SAP BusinessObjects 4.0 release onwards.
The FilterCondition
interface defines a value to test an object with in a filter or a condition.
Depending on which operator has been set, zero, one or more values have to be specified in this object.
Method Summary | |
---|---|
ConditionObjectValue |
createConditionObjectValue(DataSourceObject ds)
This function is used to create a FilterCondition based on an
existing DataSourceObject . |
ConditionPrompt |
createConditionPrompt(java.lang.String question)
Creates a prompt and adds it to the operand list. |
FilterConditionConstant |
createFilterConditionConstant(java.lang.String value)
Creates a constant value and adds it to the operand list. |
ConditionCorrelationValue |
createFilterConditionQuery(DataProvider dp,
java.lang.String objID,
int correlation)
This function is used to create a FilterCondition based on
a DataProvider object. |
FilterConditionConstant |
createFilterConditionValueFromLOV(ValueFromLov value)
Creates a FilterConditionConstant object from a
ValueFromLov object and adds it to the operand list. |
int |
getMaxOperandCount()
Gets the maximum amount of operands for the current operator, if the number of operands is bound to a maximum. |
int |
getMinOperandCount()
Gets the minimum amount of operands for the current operator. |
FilterConditionValue |
getOperand(int index)
Returns the operand at the specified position in the list. |
int |
getOperandCount()
Returns the number of operands currently added for this filter condition. |
Operator |
getOperator()
Returns the operator. |
void |
removeAllOperands()
Removes any operands. |
void |
removeOperand(FilterConditionValue operand)
Removes an operand. |
void |
setOperator(Operator operator)
Changes the operator. |
Method Detail |
---|
FilterConditionConstant createFilterConditionConstant(java.lang.String value)
value
- the new filter constant's value
FilterConditionConstant
instance.
FilterConditionException
- when the new operand would introduce too many operands for the
current operator (ie before this method call was made,
getOperandCount() == getMaxOperandCount()
evaluated to true
)
java.lang.NullPointerException
- when value
is null
FilterCondition.getMaxOperandCount()
ConditionPrompt createConditionPrompt(java.lang.String question)
question
- The new filter constant's value
ConditionPrompt
instance.
FilterConditionException
- when the new operand would introduce too many operands for the
current operator (ie before this method call was made,
getOperandCount() == getMaxOperandCount()
evaluated to true
)
FilterConditionException
- when this FilterCondition
is part of a
FilterObject
(no prompts are allowed on filters)
java.lang.NullPointerException
- when question
is null
FilterCondition.getMaxOperandCount()
Operator getOperator()
void setOperator(Operator operator)
Changes the operator. If there are too many operands for the new operator, any oparends with index
>= getMaxOperandCount()
for the new operator, will be removed.
Note that some operators are not allowed on certain object types, see Operator
for
more details.
operator
- the new operator
FilterConditionException
- when operator
is illegal for the object defined
in FilterConditionObject
, or when operator
can only be applied on
conditions and this FilterCondition
is part of a FilterObject
.
java.lang.NullPointerException
- when operator
is null
java.lang.UnsupportedOperationException
- when operator
isn't supported by DataSource.int getOperandCount()
int getMinOperandCount()
int getMaxOperandCount()
-1
when there is
no maximumFilterConditionValue getOperand(int index)
index
- the index of the operand to return (0 based)
FilterConditionValue
instance.
java.lang.ArrayIndexOutOfBoundsException
- if index
is out of range
(index < 0 || index >= getOperandCount()
)void removeOperand(FilterConditionValue operand)
operand
- The operand to remove. When null
or the operand is not in the
operand list, nothing happensvoid removeAllOperands()
ConditionObjectValue createConditionObjectValue(DataSourceObject ds)
FilterCondition
based on an
existing DataSourceObject
.
An example of a condition in a query is: "Country" equal to "Country of Origin".
ds
- a DataSourceObject
DataSource
,
DataSource.getClasses()
,
DataSource.getHierarchies()
,
DataProvider
ConditionCorrelationValue createFilterConditionQuery(DataProvider dp, java.lang.String objID, int correlation)
FilterCondition
based on
a DataProvider object. This function takes the DataProvider
and the
ID of the data provider object to create a FilterCondition
object.
dp
- the data provider from which a result object is selected to create the filter operand.objID
- the ID of the object.correlation
- the value of the correlation operator.
ConditionCorrelationValue
object.DataProvider
,
Correlation
FilterConditionConstant createFilterConditionValueFromLOV(ValueFromLov value)
FilterConditionConstant
object from a
ValueFromLov
object and adds it to the operand list.
value
- A ValueFromLov
object.
FilterConditionConstant
object.
java.lang.NullPointerException
- When value
is null
or value.getValue()
returns null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |