Home > Contents > Index >
searchstate:findconstraint
Checks a searchstate for a constraint to a specific attribute and returns data about the constraint.
Syntax
<searchstate:findconstraint
name="ssname
" [bucket="bucketname
"] attribute="attribname
" varname="varname
"/>Parameters
name
(required)- Input parameter. Name of an object representing a searchstate.
bucket
(optional)- Input parameter. Bucket name. If not specified, the attribute name is used. Use this parameter to indicate which constraint you need when the same attribute is used in multiple contstraints. A bucket is an alias and functions similar to an inner join in SQL; when you have multiple tables that have columns of the same name, you must specify the table name to indicate which column you are requesting.
attribute
(required)- Input parameter. Name of the attribute to constrain.
varname
(required)- Input and output parameter. As input, name of a variable into which to write the constraint type on output. Note the variants below.
The following field applies only to nested constraints:
objvarname
(required)- Name of an object to create with the contents of the nested constraint.
The following fields apply to standard, simplesStandard, like, and simpleLike constraints:
attrtypevarname
(optional)- Name of a variable into which to write the attribute asset type name for the constraint.
attrvarname
(optional)- Name of a variable into which to write the attribute name for the constraint.
listvarname
(required)- Name of a variable into which to write the list of values for the attribute, if found. If not found, the variable is set to
null
. The list has a single column namedvalue
.
immediateonlyvarname
(optional)- Name of a variable into which to write the
immediateonly
constraint value.
The following fields apply only to rich text constraints:
attrtypevarname
(optional)- Name of a variable into which to write the attribute asset type name for the constraint.
attrvarname
(optional)- Name of a variable into which to write the attribute name for the constraint.
expressionvarname
(optional)- Name of the variable into which to write the rich text expression.
parservarname
(optional)- Name of the variable into which to write the rich text parser name.
confidencevarname
(optional)- Name of the variable into which to write the confidence.
maxcountvarname
(optional)- Name of the variable into which to write the max answers.
The following fields apply only to range constraints:
attrtypevarname
(optional)- Name of a variable into which to write the attribute asset type name for the constraint.
attrvarname
(optional)- Name of a variable into which to write the attribute name for the constraint.
lowervarname
|lowerequalvarname
(required)- Name of the variable into which to write the lower constraint.
uppervarname
|upperequalvarname
(required)- Name of the variable into which to write the upper constraint.
immediateonlyvarname
(optional)- Name of the variable into which to write the
immediateonly
value constraint.
Description
This tag is used when you want to retrieve information about a particular constraint in a searchstate that has been passed to the current code. If the constraint is found, data values about the constraint are returned.
Error Numbers
The possible values of
errno
include:
Value Description -10004 A required parameter is missing. -13050 General error.Example
This code creates an empty
searchstate
and adds a range constraint. It then uses thesearchstate:findconstraint
tag to retrieve various parameters set into the constraint earlier:<searchstate:create name="ss" /> <searchstate:addrangeconstraint name="ss" attribute="price" upper="3" lower="2"/> <searchstate:findconstraint name="ss" attribute="price" varname="constrainttype" attrtypevarname="typename" attrvarname="attribute" uppervarname="upper" lowervarname="lowerequal"/> <ics:getvar name="constrainttype"/><br/> <ics:getvar name="typename"/><br/> <ics:getvar name="attribute"/><br/> <ics:getvar name="upper"/><br/> <ics:getvar name="lowerequal"/><br/>See Also
searchstate:create
searchstate:addstandardconstraint
searchstate:addsimplestandardconstraint
searchstate:addlikeconstraint
searchstate:addsimplelikeconstraint
searchstate:addrangeconstraint
searchstate:addnestedconstraint
searchstate:addrichtextconstraint
Home > Contents > Index > ![]()
Oracle JSP Tag Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.