getBatchStatusCode
getBatchStatusCode()
getBatchStatusCode 메소드는 executeBatch 메소드에 의해 실행된 명령 배열에서 최상위 상태 코드를 리턴합니다.
리턴 값
getBatchStatusCode 메소드는 정수를 리턴합니다.
*
*
*
다음 코드 샘플은 BatchStatusCode 검색 방법 예를 제공합니다.
// Top level status code is a short cut to determine if there are any 
// non-successes in the array of Response objects
if(batchResponse.getBatchStatusCode() == Response.STATUS_SUCCESS)
{
System.out.println("ExecuteBatch ran perfectly!");
}
else if(batchResponse.getBatchStatusCode() == Response.STATUS_WARNING)
{
System.out.println("ExecuteBatch call processed with at least one warning");
}
else
{
System.out.println("ExecuteBatch call processed with at least one error");
}

// Iterate through the array, and print out the message for any non-successes
for(Response response : batchResponse.getResponses())
{
if(response.getStatusCode()!=Response.STATUS_SUCCESS)
{
printDetailMessageOfWarningOrError("executeBatchCommand",
response.getAdvisoryMessages());
}
}