datastoreexception.java
来自「《基于Eclipse的开源框架技术与实战》[第5章]随书源码」· Java 代码 · 共 49 行
JAVA
49 行
package com.free.struts.storefront.framework.exceptions;
/**
* <p>Title: Eclipse Plugin Development</p>
* <p>Description: Free download</p>
* <p>Copyright: Copyright (c) 2006</p>
* <p>Company: Free</p>
* @author gan.shu.man
* @version 1.0
*/
public class DatastoreException extends BaseException {
/**
* Return a DatastoreException for datastoreError condition.
*
* @return The new DatastoreException object.
*/
public static DatastoreException retrieveConstraint() {
Object[] args = {};
DatastoreException datastoreException = new DatastoreException(RETRIEVE_CONSTRAINT, args);
return (datastoreException);
}
public static DatastoreException objectNotFound() {
Object[] args = {};
DatastoreException datastoreException = new DatastoreException(OBJECTNOTFOUND_ERROR, args);
return (datastoreException);
}
public static DatastoreException datastoreError( Throwable rootCause) {
Object[] args = {};
DatastoreException datastoreException = new DatastoreException(DATASTORE_ERROR, args);
datastoreException.setRootCause( rootCause );
return (datastoreException);
}
/**
* For use by subclasses of DatastoreException.
*/
protected DatastoreException(String newErrorCode,
Object[] args) {
super(newErrorCode, args);
}
public static final String RETRIEVE_CONSTRAINT = "RetrieveConstraint";
public static final String DATASTORE_ERROR = "DatastoreError";
public static final String OBJECTNOTFOUND_ERROR = "ObjectNotFound";
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?