public class BulkInsertOperation extends DataManipulationOperation
abstract objects
that are going to be inserted into an index structure.AbstractOperation.OperationConstructor, AbstractOperation.OperationName
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
INSERTED_OBJECTS_PARAM
Name of a parameter that is used to store list of objects stored by previous processing of this operation
|
suppData, uuidOperationComparator
Modifier | Constructor and Description |
---|---|
|
BulkInsertOperation(java.util.Collection<? extends LocalAbstractObject> insertedObjects)
Creates a new instance of BulkInsertOperation.
|
|
BulkInsertOperation(java.util.Collection<? extends LocalAbstractObject> insertedObjects,
boolean permitEmpty)
Creates a new instance of BulkInsertOperation.
|
|
BulkInsertOperation(java.util.Iterator<? extends LocalAbstractObject> insertedObjects)
Creates a new instance of BulkInsertOperation from all objects provided by the iterator.
|
|
BulkInsertOperation(java.util.Iterator<? extends LocalAbstractObject> objectsIterator,
int count)
Creates a new instance of BulkInsertOperation.
|
|
BulkInsertOperation(java.util.Iterator<? extends LocalAbstractObject> objectsIterator,
int count,
boolean permitEmpty)
Creates a new instance of BulkInsertOperation.
|
protected |
BulkInsertOperation(java.util.List<? extends LocalAbstractObject> insertedObjects,
boolean permitEmpty)
Creates a new instance of BulkInsertOperation.
|
Modifier and Type | Method and Description |
---|---|
void |
clearSurplusData()
Clear non-messif data stored in operation.
|
BulkInsertOperation |
clone()
Create a duplicate of this operation.
|
void |
endOperation()
End operation successfully.
|
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.
|
java.util.List<? extends LocalAbstractObject> |
getInsertedObjects()
Returns the list of objects to insert.
|
int |
getNumberInsertedObjects()
Return the number of objects to be inserted by this bulk insert operation.
|
java.lang.String |
toString()
Returns a string representation of this operation.
|
boolean |
wasSuccessful()
Returns true if this operation has finished successfuly.
|
appendArguments, appendErrorCode, containsParameter, createOperation, endOperation, 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, updateFrom
public static final java.lang.String INSERTED_OBJECTS_PARAM
protected BulkInsertOperation(java.util.List<? extends LocalAbstractObject> insertedObjects, boolean permitEmpty) throws java.util.NoSuchElementException
insertedObjects
- a list of objects to be inserted by this operationpermitEmpty
- flag whether the empty list of objects to insert is permitted
(true) or a NoSuchElementException
is thrown (false)java.util.NoSuchElementException
- if the inserted objects list is emptypublic BulkInsertOperation(java.util.Collection<? extends LocalAbstractObject> insertedObjects) throws java.util.NoSuchElementException
insertedObjects
- a list of objects to be inserted by this operationjava.util.NoSuchElementException
- if the inserted objects list is emptypublic BulkInsertOperation(java.util.Collection<? extends LocalAbstractObject> insertedObjects, boolean permitEmpty) throws java.util.NoSuchElementException
insertedObjects
- a list of objects to be inserted by this operationpermitEmpty
- flag whether the empty list of objects to insert is permitted
(true) or a NoSuchElementException
is thrown (false)java.util.NoSuchElementException
- if the inserted objects list is emptypublic BulkInsertOperation(java.util.Iterator<? extends LocalAbstractObject> insertedObjects) throws java.util.NoSuchElementException
insertedObjects
- a list of objects to be inserted by this operationjava.util.NoSuchElementException
- if the inserted objects list is emptypublic BulkInsertOperation(java.util.Iterator<? extends LocalAbstractObject> objectsIterator, int count) throws java.util.NoSuchElementException
objectsIterator
- an iterator from which to get the list of objects to be insertedcount
- the number of objects to read from the iteratorjava.util.NoSuchElementException
- if the inserted objects list is emptypublic BulkInsertOperation(java.util.Iterator<? extends LocalAbstractObject> objectsIterator, int count, boolean permitEmpty) throws java.util.NoSuchElementException
objectsIterator
- an iterator from which to get the list of objects to be insertedcount
- the number of objects to read from the iteratorpermitEmpty
- flag whether the empty list of objects to insert is permitted
(true) or a NoSuchElementException
is thrown (false)java.util.NoSuchElementException
- if the inserted objects list is emptypublic java.util.List<? extends LocalAbstractObject> getInsertedObjects()
public int getNumberInsertedObjects()
public java.lang.Object getArgument(int index) throws java.lang.IndexOutOfBoundsException
AbstractOperation
getArgument
in class AbstractOperation
index
- zero-based index of an argument passed to constructorjava.lang.IndexOutOfBoundsException
- if index parameter is out of rangepublic int getArgumentCount()
AbstractOperation
getArgumentCount
in class AbstractOperation
public boolean wasSuccessful()
AbstractOperation
wasSuccessful
in class AbstractOperation
public void endOperation()
AbstractOperation
endOperation
in class AbstractOperation
public java.lang.String toString()
AbstractOperation
toString
in class AbstractOperation
public void clearSurplusData()
AbstractOperation
parameters
that are Clearable
are cleared
and the other non-primitive
parameters are removed from the parameters.clearSurplusData
in interface Clearable
clearSurplusData
in class AbstractOperation
public BulkInsertOperation clone() throws java.lang.CloneNotSupportedException
AbstractOperation
AbstractOperation.suppData
) is not cloned (but the reference is kept).
Note also that the answer of the query operations is not cloned but
a new collection is created.
The additional parameters are cloned - the map, not the values of the parameters.clone
in class AbstractOperation
java.lang.CloneNotSupportedException
- if the operation instance cannot be cloned