WriteTransaction

class WriteTransaction(_tree: ITree, val branch: IBranch, idGenerator: IIdGenerator) : Transaction, IWriteTransaction

Constructors

Link copied to clipboard
constructor(_tree: ITree, branch: IBranch, idGenerator: IIdGenerator)

Properties

Link copied to clipboard
open override val branch: IBranch
Link copied to clipboard
open override var tree: ITree

Functions

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
fun close()
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
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
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 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
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 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.