Search in sources :

Example 1 with GetResponse

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;
}
Also used : GetRequest(com.netsuite.webservices.platform.messages.GetRequest) RecordRef(com.netsuite.webservices.platform.core.RecordRef) ListOrRecordRef(com.netsuite.webservices.platform.core.ListOrRecordRef) GetResponse(com.netsuite.webservices.platform.messages.GetResponse)

Aggregations

ListOrRecordRef (com.netsuite.webservices.platform.core.ListOrRecordRef)1 RecordRef (com.netsuite.webservices.platform.core.RecordRef)1 GetRequest (com.netsuite.webservices.platform.messages.GetRequest)1 GetResponse (com.netsuite.webservices.platform.messages.GetResponse)1