⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sqlstate.java

📁 derby database source code.good for you.
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
/*   Derby - Class org.apache.derby.iapi.reference.SQLState   Copyright 1999, 2004 The Apache Software Foundation or its licensors, as applicable.   Licensed under the Apache License, Version 2.0 (the "License");   you may not use this file except in compliance with the License.   You may obtain a copy of the License at      http://www.apache.org/licenses/LICENSE-2.0   Unless required by applicable law or agreed to in writing, software   distributed under the License is distributed on an "AS IS" BASIS,   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   See the License for the specific language governing permissions and   limitations under the License. */package org.apache.derby.iapi.reference;/**	List of error message identifiers.	This is the set of message identifiers. The message identifier	also encodes the SQLState as the first five characters.	StandardExceptions must be created using the static	StandardException.newException() method calls, passing in a	field from this class.	<BR>	The five character SQL State is obtained from a StandardException	using the zero-argument StandardException.getSQLState() method.	<BR>	The message identifier (ie. the value that matches a field in this class)	is obtained using the zero-argument StandardException.getMessageId() method.	<BR>	Thus if checking for a specific error using a field from this interface	the correct code is	<PRE>		if (se.getMessageId().equals(SQLState.DEADLOCK))	</PRE>	<BR>	A utility static method StandardException.getSQLState(String messageId)	exists to convert an field from this class into a five character SQLState.	<P>	<P>	The SQL state of an error message dictates the error's severity.	The severity is determined from the first two characters of the	state if the state is five characters long, otherwise the state	is expected to be 7 characters long and the last character determines	the state. If the state is seven characters long then only the first	five will be seen by the error reporting code and exception.	<BR>	If the state is 9 characters long, the last two characters encode	an exception category, which Synchronization uses to determine whether	the error causes REFRESH to halt or to simply skip the failed transaction.	All 5 and 7 character states default to the ENVIRONMENTAL exception	category.	<BR>	Here is the encoding of the SQL state, broken down by severity.	<UL>	<LI> <B> SYSTEM_SEVERITY </B>		xxxxx.M			<LI> <B> DATABASE_SEVERITY </B>		xxxxx.D	<LI> <B> SESSION_SEVERITY </B>	    08xxx		xxxxx.C	<LI> <B> TRANSACTION_SEVERITY </B>		40xxx or xxxxx.T	<LI> <B> STATEMENT_SEVERITY </B>		{2,3}xxxx, 42xxx,  07xxx  or xxxxx.S	<LI> <B> WARNING_SEVERITY </B>		01xxx <EM> SQL State rules require that warnings have states starting with 01</EM>	<LI> <B> NO_APPLICABLE_SEVERITY </B>		YYxxx (YY means none of the above) or xxxxx.U	<LI> <B> TRANSIENT exception category </B>		xxxxx.Y#T (Y can be any of the preceding severities)	<LI> <B> CONSISTENCY exception category </B>		xxxxx.Y#C (Y can be any of the preceding severities)	<LI> <B> ENVIRONMENTAL exception category (the default)</B>		xxxxx.Y#E (Y can be any of the preceding severities)	<LI> <B> WRAPPED exception category</B>		xxxxx.Y#W (Y can be any of the preceding severities)	</UL>	<HR>	<P>	<B>SQL State ranges</B>	<UL>	<LI>Basic Services	  <UL>	  <LI> XBCA CacheService	  <LI> XBCM ClassManager	  <LI> XBCX	Cryptography	  <LI> XBM0	Monitor	  <LI> XBDA DataComm	  <LI> XCY0 Properties	  </UL>	<LI>Connectivity	  <UL>	  <LI> 08XXX Connection Exceptions	  </UL>	<LI>Language	  <UL>		<LI> 2200J-2200R for SQL/XML errors (based on SQL/XML[2003]) </LI>		<LI> 42800-? for compatible DB2 errors		<LI> 42X00-42Zxx for compilation errors </LI>		<LI> 43X00-43Yxx  for org.apache.derby.impl.sql.execute.rts		<LI> 44X00  for all other org.apache.derby.catalog.types		<LI> 46000  for SQLJ errors (for now, leave this range empty) </LI>		<LI> 38000  SQL3 ranges  </LI>		<LI> XD00x  Dependency mgr </LI>	  <LI> 	  </UL>	<LI>Store	  <UL>	  <LI> XSCG0 Conglomerate	  <LI> XSCH0 Heap	  </UL>    <LI>Reserved for IBM Use: XQC00 - XQCZZ	</UL>*/public interface SQLState {	/*	** BasicServices	*/	/*	** Monitor	*/	String SERVICE_STARTUP_EXCEPTION			= "XBM01.D";	String SERVICE_MISSING_IMPLEMENTATION		= "XBM02.D";	String SERVICE_MISSING_SOURCE_IMPLEMENTATION= "XBM03.D";	String SERVICE_MISSING_TARGET_IMPLEMENTATION= "XBM04.D";	String MISSING_PRODUCT_VERSION				= "XBM05.D";	String SERVICE_WRONG_BOOT_PASSWORD			= "XBM06.D";	String SERVICE_BOOT_PASSWORD_TOO_SHORT		= "XBM07.D";	String MISSING_ENCRYPTION_PROVIDER			= "XBM0G.D";	String SERVICE_DIRECTORY_CREATE_ERROR		= "XBM0H.D";	String SERVICE_DIRECTORY_REMOVE_ERROR		= "XBM0I.D";	String SERVICE_DIRECTORY_EXISTS_ERROR		= "XBM0J.D";	String PROTOCOL_UNKNOWN						= "XBM0K.D";	// these were originally ModuleStartupExceptions	String AUTHENTICATION_NOT_IMPLEMENTED		= "XBM0L.D";	String AUTHENTICATION_SCHEME_ERROR			= "XBM0M.D";	String JDBC_DRIVER_REGISTER					= "XBM0N.D";	String READ_ONLY_SERVICE					= "XBM0P.D";	String UNABLE_TO_RENAME_FILE				= "XBM0S.D";	String AMBIGIOUS_PROTOCOL					= "XBM0T.D";	String REGISTERED_CLASS_NONE				= "XBM0U.S";	String REGISTERED_CLASS_LINAKGE_ERROR		= "XBM0V.S";	String REGISTERED_CLASS_INSTANCE_ERROR		= "XBM0W.S";	String INVALID_LOCALE_DESCRIPTION			= "XBM0X.D";	String SERVICE_DIRECTORY_NOT_IN_BACKUP      = "XBM0Y.D";	String UNABLE_TO_COPY_FILE_FROM_BACKUP      = "XBM0Z.D";	String PROPERTY_FILE_NOT_FOUND_IN_BACKUP    = "XBM0Q.D";	String UNABLE_TO_DELETE_FILE                = "XBM0R.D";    String INSTANTIATE_STORAGE_FACTORY_ERROR    = "XBM08.D";	/*	** Upgrade	*/	String UPGRADE_UNSUPPORTED				= "XCW00.D";	// Note: UPGRADE_SPSRECOMPILEFAILED is now in the warnings section.		/*	** ContextService	*/	String CONN_INTERRUPT					= "08000";	/*	** ClassManager	*/	String GENERATED_CLASS_LINKAGE_ERROR	= "XBCM1.S";	String GENERATED_CLASS_INSTANCE_ERROR	= "XBCM2.S";	String GENERATED_CLASS_NO_SUCH_METHOD	= "XBCM3.S";	/*	** Cryptography	*/	String CRYPTO_EXCEPTION				= "XBCX0.S";	String ILLEGAL_CIPHER_MODE			= "XBCX1.S";	String ILLEGAL_BP_LENGTH			= "XBCX2.S";	String NULL_BOOT_PASSWORD			= "XBCX5.S";	String NON_STRING_BP				= "XBCX6.S";	String WRONG_PASSWORD_CHANGE_FORMAT = "XBCX7.S";	String DATABASE_NOT_ENCRYPTED		= "XBCX8.S";	String DATABASE_READ_ONLY			= "XBCX9.S";	String WRONG_BOOT_PASSWORD			= "XBCXA.S";    String ENCRYPTION_BAD_PADDING       = "XBCXB.S";    String ENCRYPTION_NOSUCH_ALGORITHM  = "XBCXC.S";    String ENCRYPTION_NOCHANGE_ALGORITHM     = "XBCXD.S";    String ENCRYPTION_NOCHANGE_PROVIDER = "XBCXE.S";    String ENCRYPTION_NO_PROVIDER_CLASS = "XBCXF.S";    String ENCRYPTION_BAD_PROVIDER      = "XBCXG.S";    String ENCRYPTION_BAD_ALG_FORMAT    = "XBCXH.S";    String ENCRYPTION_BAD_FEEDBACKMODE  = "XBCXI.S";    String ENCRYPTION_BAD_JCE           = "XBCXJ.S";    String ENCRYPTION_BAD_EXTERNAL_KEY  = "XBCXK.S";    String ENCRYPTION_UNABLE_KEY_VERIFICATION  = "XBCXL.S";    String ENCRYPTION_INVALID_EXKEY_LENGTH          = "XBCXM.S";    String ENCRYPTION_ILLEGAL_EXKEY_CHARS           = "XBCXN.S";        	/*	** Cache Service	*/	String OBJECT_EXISTS_IN_CACHE		= "XBCA0.S";	String CACHE_FULL					= "XBCA3.S";	/*	** Properties	*/	String PROPERTY_INVALID_VALUE		= "XCY00.S";	String PROPERTY_UNSUPPORTED_CHANGE  = "XCY02.S";	String PROPERTY_MISSING				= "XCY03.S";	/*	** LockManager	*/	String DEADLOCK = "40001";	String LOCK_TIMEOUT = "40XL1";    String LOCK_TIMEOUT_LOG = "40XL2";	/*	** Store - access.protocol.Interface statement exceptions	*/	String STORE_CONGLOMERATE_DOES_NOT_EXIST                    = "XSAI2.S";	String STORE_FEATURE_NOT_IMPLEMENTED                        = "XSAI3.S";	/*	** Store - access.protocol.Interface RunTimeStatistics property names	** and values.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -