Package com.primavera
Class BatchException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.primavera.PrimaveraException
com.primavera.ServerException
com.primavera.PhoenixException
com.primavera.BatchException
- All Implemented Interfaces:
Serializable
Exception containing all business rule exceptions that occurred
during a batch create or update.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe index could not be determined. -
Constructor Summary
ConstructorsConstructorDescriptionBatchException(String strMessage) Class constructor specifying a detailed message.BatchException(String strMessage, Throwable thE) Class constructor specifying a detailed message and the original thrown exception. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAll(BatchException src) Adds all exceptions contained in another BatchException to this BatchExceptionstatic BatchExceptionaddBatchException(BatchException batchException, BatchException newException) Adds all exceptions contained in another BatchException to a BatchException.static BatchExceptionaddBatchException(BatchException batchException, ServerException newException, int sourceIndex) Adds an exception to a BatchException.voidaddExceptionToList(ServerException newException, int sourceIndex) Adds an exception to the list of exceptions.Gets the list of exceptions contained in this batch exception.Gets the exceptions contained in this batch exception as a sorted map, where the key is the index in the batch, and the value is a list of exceptions for that index.Gets the source for the first exception in the exception list.Methods inherited from class com.primavera.ServerException
setSourceMethods inherited from class com.primavera.PrimaveraException
getOriginalException, getStackTrace, getStackTrace, isSQLExceptionThrown, printStackTrace, printStackTrace, printStackTrace, removeOriginalExceptionMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getSuppressed, initCause, setStackTrace, toString
-
Field Details
-
UNKNOWN_INDEX
public static final int UNKNOWN_INDEXThe index could not be determined.- See Also:
-
-
Constructor Details
-
BatchException
Class constructor specifying a detailed message and the original thrown exception.- Parameters:
strMessage- the detailed message of this exceptionthE- the originally thrown exception
-
BatchException
Class constructor specifying a detailed message.- Parameters:
strMessage- the message of this exception
-
-
Method Details
-
addBatchException
public static BatchException addBatchException(BatchException batchException, ServerException newException, int sourceIndex) Adds an exception to a BatchException. If the BatchException parameter is null, a new BatchException gets created.- Parameters:
batchException- the batch exception to received the added exception. This parameter may be null.newException- the exception to add.sourceIndex- the index in the batch for which the exception occurred- Returns:
- BatchException the batch exception
-
addBatchException
public static BatchException addBatchException(BatchException batchException, BatchException newException) Adds all exceptions contained in another BatchException to a BatchException. If the BatchException parameter is null, a new BatchException gets created.- Parameters:
batchException- the batch exception to receive the added exception. This parameter may be null.newException- the exception to add.- Returns:
- BatchException the batch exception
-
addAll
Adds all exceptions contained in another BatchException to this BatchException- Parameters:
src- the batch exception containing the exceptions to add- Returns:
- boolean true if the exception list changed as a result of the call.
-
addExceptionToList
Adds an exception to the list of exceptions.- Parameters:
newException- the exception to addsourceIndex- the index in the batch for which the exception occurred
-
getExceptionsByIndex
Gets the exceptions contained in this batch exception as a sorted map, where the key is the index in the batch, and the value is a list of exceptions for that index.- Returns:
- Map a sorted map of exceptions
-
getExceptionList
Gets the list of exceptions contained in this batch exception.- Returns:
- List the list of exceptions
-
getSource
Gets the source for the first exception in the exception list. This method will return null if the first exception has no specified source.- Overrides:
getSourcein classServerException- Returns:
- Object the source object of the first exception in the list, or null if the first exception has no specified source.
-