use of com.netsuite.webservices.platform.messages.GetResponse in project tdi-studio-se by Talend.
the class NetsuiteManagement_CXF method get.
public Record get(String entitytype, String id) throws Exception {
String typeName = TalendComponentGenerator.toInitialLower(TalendComponentGenerator.getEntityClass(entitytype).getSimpleName());
RecordRef ref = new RecordRef();
ref.setInternalId(id);
ref.setType(RecordType.fromValue(typeName));
GetRequest getRequest = new GetRequest();
getRequest.setBaseRef(ref);
GetResponse getResponse = getPort().get(getRequest);
if (getResponse.getReadResponse().getStatus().isIsSuccess()) {
return getResponse.getReadResponse().getRecord();
}
return null;
}
Aggregations