public abstract class ErrorCode extends Object implements Serializable
CATEGORY-###
.Modifier | Constructor and Description |
---|---|
protected |
ErrorCode(String category,
long code)
Creates a new ErrorCode with the given category and code.
|
protected |
ErrorCode(String category,
long code,
boolean performUniquenessCheck)
Creates a new ErrorCode with the given category and code, optionally ensuring the ErrorCode is unique.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
formatError(Locale locale,
String... context)
Format a contextual error message.
|
String |
getCategory() |
long |
getCode() |
static ErrorCode |
getErrorCode(String category,
long code)
Get an ErrorCode given its category and number.
|
int |
hashCode() |
protected Object |
readResolve()
Need to implement readResolve() in order to ensure == works for serialized error codes.
|
String |
toString() |
protected ErrorCode(String category, long code)
category
- code
- protected ErrorCode(String category, long code, boolean performUniquenessCheck)
category
- code
- performUniquenessCheck
- public String getCategory()
public long getCode()
public String formatError(Locale locale, String... context)
public static ErrorCode getErrorCode(String category, long code)
protected Object readResolve()
NOTE: needs to be protected to ensure all error codes use this read resolve.
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.