TreePointer

class TreePointer(tree_: ITree, val idGenerator: IIdGenerator = IdGeneratorDummy()) : IBranch, IWriteTransaction, IReadTransaction

A non thread safe branch without real transactions. Provides better performance for temporary branches that are not shared.

Constructors

Link copied to clipboard
constructor(tree_: ITree, idGenerator: IIdGenerator = IdGeneratorDummy())

Properties

Link copied to clipboard
open override val branch: IBranch
Link copied to clipboard
Link copied to clipboard

Read transaction for this branch.

Link copied to clipboard
open override val transaction: ITransaction

Transaction for this branch.

Link copied to clipboard
open override var tree: ITree
Link copied to clipboard

Write transaction for this branch.

Functions

Link copied to clipboard
open override fun addListener(l: IBranchListener)

Adds the given branch listener to this branch.

Link copied to clipboard
open override fun addNewChild(parentId: Long, role: String?, index: Int, concept: IConcept?): Long
open override fun addNewChild(parentId: Long, role: String?, index: Int, concept: IConceptReference?): Long
open override fun addNewChild(parentId: Long, role: String?, index: Int, childId: Long, concept: IConcept?)
open override fun addNewChild(parentId: Long, role: String?, index: Int, childId: Long, concept: IConceptReference?)

Creates and adds a new child of the given concept to the tree of this transaction.

Link copied to clipboard
open override fun addNewChildren(parentId: Long, role: String?, index: Int, concepts: Array<IConceptReference?>): LongArray
open override fun addNewChildren(parentId: Long, role: String?, index: Int, childIds: LongArray, concepts: Array<IConceptReference?>)
Link copied to clipboard
open override fun canRead(): Boolean

Checks if read operations can be performed on this branch.

Link copied to clipboard
open override fun canWrite(): Boolean

Checks if write operations can be performed on this branch.

Link copied to clipboard
open override fun <T> computeRead(computable: () -> T): T

Performs a computable read operation, which returns a value, on this branch.

Link copied to clipboard
open fun <T> computeReadT(computable: (IReadTransaction) -> T): T

Performs a computable read operation, which returns a value, in a read transaction on this branch.

Link copied to clipboard
open override fun <T> computeWrite(computable: () -> T): T

Performs a computable write operation, which returns a value, on this branch.

Link copied to clipboard
open fun <T> computeWriteT(computable: (IWriteTransaction) -> T): T

Performs a computable write operation, which returns a value, in a write transaction on this branch.

Link copied to clipboard
open override fun containsNode(nodeId: Long): Boolean

Checks if the given node is contained in the tree of this transaction.

Link copied to clipboard

Recursively unwraps a branch.

Link copied to clipboard
open override fun deleteNode(nodeId: Long)

Deletes the given node.

Link copied to clipboard
open override fun getAllChildren(parentId: Long): Iterable<Long>

Returns all children of the given node in the tree of this transaction.

Link copied to clipboard
Link copied to clipboard
open override fun getChildren(parentId: Long, role: String?): Iterable<Long>

Returns the children of the child link for the given node in the tree of this transaction

Link copied to clipboard
open override fun getConcept(nodeId: Long): IConcept?

Returns the concept of the given node in the tree of this transaction.

Link copied to clipboard
open override fun getConceptReference(nodeId: Long): IConceptReference?

Returns a reference to the concept of the given node in the tree of this transaction.

Link copied to clipboard
open override fun getId(): String

Returns the id of this branch.

Link copied to clipboard
Link copied to clipboard
open override fun getParent(nodeId: Long): Long

Returns the id of the parent node of the given node in the tree of this transaction.

Link copied to clipboard
open override fun getProperty(nodeId: Long, role: String): String?

Returns the property value of the given property role for the given node in the tree of this transaction.

Link copied to clipboard
open override fun getPropertyRoles(sourceId: Long): Iterable<String>

Returns all property roles for the given node in the tree of this transaction.

Link copied to clipboard
open override fun getReferenceRoles(sourceId: Long): Iterable<String>

Returns all reference roles for the given node in the tree of this transaction.

Link copied to clipboard
open override fun getReferenceTarget(sourceId: Long, role: String): INodeReference?

Returns the target of the given reference role for the given node in the tree of this transaction.

Link copied to clipboard
open override fun getRole(nodeId: Long): String?

Returns the role of the given node within its parent node in the tree of this transaction.

Link copied to clipboard
Link copied to clipboard
open override fun getUserObject(key: Any): Any?

Returns the user object with the given key.

Link copied to clipboard
open override fun moveChild(newParentId: Long, newRole: String?, newIndex: Int, childId: Long)

Moves a node within the tree of this transaction.

Link copied to clipboard
open override fun putUserObject(key: Any, value: Any?)

Stores a user object by using the specified key.

Link copied to clipboard
open override fun removeListener(l: IBranchListener)

Removes the given branch listener from this branch.

Link copied to clipboard
open override fun runRead(runnable: () -> Unit)

Performs a read operation on this branch.

Link copied to clipboard
open fun runReadT(f: (IReadTransaction) -> Unit)

Performs a function in a read transaction on this branch.

Link copied to clipboard
open override fun runWrite(runnable: () -> Unit)

Performs a write operation on this branch.

Link copied to clipboard
open fun runWriteT(f: (IWriteTransaction) -> Unit)

Performs a function in a write transaction on this branch.

Link copied to clipboard
open override fun setConcept(nodeId: Long, concept: IConceptReference?)

Sets the concept of the node identified by the given id.

Link copied to clipboard
open override fun setProperty(nodeId: Long, role: String, value: String?)

Sets the value of the given node for the given property role to the specified value.

Link copied to clipboard
open override fun setReferenceTarget(sourceId: Long, role: String, target: INodeReference?)

Sets the reference target of the given node for the given reference role to the specified target.