public class SimpleTest extends FactBinding<SimpleTest>
A SimpleTest has the following properties:
All forms use the Connective property to specify whether this test is connected to the next test in the containing table by "And" or "Or", except when the containing table is for a test of form FORM_NESTED_AND or FORM_NESTED_OR. In these cases, the connective is given by the containing form. FORM_SIMPLE consists of 3 additional properties describing the immediate simple test:
> Nested forms use only:
For Example:
Order.total > 500 AND...
"Order.total" is the left expression (expression[0]), ">=" is the comparison operator, "500" is the right expression (expression[1]), "AND" is the connective.
On output, valid choices for the context of the SimpleTest can be obtained by calling getLeft().getValueOptions(), or getOperatorOptions(), etc.
Simple Tests may be grouped by use of the SimpleTestTable contained in each SimpleTest and setting of the Form property to FORM_NESTED, FORM_NESTED_NOT, FORM_NESTED_AND, ...
For Example:
Producing tests that are grouped in this way: not ( T1 && (T2 || T3) would require five SimpleTests: - SimpleTest with FORM_NESTED_NOT The embedded SimpleTestTable would contain two SimpleTests: - the first one with FORM_SIMPLE for T1 Connective: && - the second with FORM_NESTED the embedded SimpleTestTable would contain: two SimpleTests: - the first for T2 with connective: || - the second for T3
SimpleTest.getLeft()
and SimpleTest.getRight()
may be used as shorthand for
getExpressionTable().get(0) getExpressionTable().get(1)respectively. The builtins "between" and "in" take 3 or more arguments. The first is the left side expression. The second, third, and possibly more are the right side expressions. Use
SimpleTest.getRightSeparator()
to determine how to display the right side arguments. If this method returns "", there is only
one right side expression. E.g. consider a SimpleTest with
sombody.age between 20 and 30Note the "in" operator can have more than 3 expressions in its expression table. The SDK will create the first 3 expressions; the UI is responsible for adding more expressions and removing unwanted expressions. For example, the UI might show the following simple test:
item.color in "red", "blue" [+] [-]The user can click on the [+] to add another color to the test
item.color in "red", "blue", "black" [+] [-]The UI must call
SimpleTest.getExpressionTable()
.add() to add a new expression for "black".
When the user clicks [-], the UI calls getExpressionTable().remove(getExpressionTable().size()-1)Modifier and Type | Class and Description |
---|---|
static class |
SimpleTest.OperatorProperty |
FactBinding.FactPathProperty, FactBinding.VariableProperty
DictionaryComponent.Diff<T extends DictionaryComponent>, DictionaryComponent.DiffSummary, DictionaryComponent.DiffType
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FORM_AGGREGATE |
static java.lang.String |
FORM_DSL |
static java.lang.String |
FORM_EXPRESSION
indicates a boolean expression
|
static java.lang.String |
FORM_IS_A |
static java.lang.String |
FORM_NESTED
indicates a SimpleTestTable is expected to have entries.
|
static java.lang.String |
FORM_NESTED_AND |
static java.lang.String |
FORM_NESTED_NOT
indicates a SimpleTestTable is expected to have entries.
|
static java.lang.String |
FORM_NESTED_OR |
static java.lang.String |
FORM_NO_CASE |
static java.lang.String |
FORM_NO_FACT |
static java.lang.String |
FORM_NOT_NESTED
Deprecated.
|
static java.lang.String |
FORM_SIMPLE
indicates a variant of <expression> <operator> <expression>
SimpleTestTable and Variable properties are not used.
|
static java.lang.String |
FORM_SOME_CASE |
static java.lang.String |
FORM_SOME_FACT |
static java.lang.String |
FORM_VARIABLE_DEFINITION
indicates <variable> = <expression>
SimpleTestTable property is ignored.
|
BUILTIN
PROP_ACCESS, PROP_ACTION_SELECTED, PROP_ACTION_TABLE, PROP_ACTIVE, PROP_ACTUAL_TEST_OUTPUT_TABLE, PROP_ADHOC_TEST_VALIDATION, PROP_ADVANCED_MODE, PROP_AGGREGATE, PROP_AGGREGATE_TABLE, PROP_ALIAS, PROP_ALLOW_GAPS, PROP_ALWAYS_SELECTED, PROP_ARRAY, PROP_ARRAY_COMPONENT_TYPE, PROP_ARRAY_COMPONENT_TYPE_ID, PROP_ARRAY_FACT_TYPE_TABLE, PROP_AUTO_CONFLICT_RESOLUTION, PROP_AUTO_PATTERN_PROPERTY, PROP_AUTO_SYNC, PROP_BODY, PROP_BUCKET_ID_TABLE, PROP_BUCKET_SET, PROP_BUCKET_SET_ID, PROP_BUCKET_SET_TABLE, PROP_BUCKET_TABLE, PROP_CALENDAR_FORM, PROP_CHECK_RULE_FLOW, PROP_CHILD_DIMENSION_NODES, PROP_CONFLICT, PROP_CONFLICT_POLICY, PROP_CONNECTIVE, PROP_CONSTANT, PROP_CONSTRUCTOR, PROP_CONSTRUCTOR_TABLE, PROP_CREATION_UPDATE_NUMBER, PROP_CURSOR_POSITION, PROP_CUSTOM_BINDING, PROP_DATA_MODEL, PROP_DATA_SOURCE, PROP_DECISION_FUNCTION, PROP_DECISION_FUNCTION_ID, PROP_DECISION_FUNCTION_INPUT_TABLE, PROP_DECISION_FUNCTION_OUTPUT_TABLE, PROP_DECISION_FUNCTION_RULESET_TABLE, PROP_DECISION_FUNCTION_TABLE, PROP_DECISION_MODEL, PROP_DESCRIPTION, PROP_DF_FACT, PROP_DF_FACT_ID, PROP_DICT_LOADING_EXTENSION, PROP_DICTIONARY_LINK_TABLE, PROP_DIMENSION_NODE_TABLE, PROP_DIMENSION_TABLE, PROP_DISALLOW_ERROR_SUPPRESSION, PROP_DRAFT, PROP_DSL_ID, PROP_DSL_PARAMETER_TABLE, PROP_DSL_TABLE, PROP_DSL_VALUE, PROP_DT_ACTION_NODE_TABLE, PROP_DT_ACTION_PARAMETER_NAME, PROP_DTACTION_TABLE, PROP_DTRULE_TABLE, PROP_EFFECTIVE_END_DATE, PROP_EFFECTIVE_START_DATE, PROP_ENUM, PROP_ENUM_BUCKET_SET, PROP_ENUM_BUCKET_SET_ID, PROP_ENUM_TYPE, PROP_EXCEPTION_IDS, PROP_EXCEPTIONS, PROP_EXCLUDED, PROP_EXPECTED_TEST_OUTPUT_TABLE, PROP_EXPRESSION, PROP_EXPRESSION_TABLE, PROP_FACT_PATH, PROP_FACT_PATH_IDS, PROP_FACT_TABLE, PROP_FACT_TYPE, PROP_FACT_TYPE_ID, PROP_FACT_TYPE_IDS, PROP_FACT_TYPE_TABLE, PROP_FACT_TYPES, PROP_FIELD_TABLE, PROP_FINAL, PROP_FORM, PROP_FORMAL_PARAMETER_TABLE, PROP_FUNCTION, PROP_FUNCTION_ID, PROP_FUNCTION_SIGNATURE, PROP_FUNCTION_TABLE, PROP_GENERATED_FROM, PROP_GLOBAL_ALIAS, PROP_ID, PROP_INCLUDE_CHAINED_EXPR, PROP_INCLUDED, PROP_INTERFACE, PROP_INTERFACE_IDS, PROP_INTERFACES, PROP_IS_ABSTRACT, PROP_IS_CONSTANT, PROP_IS_ENUM, PROP_IS_FINAL, PROP_IS_JAXB2, PROP_IS_PRIMARY_KEY, PROP_IS_STATIC, PROP_IS_TOPLEVEL_VIEW_OBJECT, PROP_LEFT, PROP_LIFECYCLE, PROP_LIFECYCLE_DESCRIPTION, PROP_LINK_PATH, PROP_LIST, PROP_LIST_CONTENT_TYPE, PROP_LIST_CONTENT_TYPE_ID, PROP_LOCAL, PROP_LOGICAL, PROP_METHOD_TABLE, PROP_MODIFIERS, PROP_NAME, PROP_NAMESPACE, PROP_NESTED_TABLE, PROP_NO_CONFLICT, PROP_NO_RULE_FIRED_IS_ERROR, PROP_NODE_NAME, PROP_OPERATOR, PROP_OPERATOR_ID, PROP_ORDER_RULES_BY_BUCKET, PROP_OTHERWISE, PROP_OUTPUT_TYPES, PROP_OVERLOADED_PARAMETER_TABLE, PROP_OVERRIDDEN_BY, PROP_OVERRIDE, PROP_PACKAGE, PROP_PARAM, PROP_PARAM_EXPRESSION, PROP_PARAMETER_ALIAS, PROP_PARAMETER_ID, PROP_PARAMETER_LIST, PROP_PARAMETER_NAME, PROP_PARAMETER_REQUIRED, PROP_PARAMETER_TYPE_IDS, PROP_PARAMETER_TYPES, PROP_PARENT_DIMENSION_NODE, PROP_PATTERN_TABLE, PROP_PHRASE_SUGGESTION_FORM, PROP_PREFERENCES, PROP_PREFIX_LINKED_NAMES, PROP_PRIORITY, PROP_PRIVATE_BUCKET_SET, PROP_PROPERTIES, PROP_PROPERTY, PROP_PROPERTY_ID, PROP_PROPERTY_TABLE, PROP_PROPERTY_VALUE_TABLE, PROP_QUALIFIER_PATTERN, PROP_READABLE, PROP_REF_ID, PROP_REPORT_BYUSE_NAMES, PROP_REPORT_PATTERNS, PROP_RESOLVED_TARGET, PROP_RESOLVED_VALUE, PROP_RESOURCE_BUNDLE, PROP_RESTRICT_AUTO_SUGGESTIONS, PROP_RETURN_TYPE, PROP_RIGHT, PROP_RIGHT_SEPARATOR, PROP_RULE_EXEC_ALGORITHM, PROP_RULE_FIRING_LIMIT, PROP_RULE_FIRING_LIMIT_ERROR, PROP_RULE_REPORT_TABLE, PROP_RULE_SET_TABLE, PROP_RULE_SHEET_TABLE, PROP_RULE_TABLE, PROP_RULESET, PROP_RUN_AFTER, PROP_RUN_BEFORE, PROP_SERVICE_CONFIGURATION, PROP_SERVICE_NAME, PROP_SERVICE_NAMESPACE, PROP_SHARED_BUCKET_SET, PROP_SHARED_BUCKET_SET_ID, PROP_SHOW_CONSTANTS, PROP_SHOW_FUNCTIONS, PROP_SHOW_VARIABLES, PROP_SIMPLE_TEST_TABLE, PROP_SOURCE, PROP_STATELESS, PROP_STATIC, PROP_SUPER_CLASS, PROP_SUPER_CLASS_ID, PROP_SUPPORT_XPATH, PROP_SUPPORTS_XPATH_ENABLED, PROP_SYNC_MARK, PROP_SYSTEM, PROP_TARGET, PROP_TARGET_PACKAGE, PROP_TEST_CASE_TABLE, PROP_TEST_FORM, PROP_TEST_INPUT_TABLE, PROP_TEST_MODEL, PROP_TEST_RESULT_TABLE, PROP_TEST_SUITE_TABLE, PROP_TEST_TEMPLATE_TABLE, PROP_TIMESTAMP, PROP_TOKEN_UNDER_CURSOR, PROP_TRANSLATED_ALIAS, PROP_TRANSLATED_DESCRIPTION, PROP_TRANSLATED_GLOBAL_ALIAS, PROP_TRANSLATED_PARAMETER_LIST, PROP_TRANSLATED_QUALIFIER_PATTERN, PROP_TRANSLATED_VALUE, PROP_TRANSLATED_VARIABLE, PROP_TREE, PROP_TREE_MODE, PROP_TYPE, PROP_TYPE_ID, PROP_TYPE_IDS, PROP_TYPES, PROP_UNIQUE_RULESETS, PROP_UNSAVED_TRANSLATED_ALIAS, PROP_UNSAVED_TRANSLATED_DESCRIPTION, PROP_UNSAVED_TRANSLATED_GLOBAL_ALIAS, PROP_UNSAVED_TRANSLATED_QUALIFIER_PATTERN, PROP_UNSAVED_TRANSLATED_VALUE, PROP_UPDATE_NUMBER, PROP_UPDATE_TIME, PROP_VALIDATION, PROP_VALIDATION_UPDATE_NUMBER, PROP_VALUE, PROP_VALUES, PROP_VARIABLE, PROP_VARIABLE_TABLE, PROP_VERBAL_RULE_TABLE, PROP_VERSION, PROP_VERTICAL_ORIENTATION, PROP_VISIBILITY_FILTER, PROP_VISIBILITY_FILTER_ENABLED, PROP_VISIBLE, PROP_WEB_SERVICE, PROP_WRITABLE, PROP_XML_NAME
Modifier and Type | Method and Description |
---|---|
SimpleTest |
desurround()
if this is a nested simple test, replace it with the nested simple tests.
|
java.util.List<DOID> |
getAEReferences()
Get the DOIDs referenced by all directly or indirectly contained actions
and expressions
|
java.lang.String |
getAlias()
Even though we extend UnnamedComponent, we need the variable name to
translate expressions from persistent format (`ID`) to user format (name)
|
java.lang.String |
getAlias(boolean translate)
Get alias of DictionaryComponent.
|
java.lang.String |
getConnective()
Get the connective (and/or) combining this pattern with the next in the table.
|
java.lang.String[] |
getConnectiveOptions() |
TranslatedProperty |
getConnectiveProperty()
Get Connective Property.
|
int |
getConnectiveSelected() |
Expression |
getExpression()
Short for getExpressionTable.get(0)
|
ExpressionTable |
getExpressionTable()
Get the expressions.
|
TableProperty<Expression> |
getExpressionTableProperty()
Get ExpressionTable Property.
|
DOID |
getFactTypeID()
Get the ID of the fact type.
|
java.lang.String |
getForm()
Get untranslated form of this test.
|
java.lang.String[] |
getFormOptions()
Get untranslated options for the form of this test.
|
TranslatedProperty |
getFormProperty()
Get Form Property.
|
int |
getFormSelected() |
Expression |
getLeft()
Short for getExpressionTable().get(0)
|
java.lang.String |
getOperator() |
DOID |
getOperatorID() |
java.lang.String[] |
getOperatorOptions() |
SimpleTest.OperatorProperty |
getOperatorProperty()
Get Operator Property.
|
int |
getOperatorSelected() |
java.util.Collection<DictionaryProperty> |
getProperties(boolean storedOnly) |
Expression |
getRight()
Short for getExpressionTable.get(1)
|
java.lang.String |
getRightSeparator() |
SimpleTestTable |
getSimpleTestTable()
Get the nested table of SimpleTests.
|
TableProperty<SimpleTest> |
getSimpleTestTableProperty()
Get SimpleTestTable Property.
|
static java.lang.String[] |
getSurroundingFormOptions(java.util.List<SimpleTest> sts) |
java.lang.String[] |
getTranslatedSurroundingFormOptions() |
VerbalChoice |
getValue() |
VerbalProperty |
getValueProperty() |
boolean |
hasFactType() |
boolean |
isBuiltInOperator() |
boolean |
isNested()
is this test nested, e.g. (...) or not(...)
|
boolean |
isVisible()
Should this test be rendered?
|
void |
setConnective(java.lang.String connective)
Set the connective (and/or) combining this pattern with the next in the table.
|
void |
setForm(java.lang.String form)
Set form of this test.
|
void |
setOperator(java.lang.String operator) |
void |
setOperatorID(DOID operator) |
void |
setValue(VerbalChoice value)
Sets the Value of the RuleComponent
|
void |
setVisible(boolean flag)
Set whether this test should be rendered.
|
SimpleTest |
surround() |
static SimpleTest |
surround(java.util.List<SimpleTest> sts) |
SimpleTest |
surround(java.lang.String form) |
static SimpleTest |
surround(java.lang.String form,
java.util.List<SimpleTest> sts) |
get, getFactPath, getFactPathIDs, getFactPathOptions, getFactPathProperty, getFactType, getFactTypeOptions, getFactTypeProperty, getFactTypeSelected, getKind, getVariable, getVariable, getVariableProperty, put, setFactPath, setFactPathIDs, setFactType, setFactTypeID, setVariable, validate
getDiffMatchValue, init, isAliasDistinct, isNameDistinct
get, getParent, getParentTable, parentAction, parentActionContext, parentAutoBindingContext, parentFunction, parentPattern, parentRule, parentRuleBase, parentRuleCommon, parentRuleSheet, parentTest, parentVariable, parentVerbalRule, RHSRuleVariables
clear, containsKey, containsValue, entrySet, getAlias, getAlias, getAliasProperty, getAllReferences, getContainedDiffs, getCustom, getDependents, getDescription, getDescription, getDescriptionProperty, getDiff, getDiffProperties, getDiffs, getFullyQualifiedAlias, getFullyQualifiedName, getIndex, getIndex, getName, getNameProperty, getNext, getNext, getObjectPath, getOptions, getPrevious, getPrevious, getProperty, getReferences, getSelected, getTranslatedAlias, getTranslatedAlias, getTranslatedDescription, hasConflict, hasDiff, init, isEmpty, isFullyQualifiedName, isModifiable, isSystemProperty, isUnsavedTranslatedAlias, isUnsavedTranslatedDescription, keySet, putAll, remove, removeDiff, setAlias, setAlias, setCustom, setDescription, setDescription, setName, setTranslatedAlias, setTranslatedDescription, size, validate, values
equals, exists, getCombinedDataModel, getContainedIDs, getContainedIDs, getDataModel, getDictionary, getID, getObjectType, getParentByClass, getParentComponent, getParentComponentTable, getParentObject, getRuleSet, getState, getWarnings, hashCode, isModified, validate
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getPropertyNames, setAlias, setName
public static final java.lang.String FORM_SIMPLE
@Deprecated public static final java.lang.String FORM_NOT_NESTED
SimpleTest.FORM_SIMPLE
public static final java.lang.String FORM_EXPRESSION
public static final java.lang.String FORM_VARIABLE_DEFINITION
public static final java.lang.String FORM_NESTED
public static final java.lang.String FORM_NESTED_NOT
public static final java.lang.String FORM_NESTED_AND
public static final java.lang.String FORM_NESTED_OR
public static final java.lang.String FORM_IS_A
public static final java.lang.String FORM_SOME_FACT
public static final java.lang.String FORM_SOME_CASE
public static final java.lang.String FORM_NO_FACT
public static final java.lang.String FORM_NO_CASE
public static final java.lang.String FORM_AGGREGATE
public static final java.lang.String FORM_DSL
public boolean hasFactType()
hasFactType
in class FactBinding<SimpleTest>
public TranslatedProperty getFormProperty()
public void setForm(java.lang.String form)
form
- the untranslated form.
Form can be set using a translated form string using
getFormProperty().setTranslatedForm(translatedForm)
public java.lang.String getForm()
getFormProperty().getTranslatedValue()
public java.lang.String[] getFormOptions()
getFormProperty().getTranslatedOptions()
public int getFormSelected()
public SimpleTest.OperatorProperty getOperatorProperty()
public java.lang.String getOperator()
public void setOperator(java.lang.String operator)
public DOID getOperatorID()
public void setOperatorID(DOID operator)
public java.lang.String[] getOperatorOptions()
public int getOperatorSelected()
public TableProperty<Expression> getExpressionTableProperty()
public ExpressionTable getExpressionTable()
SimpleTest.getRightSeparator()
returns other than "".
Aggregate uses 1 expression.
Rule test variables use 1 expression.
The expression form uses 1 expression.public Expression getExpression()
public Expression getLeft()
public Expression getRight()
public TranslatedProperty getConnectiveProperty()
public java.lang.String getConnective()
Util.CONNECTIVE_AND
if not setpublic void setConnective(java.lang.String connective)
Util.CONNECTIVE_AND
if not setpublic java.lang.String[] getConnectiveOptions()
public int getConnectiveSelected()
public TableProperty<SimpleTest> getSimpleTestTableProperty()
public SimpleTestTable getSimpleTestTable()
public java.lang.String getRightSeparator()
public SimpleTest desurround()
public static SimpleTest surround(java.util.List<SimpleTest> sts)
public static SimpleTest surround(java.lang.String form, java.util.List<SimpleTest> sts)
public SimpleTest surround()
public SimpleTest surround(java.lang.String form)
public static java.lang.String[] getSurroundingFormOptions(java.util.List<SimpleTest> sts)
public java.lang.String[] getTranslatedSurroundingFormOptions()
public boolean isBuiltInOperator()
public boolean isVisible()
public void setVisible(boolean flag)
public java.util.List<DOID> getAEReferences()
DictionaryComponent
getAEReferences
in class DictionaryComponent<SimpleTest>
public java.lang.String getAlias()
getAlias
in interface UnnamedComponent
getAlias
in class DictionaryComponent<SimpleTest>
public java.lang.String getAlias(boolean translate)
DictionaryComponent
getAlias
in class DictionaryComponent<SimpleTest>
translate
- whether to get the translated aliaspublic DOID getFactTypeID()
FactBinding
getFactTypeID
in class FactBinding<SimpleTest>
public boolean isNested()
public java.util.Collection<DictionaryProperty> getProperties(boolean storedOnly)
getProperties
in class DictionaryComponent<SimpleTest>
public VerbalProperty getValueProperty()
public void setValue(VerbalChoice value)
value
- VerbalChoicepublic VerbalChoice getValue()