private void writeUserFieldDefinitions ( ) { for ( CustomField cf : m_sortedCustomFieldsList ) { if ( cf . getFieldType ( ) != null && cf . getFieldType ( ) . getDataType ( ) != null ) { UDFTypeType udf = m_factory . createUDFTypeType ( ) ; udf . setObjectId ( Integer . valueOf ( FieldTypeHelper . getFieldID ( cf . getFieldType ( ) ) ) ) ; udf . setDataType ( UserFieldDataType . inferUserFieldDataType ( cf . getFieldType ( ) . getDataType ( ) ) ) ; udf . setSubjectArea ( UserFieldDataType . inferUserFieldSubjectArea ( cf . getFieldType ( ) ) ) ; udf . setTitle ( cf . getAlias ( ) ) ; m_apibo . getUDFType ( ) . add ( udf ) ; } } }
Add UDFType objects to a PM XML file .