Initial commit from SVN.
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
package com.foundation.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import com.common.io.IObjectInputStream;
|
||||
import com.common.io.IObjectOutputStream;
|
||||
import com.foundation.transaction.Transaction;
|
||||
|
||||
/**
|
||||
* A reflection operation result indicating a problem in the transactional system (not including detected constraint errors).
|
||||
*/
|
||||
public class ReflectionTransactionError extends ReflectionResult {
|
||||
/** The transaction error code identifier (Transaction.ERROR_xxx). */
|
||||
private int transactionErrorCode = Transaction.ERROR_NONE;
|
||||
/**
|
||||
* ReflectionTransactionError constructor.
|
||||
*/
|
||||
public ReflectionTransactionError() {
|
||||
}//ReflectionTransactionError()//
|
||||
/**
|
||||
* ReflectionTransactionError constructor.
|
||||
* @param transactionErrorCode The transaction error code identifier (Transaction.ERROR_xxx).
|
||||
*/
|
||||
public ReflectionTransactionError(int transactionErrorCode) {
|
||||
this.transactionErrorCode = transactionErrorCode;
|
||||
}//ReflectionTransactionError()//
|
||||
/**
|
||||
* Gets the transaction system error code detailing the problem.
|
||||
* @return The transaction error code identifier (Transaction.ERROR_xxx).
|
||||
*/
|
||||
public int getTransactionErrorCode() {
|
||||
return transactionErrorCode;
|
||||
}//getTransactionErrorCode()//
|
||||
/* (non-Javadoc)
|
||||
* @see com.foundation.controller.ReflectionResult#getResultType()
|
||||
*/
|
||||
public int getResultType() {
|
||||
return RESULT_TYPE_TRANSACTIONAL_ERROR;
|
||||
}//getResultType()//
|
||||
/* (non-Javadoc)
|
||||
* @see com.common.io.IExternalizable#readExternal(com.common.io.IObjectInputStream)
|
||||
*/
|
||||
public Object readExternal(IObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||
transactionErrorCode = in.readInt();
|
||||
return null;
|
||||
}//readExternal()//
|
||||
/* (non-Javadoc)
|
||||
* @see com.common.io.IExternalizable#writeExternal(com.common.io.IObjectOutputStream)
|
||||
*/
|
||||
public void writeExternal(IObjectOutputStream out) throws IOException {
|
||||
out.writeInt(transactionErrorCode);
|
||||
}//writeExternal()//
|
||||
}//ReflectionTransactionError//
|
||||
Reference in New Issue
Block a user