ModeShape Distribution 3.2.0.Final

org.modeshape.jcr.federation.spi
Class PageKey

java.lang.Object
  extended by org.modeshape.jcr.federation.spi.PageKey

public final class PageKey
extends Object

The key used to uniquely identify a page of children. A page key is formed by joining together the id of the owning document, the offset of the page and the size of the block.


Constructor Summary
PageKey(String key)
          Creates a new instance from a raw string, which is expected to contain 3 parts, each representing a piece of information
PageKey(String parentId, String offset, long blockSize)
           
 
Method Summary
 long getBlockSize()
          Returns the size of the block
 Integer getOffsetInt()
          Returns the integer representation of the offset, if the offset is convertible to an integer.
 String getOffsetString()
          Returns the offset of the block, which semantically represents a pointer to the start of the block.
 String getParentId()
          Returns the id of the document which owns the block and effectively the list of children,
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PageKey

public PageKey(String key)
Creates a new instance from a raw string, which is expected to contain 3 parts, each representing a piece of information

Parameters:
key - a non-null string
Throws:
IllegalArgumentException - if the string is not correctly formed.

PageKey

public PageKey(String parentId,
               String offset,
               long blockSize)
Method Detail

getBlockSize

public long getBlockSize()
Returns the size of the block

Returns:
a long value

getOffsetString

public String getOffsetString()
Returns the offset of the block, which semantically represents a pointer to the start of the block.

Returns:
a non-null String

getOffsetInt

public Integer getOffsetInt()
Returns the integer representation of the offset, if the offset is convertible to an integer. Otherwise, null is returned.

Returns:
the int representation of the offset, or null.

getParentId

public String getParentId()
Returns the id of the document which owns the block and effectively the list of children,

Returns:
a non-null String

toString

public String toString()
Overrides:
toString in class Object

ModeShape Distribution 3.2.0.Final

Copyright © 2008-2013 JBoss, a division of Red Hat. All Rights Reserved.