org.sirix.node.AbstractForwardingNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sirix-core Show documentation
Show all versions of sirix-core Show documentation
SirixDB is a hybrid on-disk and in-memory document oriented, versioned database system. It has a lightweight buffer manager, stores everything in a huge persistent and durable tree and allows efficient reconstruction of every revision. Furthermore, SirixDB implements change tracking, diffing and supports time travel queries.
package org.sirix.node;
import com.google.common.collect.ForwardingObject;
import org.sirix.node.delegates.NodeDelegate;
import org.sirix.node.interfaces.Node;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.math.BigInteger;
/**
* Skeletal implementation of {@link Node} interface.
*
* @author Johannes Lichtenberger, University of Konstanz
*
*/
public abstract class AbstractForwardingNode extends ForwardingObject implements Node {
/** Constructor for use by subclasses. */
protected AbstractForwardingNode() {}
@Override
protected abstract NodeDelegate delegate();
@Override
public SirixDeweyID getDeweyID() {
return delegate().getDeweyID();
}
/**
* Get a snapshot of the node delegate.
*
* @return new {@link NodeDelegate} instance (snapshot of the current one)
*/
@NonNull
public NodeDelegate getNodeDelegate() {
return delegate();
}
@Override
public BigInteger computeHash() {
return delegate().computeHash();
}
@Override
public void setTypeKey(final int typeKey) {
delegate().setTypeKey(typeKey);
}
@Override
public boolean hasParent() {
return delegate().hasParent();
}
@Override
public long getNodeKey() {
return delegate().getNodeKey();
}
@Override
public long getParentKey() {
return delegate().getParentKey();
}
@Override
public void setParentKey(final long parentKey) {
delegate().setParentKey(parentKey);
}
@Override
public BigInteger getHash() {
return delegate().getHash();
}
@Override
public void setHash(final BigInteger hash) {
delegate().setHash(hash);
}
@Override
public long getRevision() {
return delegate().getRevision();
}
@Override
public String toString() {
return delegate().toString();
}
@Override
public boolean isSameItem(final @Nullable Node other) {
return delegate().isSameItem(other);
}
@Override
public void setDeweyID(SirixDeweyID id) {
delegate().setDeweyID(id);
}
@Override
public byte[] getDeweyIDAsBytes() {
return delegate().getDeweyIDAsBytes();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy