org.basex.query.up.primitives
Class Put

java.lang.Object
  extended by org.basex.query.up.primitives.UpdatePrimitive
      extended by org.basex.query.up.primitives.Put

public final class Put
extends UpdatePrimitive

Put primitive.

Author:
Workgroup DBIS, University of Konstanz 2005-10, ISC License, Lukas Kircher

Field Summary
 
Fields inherited from class org.basex.query.up.primitives.UpdatePrimitive
node
 
Constructor Summary
Put(Nod n, Uri uri)
          Constructor.
 
Method Summary
 void apply(int add)
          Applies the update operation represented by this primitive to the database.
 byte[] path()
          Returns uri as string.
 String toString()
           
 PrimitiveType type()
          Returns the type of the update primitive.
 
Methods inherited from class org.basex.query.up.primitives.UpdatePrimitive
buildDB, merge, mergeTexts, prepare, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Put

public Put(Nod n,
           Uri uri)
Constructor.

Parameters:
n - node to put
uri - location uri
Method Detail

apply

public void apply(int add)
           throws QueryException
Description copied from class: UpdatePrimitive
Applies the update operation represented by this primitive to the database. If an 'insert before' primitive is applied to a target node t, the pre value of t changes. Thus the number of inserted nodes is added to the pre value of t for all following update operations.

Specified by:
apply in class UpdatePrimitive
Parameters:
add - size to add
Throws:
QueryException - query exception

path

public byte[] path()
Returns uri as string.

Returns:
string uri

type

public PrimitiveType type()
Description copied from class: UpdatePrimitive
Returns the type of the update primitive.

Specified by:
type in class UpdatePrimitive
Returns:
type

toString

public String toString()
Overrides:
toString in class Object