use of com.netsuite.webservices.platform.core.SearchCustomFieldList in project tdi-studio-se by Talend.
the class NetsuiteManagement_CXF method submitRequest.
public List<Record> submitRequest(boolean useRequestLevelAuth) throws Exception {
if (useRequestLevelAuth) {
initializeStub();
}
List<String> list = Arrays.asList(TalendComponentGenerator.transactionTypeList);
if (list.contains(this.entityClass.getSimpleName())) {
Method typeSetter = findMethod(this.searchBasicClass, "setType");
SearchEnumMultiSelectField semsf = new SearchEnumMultiSelectField();
semsf.getSearchValue().add(TalendComponentGenerator.toInitialLower(this.entityClass.getSimpleName()));
semsf.setOperator(SearchEnumMultiSelectFieldOperator.ANY_OF);
typeSetter.invoke(this.searchBasic, new Object[] { semsf });
}
if (this.hasCustomCriteria) {
this.criteriaSetter = findMethod(this.searchBasicClass, "setCustomFieldList");
SearchCustomFieldList scl = new SearchCustomFieldList();
scl.getCustomField().addAll(Arrays.asList(this.customCriteria));
this.criteriaSetter.invoke(this.searchBasic, new Object[] { scl });
}
Method basicSetter = findMethod(this.searchClass, "setBasic");
basicSetter.invoke(this.search, new Object[] { this.searchBasic });
SearchRecord s = this.search;
if (this.searchAdvanced != null) {
s = this.searchAdvanced;
Method setCriteriaMethod = findMethod(this.searchAdvancedClass, "setCriteria");
setCriteriaMethod.invoke(this.searchAdvanced, new Object[] { this.search });
}
SearchRequest searchRequest = new SearchRequest();
searchRequest.setSearchRecord(s);
this.searchResult = this._port.search(searchRequest).getSearchResult();
if (this.searchResult.getStatus().isIsSuccess()) {
this.searchId = this.searchResult.getSearchId();
if (this.searchResult.getRecordList() != null) {
return filterItemSearch();
}
}
return null;
}
Aggregations