aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Lind <barry@xythos.com>2003-09-08 17:45:35 +0000
committerBarry Lind <barry@xythos.com>2003-09-08 17:45:35 +0000
commit05dddf40c20d92834bb936d199361be45b85bc20 (patch)
treeb335fd5a2c3c6edc5a7c2b043494c671d38f4d18
parent0378a269f3ab3c44e67b14f96414b6ca95263263 (diff)
downloadpostgresql-05dddf40c20d92834bb936d199361be45b85bc20.tar.gz
postgresql-05dddf40c20d92834bb936d199361be45b85bc20.zip
Opps, can't forget the new file. This is part of the last commit to apply
the redhat patch for SQLState support. Added Files: PSQLState.java
-rw-r--r--src/interfaces/jdbc/org/postgresql/util/PSQLState.java42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/util/PSQLState.java b/src/interfaces/jdbc/org/postgresql/util/PSQLState.java
new file mode 100644
index 00000000000..f5775ac95d6
--- /dev/null
+++ b/src/interfaces/jdbc/org/postgresql/util/PSQLState.java
@@ -0,0 +1,42 @@
+/*-------------------------------------------------------------------------
+ *
+ * PSQLState.java
+ * This class is used for holding SQLState codes.
+ *
+ * Copyright (c) 2003, PostgreSQL Global Development Group
+ *
+ *-------------------------------------------------------------------------
+ */
+
+ package org.postgresql.util;
+
+ public class PSQLState
+ {
+ private String state;
+
+ public String getState()
+ {
+ return this.state;
+ }
+
+ public PSQLState(String state)
+ {
+ this.state = state;
+ }
+
+
+ // begin constant state codes
+ public final static PSQLState UNKNOWN_STATE = new PSQLState("");
+ public final static PSQLState COMMUNICATION_ERROR = new PSQLState("08S01");
+ public final static PSQLState DATA_ERROR = new PSQLState("22000");
+ public final static PSQLState CONNECTION_DOES_NOT_EXIST = new PSQLState("08003");
+ public final static PSQLState CONNECTION_REJECTED = new PSQLState("08004");
+ public final static PSQLState CONNECTION_UNABLE_TO_CONNECT = new PSQLState("08001");
+ public final static PSQLState CONNECTION_FAILURE = new PSQLState("08006");
+ public final static PSQLState CONNECTION_CLOSED = new PSQLState("08003");
+ public final static PSQLState NOT_IMPLEMENTED = new PSQLState("0A000");
+ public final static PSQLState INVALID_PARAMETER_TYPE = new PSQLState("07006");
+ public final static PSQLState PARAMETER_ERROR = new PSQLState("07001");
+ public final static PSQLState TRANSACTION_STATE_INVALID = new PSQLState("25000");
+
+}