|
SAP CC 1.0
API 4.2 (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.highdeal.filter.hci.SearchFilterModel
public abstract class SearchFilterModel
This abstract class represents a search filter model and aggregates all search criteria
which can be used for searching entities.
This class also describes some search options which
will be used by the search engine.
Those options are :
maxSize : limits the returned items count (-1 if no limitation).totalCountRequired : if true, the total count of searched items must be returned from : represents a current item unique ID from which the search must begin.sort : indicate the sort order which will be applied on the unique
identifier for searching items.resultType : specifies if the result must be a list of complete objects or
only a list of IDs.
| XML Schema Fragment |
<xs:complexType name="SearchFilter">
<xs:sequence>
<xs:element ref="attributeDescription" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="specificFormula" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="from" type="xs:string"/>
<xs:attribute name="maxSize" type="xs:int"/> <!-- means "all" if not set -->
<xs:attribute name="sort" type="SearchOrderType" default="noOrder"/>
<xs:attribute name="totalCountRequired" type="xs:boolean" default="false"/> <!-- tells if the total count of items must be performed -->
<xs:attribute name="resultType" type="ResultTypeTypeSF" default="objects"/>
</xs:complexType> |
<xs:element name="SearchFilter" type="SearchFilter" abstract="true"/> <!-- The search order is sorted in time so the sorting process works on OID absolute values because of partitioning (OID could be negative) --> |
<xs:simpleType name="SearchOrderType">
<xs:restriction base="xs:string">
<xs:enumeration value="asc"/> <!-- forward response result -->
<xs:enumeration value="desc"/><!-- backward response result -->
<xs:enumeration value="noOrder"/><!-- no sort required, more efficient -->
</xs:restriction>
</xs:simpleType> |
<xs:simpleType name="ResultTypeTypeSF">
<xs:restriction base="xs:string">
<xs:enumeration value="ids"/> <!-- object ids are returned -->
<xs:enumeration value="objects"/><!-- object models are returned -->
</xs:restriction>
</xs:simpleType> |
| Field Summary | |
|---|---|
static java.lang.String |
ASC_ORDER
Constant for ascending search order (value is set to "asc"). |
static java.lang.String |
DESC_ORDER
Constant for descending search order (value is set to "desc"). |
static int |
FILTER_GROUP_BNR
|
static int |
FILTER_GROUP_PNR
|
static int |
FILTER_GROUP_PREPAID
|
static int |
ID_RESULT_TYPE
Constant for "ids" result type (value is set to 1). |
static int |
ITERATOR_MODE
Constant for "iterator" search mode (value is set to 1). |
static int |
LIST_MODE
Constant for "list" search mode (value is set to 0). |
static java.lang.String |
NO_ORDER
Constant for no order search order (value is set to "noOrder"). |
static int |
OBJECT_RESULT_TYPE
Constant for "objects" result type (value is set to 0). |
| Constructor Summary | |
|---|---|
SearchFilterModel(java.lang.String searchFilterName)
Builds an empty SearchFilterModel. |
|
| Method Summary | |
|---|---|
void |
addAttributeSelection(AttributeDescriptionModel sel)
Adds a selection filter which port on a attribute field. |
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element. |
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the objects, the child represents
the marshallable object to be added into the content tree. |
void |
addSpecificFormula(SpecificFormulaModel formula)
Adds a specific constraint for the search operation, regarding to the working scope. |
java.util.List<AttributeDescriptionModel> |
getAttributeSelectionList()
Gets the list of constraints which must be checked for searching item. |
java.util.List<AttributeDescriptionModel> |
getAttributeSelectionListFromGroup(java.lang.String group)
Gets the list of constraints which must be checked for searching item and which belong to the same group. |
int |
getFilterGroup()
Returns the filter group of the searchFilterModel, default is BnR, this method is surrounded in PnR searchFilterModels. |
java.lang.String |
getFrom()
Gets the from cursor. |
abstract java.util.Vector<AttributeDescriptionModel> |
getMainAttributeDescriptionCatalog()
Returns the list of main attribute description on which the user can build some search criteria. |
abstract AttributeDescriptionModel |
getMainAttributeDescriptionFromCatalog(java.lang.String attributeName)
Returns an empty constraint from a catalog which can be used for specifying a criteria on a main attribute (identified by its name). |
int |
getMaxSize()
Gets the max. |
int |
getResultType()
Gets the search result type. |
java.lang.String |
getSearchFilterName()
Returns the XML element name of the current search filter. |
int |
getSearchMode()
Gets the search mode which must be used with this filter. |
java.lang.String |
getSort()
Gets the cursor search order. |
abstract java.util.Vector<SpecificFormulaModel> |
getSpecificFormulaCatalog()
This abstract method must be implemented into each concrete filter. |
abstract SpecificFormulaModel |
getSpecificFormulaFromCatalog(java.lang.String formCode)
This abstract method must be implemented into each concrete filter. |
java.util.List<SpecificFormulaModel> |
getSpecificFormulaList()
Gets the list of specific constraints. |
boolean |
isCountRequired()
Tells if the total number of selected items must be returned. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, and of its children. |
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the tag beeing processed. |
void |
setAttributeSelectionList(java.util.List<AttributeDescriptionModel> sels)
Sets the list of constraints which port on attribute fields. |
void |
setCountRequiredFlag(boolean flag)
Set the flag for returning the total number of selected items. |
void |
setFrom(java.lang.String f)
Gets the from cursor. |
void |
setMaxSize(int d)
Sets the max. |
void |
setResultType(int type)
Sets the search result type. |
void |
setSearchFilterName(java.lang.String name)
Sets the the XML element name of the current search filter. |
void |
setSearchMode(int mode)
Sets the search mode which must be used with this filter. |
void |
setSort(java.lang.String sortOrder)
Sets the from cursor search order. |
void |
setSpecificFormulaList(java.util.List<SpecificFormulaModel> specifics)
Sets the list of specific constraints. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int OBJECT_RESULT_TYPE
0).
public static final int ID_RESULT_TYPE
1).
public static final int LIST_MODE
0).
public static final int ITERATOR_MODE
1).
Reserved for internal use. Cannot be set by an API client.
public static final java.lang.String ASC_ORDER
"asc").
public static final java.lang.String DESC_ORDER
"desc").
public static final java.lang.String NO_ORDER
"noOrder").
public static final int FILTER_GROUP_PNR
public static final int FILTER_GROUP_BNR
public static final int FILTER_GROUP_PREPAID
| Constructor Detail |
|---|
public SearchFilterModel(java.lang.String searchFilterName)
super() pointer.
searchFilterName - the name of the XML element which implements this XML complex type.| Method Detail |
|---|
public java.lang.String getSearchFilterName()
public void setSearchFilterName(java.lang.String name)
name - the name to set.public int getMaxSize()
public void setMaxSize(int d)
d - the maxSize.public int getSearchMode()
listMode is available through the API (default value).
THe iteratorMode is reserved for internal use.
listMode (default value). iteratorMode (reserved for internal use). public void setSearchMode(int mode)
listMode is available through the API (default value).
The iteratorMode is reserved for internal use.
Set the searchMode which must be used with the current filter.
Available values are :
LIST_MODE (default value). ITERATOR_MODE (reserved for internal use).
mode - the search mode to set.public int getResultType()
ids : the search operation will return only the unique ids list of
targeted items.objects : the search operation will return the complete object list of
targeted items.
public void setResultType(int type)
ids : the search operation will return only the unique ids list of
targeted items.objects : the search operation will return the complete object list of
targeted items.
type - the result type to set.public java.lang.String getFrom()
null.
He can also specify a search order which will be applied on unique ids ("asc" by example).SearchResult). getLastID()) it means that some
other items exist into the database and a new search request can be executed. SearchResult with null
as value, it means that no more searched item exists into the DB and that the search operation can be stopped.
public void setFrom(java.lang.String f)
null.
He can also specify a search order which will be applied on unique ids ("asc" by example).SearchResult). getLastID()) it means that some
other items exist into the database and a new search request can be executed. SearchResult with null
as value, it means that no more searched item exists into the DB and that the search operation can be stopped. Note : the from cursor is always transmitted as a String even if the unique ID is a number. In this case, please cast it into a String value.
f - the from cursor. If it sets to public java.lang.String getSort()
public void setSort(java.lang.String sortOrder)
Note : if NO_ORDER is set, the server will decide itself what is the best order to use and sometime will use some internal ID (Object ID OID) for improving search performances.
According to search window mechanism definition
(see from cursor),
It is not recommended to change the the sort order into a same search window.
sortOrder - the order which is used for managing the cursor.public java.util.List<AttributeDescriptionModel> getAttributeSelectionList()
The boolean conjunction operator (AND) is applied between each list element.
In addition, the same operator will be applied between the last element
of this list and the first element of the specific constraint list
(see specificFormula) .
A search criteria is expressed through a
AttributeDescriptionModel . Indeed an attribute
description model, describes the attribute (name, type, default value) and aggregates some constraints
which must be checked by the attribute. In this case, those constraints are some good candidates to
express search criteria.
EnumeratedListConstraint for defining
a list of allowed values.RangeConstraint for defining
range type constraints.FormatConstraint for defining
constraints on String based on pattern definition.
AttributeDescriptionModel .public void setAttributeSelectionList(java.util.List<AttributeDescriptionModel> sels)
getAttributeSelectionList() for more info.
sels - a list of AttributeDescriptionModel.public java.util.List<AttributeDescriptionModel> getAttributeSelectionListFromGroup(java.lang.String group)
It exists 4 groups for qualifying an attribute :
MAIN_GROUP : the attribute
is a main attribute which is located into the main item table.ADDITIONAL_GROUP : the attribute
is an additional attribute which is located into the additional item table.PARAMETER_GROUP : the attribute
is a parameter attribute which is located into a related parameter table.COUNTER_GROUP : the attribute
is view as a counter which is located into a related table.
group - the group name.
Available values are :
attributeDescriptionpublic void addAttributeSelection(AttributeDescriptionModel sel)
sel - the selection which must be added into the list.public java.util.List<SpecificFormulaModel> getSpecificFormulaList()
As some searchable items can be specific, the specific
formula allows the user to complete the list of criteria with
predefined specific constraints which cannot be expressed by an
AttributeDescriptionModel.
SpecificFormulaModel.public void setSpecificFormulaList(java.util.List<SpecificFormulaModel> specifics)
getSpecificFormulaList() for more info.
specifics - a list of SpecificFormulaModel.public void addSpecificFormula(SpecificFormulaModel formula)
getSpecificFormulaList() for more info.
formula - the specific constraint which must be added into the specific constraint list.public void setCountRequiredFlag(boolean flag)
flag - If set to true, le result will constain the total
item count which match the constraints.
If it sets to false, totalCount will be set to -1.
See totalCount into
SearchResult.public boolean isCountRequired()
setCountRequiredFlag() for more info.
public int getFilterGroup()
public abstract SpecificFormulaModel getSpecificFormulaFromCatalog(java.lang.String formCode)
getSpecificFormulaList() for more info;
formCode - the code which identifies the specific formula.
public abstract java.util.Vector<SpecificFormulaModel> getSpecificFormulaCatalog()
getSpecificFormulaList() for more info;
SpecificFormulaModel.public abstract AttributeDescriptionModel getMainAttributeDescriptionFromCatalog(java.lang.String attributeName)
In main concrete filter, it exists some main attributes on which constraint can port on. The main difference between main attribute group and other attribute groups (additional, parameter, counter) is that those attribute are predefined. So we can establish the catalog of the main attribute for a concrete search filter, for whih it will be possible to build some search criteria.
This abstract method allows to retrieve a predefined constraint on a main attribute which belongs to the main attribute catalog.
attributeName - the name of the attribute. Please consult related concrete class for
more info.
public abstract java.util.Vector<AttributeDescriptionModel> getMainAttributeDescriptionCatalog()
getMainAttributeDescriptionFromCatalog()
for more info.
AttributeDescriptionModel
which are related to main attributes of the concrete search filter.public void setAttributes(XMLAttributes atts)
XMLMarshallable
setAttributes in interface XMLMarshallableatts - the XML attributes of the current tag.
public void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild represents
the marshallable object to be added into the content tree.
addChild in interface XMLMarshallabletagName - the name of tag for the child.child - the child to be added.public void addCharacterData(java.lang.String cData)
XMLMarshallable
addCharacterData in interface XMLMarshallablecData - the character data to be added.public void marshal(XMLOutputter output)
XMLMarshallable
marshal in interface XMLMarshallableoutput - the XML output to marshall the object into.
|
SAP CC 1.0
API 4.2 (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
SAP Convergent Charging 1.0 (build R4.2.1.35.0.0)
CONVERGENT CHARGING 4.2
(c) Copyright 2009 SAP AG. All rights reserved.