com.triactive.jdo.store.adapter
Class PostgresqlSqlState

java.lang.Object
  extended bycom.triactive.jdo.store.adapter.SqlState
      extended bycom.triactive.jdo.store.adapter.PostgresqlSqlState

public class PostgresqlSqlState
extends SqlState

A SQLSTATE diagnostic code for PostgreSQL.

Author:
Mike Martin
See Also:
DatabaseAdapter

Nested Class Summary
static class PostgresqlSqlState.ClassCode
          Contains constants for known SQLSTATE class codes.
 
Constructor Summary
PostgresqlSqlState(java.lang.String s)
          Constructs a SqlState object from the specified SQLSTATE string.
 
Method Summary
 boolean isWorthRetrying()
          Indicates whether or not this SQLSTATE represents an error whose cause may be transient, meaning the operation or transaction may succeed if retried.
 
Methods inherited from class com.triactive.jdo.store.adapter.SqlState
classCode, isStandard, subclassCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgresqlSqlState

public PostgresqlSqlState(java.lang.String s)
                   throws java.lang.IllegalArgumentException
Constructs a SqlState object from the specified SQLSTATE string.

Parameters:
s - A 5-character SQLSTATE string.
Throws:
java.lang.IllegalArgumentException - if s is not a valid 5-character SQLSTATE string.
Method Detail

isWorthRetrying

public boolean isWorthRetrying()
Description copied from class: SqlState
Indicates whether or not this SQLSTATE represents an error whose cause may be transient, meaning the operation or transaction may succeed if retried.

The implementation in this class errs on the side of declaring things retryable, meaning it returns false only for recognized values that are known not to be worth retrying. Subclasses may override this method in vendor-specific ways.

Overrides:
isWorthRetrying in class SqlState
Returns:
true if the error may be transient, false if a retry is known to be pointless.


Copyright 2001-2007 The TJDO Project All Rights Reserved.