org.dvb.tvanytime.metadata
Class DatabaseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.dvb.tvanytime.metadata.DatabaseException
All Implemented Interfaces:
java.io.Serializable

public class DatabaseException
extends java.lang.Exception

Exception that is thrown when a database error occurs.

See Also:
Serialized Form

Field Summary
static int CONNECTION_FAILED
          Value of error code returned when a connection has been refused or has failed.
static int FATAL_ERROR
          Value of error code.
static int INVALID_FIELD_ID
          Value of error code.
static int INVALID_FIELD_VALUE
          Value of error code.
static int INVALID_REQUEST
          Value of error code.
static int UNABLE_TO_CONNECT
          Value of error code returned when the client is unable to connect to a remote server.
static int UNABLE_TO_LOCATE_SERVICE
          Value of error code returned when a metadata service cannot be located.
static int UNABLE_TO_TUNE
          Value of error code returned when tuning is required but is not permitted.
static int UNRECOGNIZED_VERSION
          Value of error code.
static int UNSPECIFIED_ERROR
          Value of error code.
static int UNSUPPORTED
          Value of error code.
static int UNSUPPORTED_QUERY_FIELD
          Value of error code.
static int UNSUPPORTED_SORT_FIELD
          Value of error code.
 
Constructor Summary
DatabaseException(java.lang.String reason, int errorCode)
          Construct a DatabaseException.
 
Method Summary
 int getErrorCode()
          Get the error code.
 java.lang.String[] getFieldIDs()
          Returns a list of fieldIDs when the error code is either UNSUPPORTED_QUERY_FIELD, UNSUPPORTED_SORT_FIELD, INVALID_FIELD_ID or INVALID_FIELD_VALUE.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FATAL_ERROR

public static final int FATAL_ERROR
Value of error code. The meaning of this error is defined in ETSI TS 102 822-6-1 Section 6.2

See Also:
Constant Field Values

INVALID_REQUEST

public static final int INVALID_REQUEST
Value of error code. The meaning of this error is defined in ETSI TS 102 822-6-1 Section 6.2

See Also:
Constant Field Values

UNSUPPORTED

public static final int UNSUPPORTED
Value of error code. The meaning of this error is defined in ETSI TS 102 822-6-1 Section 6.2

See Also:
Constant Field Values

UNRECOGNIZED_VERSION

public static final int UNRECOGNIZED_VERSION
Value of error code. The meaning of this error is defined in ETSI TS 102 822-6-1 Section 6.2

See Also:
Constant Field Values

UNSPECIFIED_ERROR

public static final int UNSPECIFIED_ERROR
Value of error code. The meaning of this error is defined in ETSI TS 102 822-6-1 Section 6.2

See Also:
Constant Field Values

UNSUPPORTED_QUERY_FIELD

public static final int UNSUPPORTED_QUERY_FIELD
Value of error code. The meaning of this error is defined in ETSI TS 102 822-6-1 Section 6.2

See Also:
Constant Field Values

UNSUPPORTED_SORT_FIELD

public static final int UNSUPPORTED_SORT_FIELD
Value of error code. The meaning of this error is defined in ETSI TS 102 822-6-1 Section 6.2

See Also:
Constant Field Values

INVALID_FIELD_ID

public static final int INVALID_FIELD_ID
Value of error code. The meaning of this error is defined in ETSI TS 102 822-6-1 Section 6.2

See Also:
Constant Field Values

INVALID_FIELD_VALUE

public static final int INVALID_FIELD_VALUE
Value of error code. The meaning of this error is defined in ETSI TS 102 822-6-1 Section 6.2

See Also:
Constant Field Values

UNABLE_TO_CONNECT

public static final int UNABLE_TO_CONNECT
Value of error code returned when the client is unable to connect to a remote server.

See Also:
Constant Field Values

CONNECTION_FAILED

public static final int CONNECTION_FAILED
Value of error code returned when a connection has been refused or has failed.

See Also:
Constant Field Values

UNABLE_TO_LOCATE_SERVICE

public static final int UNABLE_TO_LOCATE_SERVICE
Value of error code returned when a metadata service cannot be located.

See Also:
Constant Field Values

UNABLE_TO_TUNE

public static final int UNABLE_TO_TUNE
Value of error code returned when tuning is required but is not permitted.

See Also:
Constant Field Values
Constructor Detail

DatabaseException

public DatabaseException(java.lang.String reason,
                         int errorCode)
Construct a DatabaseException.

Parameters:
reason - the detail message
errorCode - an error code as defined by the static values in this class
Method Detail

getErrorCode

public int getErrorCode()
Get the error code.

Returns:
an int value

getFieldIDs

public java.lang.String[] getFieldIDs()
Returns a list of fieldIDs when the error code is either UNSUPPORTED_QUERY_FIELD, UNSUPPORTED_SORT_FIELD, INVALID_FIELD_ID or INVALID_FIELD_VALUE.

Returns:
an array of fieldID strings