com.informix.util

## Class IfxMessage

- java.lang.Object
- - com.informix.util.IfxMessage

    public class IfxMessage
    extends java.lang.Object

### Nested Class Summary

Nested Classes
`static class` `IfxMessage.bundleMap`

### Method Summary

Methods
`static java.lang.String` `getMessage(int sqlcode)` Return the error message text that corresponds to error code 'sqlcode'.
`static java.lang.String` `getMessage(int sqlcode, java.util.Locale loc)` Return the error message text that corresponds to error code 'sqlcode'.
`static java.lang.String` `getMessage(int sqlcode, java.lang.String locale)` Return the error message text that corresponds to error code 'sqlcode'.
`static java.lang.String` `getMessage(int sqlcode, java.lang.String arg1, java.lang.String locale)` Return the error message text that corresponds to error code 'sqlcode' with an argument that will replace the %d, %s, or %ld expression in the message text.
`static java.lang.String` `getMessage(int sqlcode, java.lang.String arg1, java.lang.String arg2, java.lang.String locale)` Return the error message text that corresponds to error code 'sqlcode' Then call getMessage(msgtext, arg1, arg2) to replace the %d, %s, or %ld items in the message text by arg1 and arg2.
`static java.lang.String` `getMessage(java.lang.String msgtext, java.lang.String arg1, java.lang.String locale)` Replace %d, %s, or %ld item in the message text by arg1.
`static java.lang.String` `getMessage(java.lang.String msgtext, java.lang.String arg1, java.lang.String arg2, java.lang.String locale)` Replace %d, %s, or %ld expressions in the message text by arg1 and arg2.
`static java.lang.String` `getSQLSTATE(int sqlcode)` Return the SqlState code that corresponds to the error code 'sqlcode'.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### getMessage

    public static java.lang.String getMessage(int sqlcode)

Return the error message text that corresponds to error code 'sqlcode'.

Parameters:
  `sqlcode` - Informix sql error code number
Returns:
  error message text

#### getMessage

    public static java.lang.String getMessage(int sqlcode,
                              java.lang.String locale)

Return the error message text that corresponds to error code 'sqlcode'.

Parameters:
  `sqlcode` - Informix sql error code number
  `locale` -
Returns:
  error message text

#### getMessage

    public static java.lang.String getMessage(int sqlcode,
                              java.util.Locale loc)

Return the error message text that corresponds to error code 'sqlcode'.

Parameters:
  `sqlcode` - Informix sql error code number
  `locale` -
Returns:
  error message text

#### getMessage

    public static java.lang.String getMessage(java.lang.String msgtext,
                              java.lang.String arg1,
                              java.lang.String locale)

Replace %d, %s, or %ld item in the message text by arg1.

Parameters:
  `msgtext` - Informix error message text
  `arg1` - text string to replace %d, %s, or %ld in msgtext
  `locale` -
Returns:
  error message text

#### getMessage

    public static java.lang.String getMessage(int sqlcode,
                              java.lang.String arg1,
                              java.lang.String locale)

Return the error message text that corresponds to error code 'sqlcode' with an argument that will replace the %d, %s, or %ld expression in the message text.

Parameters:
  `sqlcode` - Informix sql error number
  `arg1` - text string to replace %d, %s, or %ld in the message text
  `locale` -
Returns:
  error message text

#### getMessage

    public static java.lang.String getMessage(java.lang.String msgtext,
                              java.lang.String arg1,
                              java.lang.String arg2,
                              java.lang.String locale)

Replace %d, %s, or %ld expressions in the message text by arg1 and arg2. The first occurrence of %d, %s, or %ld will be replaced by arg1, and the second occurrence of %d, %s, or %ld will be replaced by arg2.

Parameters:
  `msgtext` - Informix error message text
  `arg1` - text string to replace the first occurrence of %d, %s, or %ld in msgtext
  `arg2` - text string to replace the second occurrence of %d, %s, or %ld in msgtext
  `locale` -
Returns:
  error message text

#### getMessage

    public static java.lang.String getMessage(int sqlcode,
                              java.lang.String arg1,
                              java.lang.String arg2,
                              java.lang.String locale)

Return the error message text that corresponds to error code 'sqlcode' Then call getMessage(msgtext, arg1, arg2) to replace the %d, %s, or %ld items in the message text by arg1 and arg2.

Parameters:
  `sqlcode` - Informix sql error number
  `arg1` - text string to replace the first occurrence of %d, %s, or %ld in the message text
  `arg2` - text string to replace the second occurrence of %d, %s, or %ld in the message text
  `locale` -
Returns:
  error message text

#### getSQLSTATE

    public static java.lang.String getSQLSTATE(int sqlcode)

Return the SqlState code that corresponds to the error code 'sqlcode'. It returns "IX000" if there is no SqlState code for this error.

Parameters:
  `sqlcode` - Informix sql error number
Returns:
  SqlState code