Spatial DataBlade
JAVA API v8.21

com.ibm.spatial.util
Class Messages

java.lang.Object
  extended by com.ibm.spatial.util.Messages
All Implemented Interfaces:
MessageProvider

public class Messages
extends java.lang.Object
implements MessageProvider

Messages provides error messages for the Spatial API.


Field Summary
static int MSG_ASSERT_FAILURE
          Assertion failure - the error message will contain the class and method where the assertion check failed; assertion checking is only turned on in the debugging version of the API.
static int MSG_ASSERT_FAILURE_WITH_ID
          Assertion failure - the error message will contain the class, method, and a numerical id where an assertion check has failed; this error message will help identify an assertion fail point if assertions are checked in different places inside the same method; assertion checking is only turned on in the debugging version of the API.
static int MSG_BAD_CODE
          Invalid message code in Messages.getMessage().
static int MSG_CONCURRENT_CLIENT
          Another database client concurrently inserts new rows into the coordinate references table.
static int MSG_CORRUPT_CACHE
          The SRS cache and the underlying database are out of sync; if this error occurs, the application should execute CoordRefManager.read() to resynchronize the cache with the underlying spatial references table.
static int MSG_ENTRY
          Entering method.
static int MSG_EXCEPTION
          An exception has been thrown; if logging is turned on, the log will contain the exception's backtrace.
static int MSG_FORMAT_ERROR
          An error occurred while formatting the message.
static int MSG_INVALID_CONNECTION
          Invalid database connection.
static int MSG_INVALID_FORMAT
          Invalid geometry data format.
static int MSG_INVALID_GEOMETRY
          Invalid geometry.
static int MSG_INVALID_PARAM
          Invalid method argument.
static int MSG_INVALID_SHAPE_FORMAT
          Invalid shape data format.
static int MSG_INVALID_VERSION
          Unsupported data format version.
static int MSG_LOCALE_NOT_SUPPORTED
          The requested Locale is not supported.
static int MSG_LOG_ERROR
          Error while logging.
static int MSG_LOG_INFO
          Logging level: info.
static int MSG_LOG_SEVERE
          Logging level: severe errors.
static int MSG_LOG_WARNING
          Logging level: warnings.
static int MSG_NO_READER
          Failed to find a geometry reader for the requasted data format.
static int MSG_NO_WRITER
          Failed to find a geometry writer for the requasted data format.
static int MSG_OUT_OF_BOUNDS
          Coordinates out of bounds.
static int MSG_RETURN
          Exiting method.
static int MSG_SQL_ERROR
          SQL error.
static int MSG_SRSDELETE_FAILED
          Failed to delete an SRS from the spatial references table.
static int MSG_SRSINSERT_FAILED
          Failed to insert an SRS into the spatial references table.
static int MSG_SRSSELECT_FAILED
          Failed to retrieve an SRS from the spatial references table.
static int MSG_SRSUPDATE_FAILED
          Failed to update an SRS into the spatial references table.
static int MSG_SUBS_OUT_OF_RANGE
          Argument out of range.
static int MSG_UNSUPPORTED
          Unsupported operation.
 
Constructor Summary
Messages()
           
 
Method Summary
 java.util.Locale getLocale()
          Gets the locale used for error messages.
 java.lang.String getMessage(int code, java.lang.Object[] args)
          Creates a message from the specified code and replacement arguments, localized to the current locale.
 java.lang.String getMessage(int code, java.lang.Object[] args, java.util.Locale locale)
          Creates a message from the specified code and replacement arguments, localized to the given locale.
 void setLocale(java.util.Locale locale)
          Sets the locale used for error messages.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSG_BAD_CODE

public static final int MSG_BAD_CODE
Invalid message code in Messages.getMessage().

See Also:
Constant Field Values

MSG_FORMAT_ERROR

public static final int MSG_FORMAT_ERROR
An error occurred while formatting the message.

See Also:
Constant Field Values

MSG_OUT_OF_BOUNDS

public static final int MSG_OUT_OF_BOUNDS
Coordinates out of bounds.

See Also:
Constant Field Values

MSG_SRSINSERT_FAILED

public static final int MSG_SRSINSERT_FAILED
Failed to insert an SRS into the spatial references table.

See Also:
Constant Field Values

MSG_SRSSELECT_FAILED

public static final int MSG_SRSSELECT_FAILED
Failed to retrieve an SRS from the spatial references table.

See Also:
Constant Field Values

MSG_SRSUPDATE_FAILED

public static final int MSG_SRSUPDATE_FAILED
Failed to update an SRS into the spatial references table.

See Also:
Constant Field Values

MSG_SRSDELETE_FAILED

public static final int MSG_SRSDELETE_FAILED
Failed to delete an SRS from the spatial references table.

See Also:
Constant Field Values

MSG_SQL_ERROR

public static final int MSG_SQL_ERROR
SQL error.

See Also:
Constant Field Values

MSG_INVALID_CONNECTION

public static final int MSG_INVALID_CONNECTION
Invalid database connection.

See Also:
Constant Field Values

MSG_CORRUPT_CACHE

public static final int MSG_CORRUPT_CACHE
The SRS cache and the underlying database are out of sync; if this error occurs, the application should execute CoordRefManager.read() to resynchronize the cache with the underlying spatial references table.

See Also:
Constant Field Values

MSG_INVALID_GEOMETRY

public static final int MSG_INVALID_GEOMETRY
Invalid geometry.

See Also:
Constant Field Values

MSG_NO_READER

public static final int MSG_NO_READER
Failed to find a geometry reader for the requasted data format.

See Also:
Constant Field Values

MSG_NO_WRITER

public static final int MSG_NO_WRITER
Failed to find a geometry writer for the requasted data format.

See Also:
Constant Field Values

MSG_INVALID_FORMAT

public static final int MSG_INVALID_FORMAT
Invalid geometry data format.

See Also:
Constant Field Values

MSG_INVALID_VERSION

public static final int MSG_INVALID_VERSION
Unsupported data format version.

See Also:
Constant Field Values

MSG_EXCEPTION

public static final int MSG_EXCEPTION
An exception has been thrown; if logging is turned on, the log will contain the exception's backtrace.

See Also:
Constant Field Values

MSG_INVALID_PARAM

public static final int MSG_INVALID_PARAM
Invalid method argument.

See Also:
Constant Field Values

MSG_SUBS_OUT_OF_RANGE

public static final int MSG_SUBS_OUT_OF_RANGE
Argument out of range.

See Also:
Constant Field Values

MSG_UNSUPPORTED

public static final int MSG_UNSUPPORTED
Unsupported operation.

See Also:
Constant Field Values

MSG_ASSERT_FAILURE

public static final int MSG_ASSERT_FAILURE
Assertion failure - the error message will contain the class and method where the assertion check failed; assertion checking is only turned on in the debugging version of the API.

See Also:
Constant Field Values

MSG_ASSERT_FAILURE_WITH_ID

public static final int MSG_ASSERT_FAILURE_WITH_ID
Assertion failure - the error message will contain the class, method, and a numerical id where an assertion check has failed; this error message will help identify an assertion fail point if assertions are checked in different places inside the same method; assertion checking is only turned on in the debugging version of the API.

See Also:
Constant Field Values

MSG_LOCALE_NOT_SUPPORTED

public static final int MSG_LOCALE_NOT_SUPPORTED
The requested Locale is not supported.

See Also:
Constant Field Values

MSG_INVALID_SHAPE_FORMAT

public static final int MSG_INVALID_SHAPE_FORMAT
Invalid shape data format.

See Also:
Constant Field Values

MSG_CONCURRENT_CLIENT

public static final int MSG_CONCURRENT_CLIENT
Another database client concurrently inserts new rows into the coordinate references table.

See Also:
Constant Field Values

MSG_ENTRY

public static final int MSG_ENTRY
Entering method.

See Also:
Constant Field Values

MSG_RETURN

public static final int MSG_RETURN
Exiting method.

See Also:
Constant Field Values

MSG_LOG_SEVERE

public static final int MSG_LOG_SEVERE
Logging level: severe errors.

See Also:
Constant Field Values

MSG_LOG_WARNING

public static final int MSG_LOG_WARNING
Logging level: warnings.

See Also:
Constant Field Values

MSG_LOG_INFO

public static final int MSG_LOG_INFO
Logging level: info.

See Also:
Constant Field Values

MSG_LOG_ERROR

public static final int MSG_LOG_ERROR
Error while logging.

See Also:
Constant Field Values
Constructor Detail

Messages

public Messages()
Method Detail

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale used for error messages.

Specified by:
setLocale in interface MessageProvider
Parameters:
locale - The new locale.

getLocale

public java.util.Locale getLocale()
Gets the locale used for error messages.

Specified by:
getLocale in interface MessageProvider
Returns:
The current locale.

getMessage

public java.lang.String getMessage(int code,
                                   java.lang.Object[] args,
                                   java.util.Locale locale)
Creates a message from the specified code and replacement arguments, localized to the given locale.

Specified by:
getMessage in interface MessageProvider
Parameters:
code - The key for the message text.
args - The arguments to be used as replacement text in the message created.
locale - The requested locale of the message to be created.
Returns:
a localized message from the specified message code

getMessage

public java.lang.String getMessage(int code,
                                   java.lang.Object[] args)
Creates a message from the specified code and replacement arguments, localized to the current locale. If no locale has been set, the default locale is being used.

Specified by:
getMessage in interface MessageProvider
Parameters:
code - The key for the message text.
args - The arguments to be used as replacement text in the message created.
Returns:
a localized message from the specified message code

Spatial DataBlade
JAVA API v8.21


Licensed Materials - Property of IBM
Copyright IBM Corp. 2002, 2012 All Rights Reserved.