Search in sources :

Example 21 with CustomFieldDesc

use of org.talend.components.netsuite.client.model.CustomFieldDesc in project components by Talend.

the class CustomMetaDataRetrieverImpl method retrieveCustomRecordCustomFields.

@Override
public Map<String, CustomFieldDesc> retrieveCustomRecordCustomFields(RecordTypeDesc recordType, NsRef nsCustomizationRef) throws NetSuiteException {
    List<?> customizationList = retrieveCustomizations(Collections.singletonList(nsCustomizationRef));
    if (customizationList.isEmpty()) {
        return null;
    }
    CustomRecordType customRecordType = (CustomRecordType) customizationList.get(0);
    List<?> customFieldList = customRecordType.getCustomFieldList().getCustomField();
    Map<String, CustomFieldDesc> customFieldDescMap = DefaultCustomMetaDataSource.createCustomFieldDescMap(clientService, recordType, BasicRecordType.getByType(nsCustomizationRef.getType()), customFieldList);
    return customFieldDescMap;
}
Also used : CustomRecordType(com.netsuite.webservices.v2016_2.setup.customization.CustomRecordType) CustomFieldDesc(org.talend.components.netsuite.client.model.CustomFieldDesc)

Aggregations

CustomFieldDesc (org.talend.components.netsuite.client.model.CustomFieldDesc)21 Schema (org.apache.avro.Schema)6 FieldDesc (org.talend.components.netsuite.client.model.FieldDesc)6 CustomFieldRefType (org.talend.components.netsuite.client.model.customfield.CustomFieldRefType)6 HashMap (java.util.HashMap)5 CustomRecordTypeInfo (org.talend.components.netsuite.client.model.CustomRecordTypeInfo)5 ArrayList (java.util.ArrayList)4 XMLGregorianCalendar (javax.xml.datatype.XMLGregorianCalendar)3 Test (org.junit.Test)3 NsRef (org.talend.components.netsuite.client.NsRef)3 RecordTypeInfo (org.talend.components.netsuite.client.model.RecordTypeInfo)3 JsonNode (com.fasterxml.jackson.databind.JsonNode)2 CustomFieldSpec (org.talend.components.netsuite.CustomFieldSpec)2 RecordTypeDesc (org.talend.components.netsuite.client.model.RecordTypeDesc)2 TypeDesc (org.talend.components.netsuite.client.model.TypeDesc)2 CustomRecordType (com.netsuite.webservices.test.setup.customization.CustomRecordType)1 Contact (com.netsuite.webservices.v2016_2.lists.relationships.Contact)1 BooleanCustomFieldRef (com.netsuite.webservices.v2016_2.platform.core.BooleanCustomFieldRef)1 CustomFieldList (com.netsuite.webservices.v2016_2.platform.core.CustomFieldList)1 CustomRecordType (com.netsuite.webservices.v2016_2.setup.customization.CustomRecordType)1