54 lines
1.8 KiB
Java
54 lines
1.8 KiB
Java
package com.foundation.controller;
|
|
|
|
import java.io.IOException;
|
|
|
|
import com.common.io.IObjectInputStream;
|
|
import com.common.io.IObjectOutputStream;
|
|
import com.foundation.common.IEntity;
|
|
import com.foundation.transaction.Transaction;
|
|
|
|
/**
|
|
* A reflection operation result indicating a problem in the model preparation or versioning system.
|
|
*/
|
|
public class ReflectionModelError extends ReflectionResult {
|
|
/** The model error code identifier (IEntity.MODEL_ERROR_xxx). */
|
|
private int modelErrorCode = IEntity.MODEL_ERROR_NONE;
|
|
/**
|
|
* ReflectionModelError constructor.
|
|
*/
|
|
public ReflectionModelError() {
|
|
}//ReflectionModelError()//
|
|
/**
|
|
* ReflectionModelError constructor.
|
|
* @param modelErrorCode The model error code identifier (IEntity.MODEL_ERROR_xxx).
|
|
*/
|
|
public ReflectionModelError(int modelErrorCode) {
|
|
this.modelErrorCode = modelErrorCode;
|
|
}//ReflectionModelError()//
|
|
/**
|
|
* Gets the model synchronization error code detailing the problem.
|
|
* @return The model error code identifier (IEntity.MODEL_ERROR_xxx).
|
|
*/
|
|
public int getModelErrorCode() {
|
|
return modelErrorCode;
|
|
}//getModelErrorCode()//
|
|
/* (non-Javadoc)
|
|
* @see com.foundation.controller.ReflectionResult#getResultType()
|
|
*/
|
|
public int getResultType() {
|
|
return RESULT_TYPE_MODEL_ERROR;
|
|
}//getResultType()//
|
|
/* (non-Javadoc)
|
|
* @see com.common.io.IExternalizable#readExternal(com.common.io.IObjectInputStream)
|
|
*/
|
|
public Object readExternal(IObjectInputStream in) throws IOException, ClassNotFoundException {
|
|
modelErrorCode = 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(modelErrorCode);
|
|
}//writeExternal()//
|
|
}//ReflectionModelError// |