org.apache.jackrabbit.spi.commons.batch
Class AbstractChangeLog<T extends Operation>

java.lang.Object
  extended by org.apache.jackrabbit.spi.commons.batch.AbstractChangeLog<T>
Type Parameters:
T -
All Implemented Interfaces:
Batch, ChangeLog
Direct Known Subclasses:
ChangeLogImpl, ConsolidatingChangeLog

public abstract class AbstractChangeLog<T extends Operation>
extends Object
implements ChangeLog

This base class for ChangeLog implementations maintains a list of operations of type type T.


Field Summary
protected  List<T> operations
          Operations kept in this change log.
 
Constructor Summary
AbstractChangeLog()
           
 
Method Summary
 void addOperation(T op)
          Added an operation to the list of operations.
 Batch apply(Batch batch)
          This implementation applies each of the operation maintained by this change log to the passed batch.
 boolean equals(AbstractChangeLog<?> other)
           
 boolean equals(Object other)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.jackrabbit.spi.Batch
addNode, addProperty, addProperty, move, remove, reorderNodes, setMixins, setPrimaryType, setValue, setValue
 

Field Detail

operations

protected final List<T extends Operation> operations
Operations kept in this change log.

Constructor Detail

AbstractChangeLog

public AbstractChangeLog()
Method Detail

addOperation

public void addOperation(T op)
                  throws RepositoryException
Added an operation to the list of operations.

Parameters:
op - Operation to add
Throws:
RepositoryException

apply

public Batch apply(Batch batch)
            throws RepositoryException
This implementation applies each of the operation maintained by this change log to the passed batch. Applies the Operations contained in this change log to the passed batch.

Specified by:
apply in interface ChangeLog
Returns:
The batch passed in as argument with the operations from this change log applied.
Throws:
RepositoryException

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

equals

public boolean equals(AbstractChangeLog<?> other)

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.