getAdditionalAttributes
getAdditionalAttributes()
getAdditionalAttributes 메소드는 Campaign에 정의된 사용자 정의 오퍼 속성을 리턴합니다.
리턴 값
getAdditionalAttributes 메소드는 NameValuePair 오브젝트의 배열을 리턴합니다.
다음 예는모든 추가 속성을 자세히 살펴 유효 날짜 및 만료 날짜를 확인하고 기타 속성을 인쇄합니다.
    for(NameValuePair offerAttribute : offer.getAdditionalAttributes())
{
// check to see if the effective date exists
if(offerAttribute.getName().equalsIgnoreCase("effectiveDate"))
{
System.out.println("Found effective date");
}
// check to see if the expiration date exists
else if(offerAttribute.getName().equalsIgnoreCase("expirationDate"))
{
System.out.println("Found expiration date");
}
printNameValuePair(offerAttribute);
}
}
public static void printNameValuePair(NameValuePair nvp)
{
// print out the name:
System.out.println("Name:"+nvp.getName());

// based on the datatype, call the appropriate method to get the value
if(nvp.getValueDataType()==NameValuePair.DATA_TYPE_DATETIME)
System.out.println("DateValue:"+nvp.getValueAsDate());
else if(nvp.getValueDataType()==NameValuePair.DATA_TYPE_NUMERIC)
System.out.println("NumericValue:"+nvp.getValueAsNumeric());
else
System.out.println("StringValue:"+nvp.getValueAsString());
}