Initial commit from SVN.
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
package com.foundation.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import com.common.io.IObjectInputStream;
|
||||
import com.common.io.IObjectOutputStream;
|
||||
|
||||
/**
|
||||
* A reflection operation result indicating a failure of the model to match the constraint requirements.
|
||||
*/
|
||||
public class ReflectionConstraintError extends ReflectionResult {
|
||||
/** The repository or application defined constraint identifier. */
|
||||
private String constraint = null;
|
||||
/**
|
||||
* ReflectionConstraintError constructor.
|
||||
*/
|
||||
public ReflectionConstraintError() {
|
||||
}//ReflectionConstraintError()//
|
||||
/**
|
||||
* ReflectionConstraintError constructor.
|
||||
* @param constraint The repository or application defined constraint identifier.
|
||||
*/
|
||||
public ReflectionConstraintError(String constraint) {
|
||||
this.constraint = constraint;
|
||||
}//ReflectionConstraintError()//
|
||||
/* (non-Javadoc)
|
||||
* @see com.foundation.controller.ReflectionResult#getResultType()
|
||||
*/
|
||||
public int getResultType() {
|
||||
return RESULT_TYPE_CONSTRAINT_ERROR;
|
||||
}//getResultType()//
|
||||
/**
|
||||
* Gets the constraint identifier useable by the application to re-attempt the synchronization or warn the user.
|
||||
* @return The repository or application defined constraint identifier.
|
||||
*/
|
||||
public String getConstraint() {
|
||||
return constraint;
|
||||
}//getConstraint()//
|
||||
/* (non-Javadoc)
|
||||
* @see com.common.io.IExternalizable#readExternal(com.common.io.IObjectInputStream)
|
||||
*/
|
||||
public Object readExternal(IObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||
constraint = in.readUTF8();
|
||||
return null;
|
||||
}//readExternal()//
|
||||
/* (non-Javadoc)
|
||||
* @see com.common.io.IExternalizable#writeExternal(com.common.io.IObjectOutputStream)
|
||||
*/
|
||||
public void writeExternal(IObjectOutputStream out) throws IOException {
|
||||
out.writeUTF8(constraint);
|
||||
}//writeExternal()//
|
||||
}//ReflectionConstraintError//
|
||||
Reference in New Issue
Block a user