Home >
Purpose TOC | Annotated TOC |
AssetSearch
Creates a list with the asset's attributes and the specification for each attribute.
Syntax
assetSearch(java.lang.String authusername, java.lang.String authpassword, java.lang.String TYPE, java.lang.String SUBTYPE, java.lang.String PREFIX, java.lang.String FIELDLIST, java.lang.String EXCLUDE, java.lang.String LIMIT, java.lang.String ORDER, java.lang.String WHAT, com.FatWire.StringVarsType SEARCHCRITERIA)Parameters
authusername (required)- (String) Name of the user to log in, as registered in Sites .
authpassword(required)- (String) Password for the associated user name.
TYPE (required)- (String) The asset type of the asset that you want to retrieve from the database.
SUBTYPE (optional)- (String) Asset subtype.
PREFIX (required)- (String) Prefix for variable names used to specify search criteria .
FIELDLIST (optional)- (String) Comma-seperated list of fields that you want to include or exclude from the request for asset fields. The
EXCLUDEparameter, which operates on the field list, determines whter the fields in the list are returned or whether all fields other than those in the list are returned.
EXCLUDE (optional)- (String) Depending on whether the value of
EXCLUDEisTrueorFalse, this operation either returns the fields specified in theFIELDLISTparameter or returns the fields not contained in the list.Trueindicates that all fields except the fields in theFIELDLISTare to be returned.Falseindicates that only fields inFIELDLISTare to be returned. That is, it returns fields specified with theFIELDLISTparameter. The default value isFalse.
LIMIT (optional)- Maximum number of assets to return.
ORDER (optional)- (String) An Order-By string to add to the end of the query. You can only use fields in the asset type's primary table for the order-by string.
WHAT (required)- (String) Comma separated list of fields from the asset's primary table to return. '*' indicates return all fields.
SEARCHCRITERIA (optional)- (StringVarsType Object) Contains a StringRowsType object which holds the keys and another StringRowsType object which holds the values.
The search criteria are gathered from Sites variables. For attributes of simple types, the variable search criteria is gathered from the following:
prefix:attribute_op- Search operation - Valid values are=, !=, <, >, <=, >=, like,ornot like.
prefix:attribute_map- For case-insensitive search of string fields. Indicates whether to map everything to upper or lower case before performing the operation. - Valid values arenone, upper,orlower.
prefix:attribute:Total- Number of criteria for this attribute to string together with ORs.
prefix:attribute:n - Where n is a number between 0 andprefix:attribute:Total-1 , indicating the search value.If there is no
prefix:attribute:Totalvariable:.
prefix:attribute- Search value
Description
Locates a list of asset primary table rows based on the asset type and a set of search criteria.
Returns
IList.
Error Numbers
The possible values of
errnoinclude:
Value Description -105 Database error. -10001 The implementing class is invalid. -10002 There is a missing method for the implementing class. -10003 The method could not be invoked successfully. -10001 The implementing class is invalid. -12006 There is no such asset type. -12064 Invalid asset search criteria.
Example
The following example code logs in the user and retrieves the id, name, and description of instances of Product_C:
AssetService service = new AssetServiceLocator(); AssetPortType port = service.getassetPort(); StringVarsType crit = new StringVarsType(); StringRowsType key = new StringRowsType(); key.setItem(new String[]{"Prod:Attribute_FSIIPrice", "Prod:Attribute_FSIIPrice_op", "Prod:Attribute_FSIIPrice_map"}); StringRowsType value = new StringRowsType(); value.setItem(new String[]{"1000", ">", "none"}); crit.setKeys(key); crit.setValues(value); IList myList = port.assetSearch("fwadmin", "xceladmin", "Product_C", "FSII Product", "Prod", "Attribute_FSIIPrice", null, null, null, null, "description", "id,name,description", crit);
Home > Contents > Index > ![]()
Oracle Web Services Reference
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.