public class PrintAllObjectsOperation extends AbstractOperation
AbstractOperation.OperationConstructor, AbstractOperation.OperationName
suppData, uuidOperationComparator
Constructor and Description |
---|
PrintAllObjectsOperation(boolean printJustIDs,
java.lang.String outputFileName)
Creates a new instance of PrintAllObjectsOperation.
|
Modifier and Type | Method and Description |
---|---|
void |
endOperation()
End operation successfully.
|
void |
endOperation(ErrorCode errValue)
End operation with a specific error code.
|
java.lang.Object |
getArgument(int index)
Returns argument that was passed while constructing instance.
|
int |
getArgumentCount()
Returns number of arguments that were passed while constructing this instance.
|
void |
print(AbstractObject object)
Print give object (or just its ID) to specified file output.
|
int |
printAll(java.util.Iterator<? extends AbstractObject> objects)
Prints all given objects to the specified file output.
|
boolean |
wasSuccessful()
Returns true if this operation has finished successfuly.
|
appendArguments, appendErrorCode, clearSurplusData, clone, containsParameter, createOperation, equals, getAnnotatedConstructor, getAnnotatedConstructor, getArgumentString, getConstructorArgumentDescriptions, getConstructorArgumentDescriptions, getConstructorArguments, getConstructorArguments, getConstructorDescription, getErrorCode, getName, getName, getOperationID, getParameter, getParameter, getParameter, getParameterCount, getParameterMap, getParameterNames, getRequiredParameter, getRequiredParameter, hashCode, isErrorCode, isFinished, removeParameter, setParameter, toString, updateFrom
public PrintAllObjectsOperation(boolean printJustIDs, java.lang.String outputFileName) throws java.lang.IllegalArgumentException
printJustIDs
- if true, just line separated object IDs are printedoutputFileName
- name of text file to print the objects to; if ends with ".gz", the data is compressedjava.lang.IllegalArgumentException
public java.lang.Object getArgument(int index) throws java.lang.IndexOutOfBoundsException
getArgument
in class AbstractOperation
index
- index of an argument passed to constructorjava.lang.IndexOutOfBoundsException
- if index parameter is out of rangepublic int getArgumentCount()
getArgumentCount
in class AbstractOperation
public void print(AbstractObject object) throws java.io.IOException
object
- object to printjava.io.IOException
- if the write operation failspublic int printAll(java.util.Iterator<? extends AbstractObject> objects) throws java.io.IOException
objects
- the collection of objects on which to evaluate this queryjava.io.IOException
- if the write operation failspublic boolean wasSuccessful()
AbstractOperation
wasSuccessful
in class AbstractOperation
public void endOperation()
AbstractOperation
endOperation
in class AbstractOperation
public void endOperation(ErrorCode errValue) throws java.lang.IllegalArgumentException
AbstractOperation
endOperation
in class AbstractOperation
errValue
- the error code to setjava.lang.IllegalArgumentException
- if the specified error value is null or ErrorCode.NOT_SET