Class AbstractRecord
- java.lang.Object
-
- org.apache.jackrabbit.core.journal.AbstractRecord
-
- All Implemented Interfaces:
Record
- Direct Known Subclasses:
AppendRecord
,ReadRecord
public abstract class AbstractRecord extends Object implements Record
Base implementation for a record.
-
-
Field Summary
Fields Modifier and Type Field Description protected NamespaceResolver
nsResolver
Namespace resolver.protected NamePathResolver
resolver
Name and Path resolver.
-
Constructor Summary
Constructors Constructor Description AbstractRecord(NamespaceResolver nsResolver, NamePathResolver resolver)
Create a new instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeId
readNodeId()
Read aNodeId
from the underlying stream.QNodeTypeDefinition
readNodeTypeDef()
Read aNodeTypeDef
from the underlying stream.Path
readPath()
Read aPath
from the underlying stream.Path
readPathElement()
Read a named path element from the underlying stream.PrivilegeDefinition
readPrivilegeDef()
Read aPrivilegeDefinition
from the underlying stream.PropertyId
readPropertyId()
Read aPropertyId
from the underlying stream.Name
readQName()
Read aName
frmo the underlying stream.void
writeNodeId(NodeId nodeId)
Write aNodeId
to the underlying stream.void
writeNodeTypeDef(QNodeTypeDefinition ntd)
Write aNodeTypeDef
to the underlying stream.void
writePath(Path path)
Write aPath
to the underlying stream.void
writePathElement(Path path)
Write aPath.Element
to the underlying stream.void
writePrivilegeDef(PrivilegeDefinition privilegeDefinition)
Write aPrivilegeDefinition
to the underlying stream.void
writePropertyId(PropertyId propertyId)
Write aPropertyId
to the underlying stream.void
writeQName(Name name)
Write aName
to the underlying stream.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.core.journal.Record
cancelUpdate, getJournalId, getProducerId, getRevision, readBoolean, readByte, readChar, readFully, readInt, readLong, readString, update, write, writeBoolean, writeByte, writeChar, writeInt, writeLong, writeString
-
-
-
-
Field Detail
-
nsResolver
protected final NamespaceResolver nsResolver
Namespace resolver.
-
resolver
protected final NamePathResolver resolver
Name and Path resolver.
-
-
Constructor Detail
-
AbstractRecord
public AbstractRecord(NamespaceResolver nsResolver, NamePathResolver resolver)
Create a new instance of this class.- Parameters:
nsResolver
- the namespace resolverresolver
- the name-path resolver
-
-
Method Detail
-
writeQName
public void writeQName(Name name) throws JournalException
Write aName
to the underlying stream.- Specified by:
writeQName
in interfaceRecord
- Parameters:
name
- name- Throws:
JournalException
- if an error occurs
-
writePathElement
public void writePathElement(Path path) throws JournalException
Write aPath.Element
to the underlying stream.- Specified by:
writePathElement
in interfaceRecord
- Parameters:
path
- path element- Throws:
JournalException
- if an error occurs
-
writePath
public void writePath(Path path) throws JournalException
Write aPath
to the underlying stream.- Specified by:
writePath
in interfaceRecord
- Parameters:
path
- path- Throws:
JournalException
- if an error occurs
-
writeNodeId
public void writeNodeId(NodeId nodeId) throws JournalException
Write aNodeId
to the underlying stream.- Specified by:
writeNodeId
in interfaceRecord
- Parameters:
nodeId
- node id- Throws:
JournalException
- if an error occurs
-
writePropertyId
public void writePropertyId(PropertyId propertyId) throws JournalException
Write aPropertyId
to the underlying stream.- Specified by:
writePropertyId
in interfaceRecord
- Parameters:
propertyId
- property id- Throws:
JournalException
- if an error occurs
-
writeNodeTypeDef
public void writeNodeTypeDef(QNodeTypeDefinition ntd) throws JournalException
Write aNodeTypeDef
to the underlying stream.- Specified by:
writeNodeTypeDef
in interfaceRecord
- Parameters:
ntd
- node type definition- Throws:
JournalException
- if an error occurs
-
writePrivilegeDef
public void writePrivilegeDef(PrivilegeDefinition privilegeDefinition) throws JournalException
Write aPrivilegeDefinition
to the underlying stream.- Specified by:
writePrivilegeDef
in interfaceRecord
- Parameters:
privilegeDefinition
- privilege definition- Throws:
JournalException
- if an error occurs
-
readQName
public Name readQName() throws JournalException
Read aName
frmo the underlying stream.- Specified by:
readQName
in interfaceRecord
- Returns:
- name name
- Throws:
JournalException
- if an error occurs
-
readPathElement
public Path readPathElement() throws JournalException
Read a named path element from the underlying stream.- Specified by:
readPathElement
in interfaceRecord
- Returns:
- path element
- Throws:
JournalException
- if an error occurs
-
readPath
public Path readPath() throws JournalException
Read aPath
from the underlying stream.- Specified by:
readPath
in interfaceRecord
- Returns:
- path
- Throws:
JournalException
- if an error occurs
-
readNodeId
public NodeId readNodeId() throws JournalException
Read aNodeId
from the underlying stream.- Specified by:
readNodeId
in interfaceRecord
- Returns:
- node id
- Throws:
JournalException
- if an error occurs
-
readPropertyId
public PropertyId readPropertyId() throws JournalException
Read aPropertyId
from the underlying stream.- Specified by:
readPropertyId
in interfaceRecord
- Returns:
- property id
- Throws:
JournalException
- if an error occurs
-
readNodeTypeDef
public QNodeTypeDefinition readNodeTypeDef() throws JournalException
Read aNodeTypeDef
from the underlying stream.- Specified by:
readNodeTypeDef
in interfaceRecord
- Returns:
- node type definition
- Throws:
JournalException
- if an error occurs
-
readPrivilegeDef
public PrivilegeDefinition readPrivilegeDef() throws JournalException
Read aPrivilegeDefinition
from the underlying stream.- Specified by:
readPrivilegeDef
in interfaceRecord
- Returns:
- privilege definition
- Throws:
JournalException
- if an error occurs
-
-