edu.wpi.cs.dsrg.xmldb.xat.common.operator.updateoperator
Class InsertImp

java.lang.Object
  |
  +--edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATPropertiesImp
        |
        +--edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObjectImp
              |
              +--edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATOperatorImp
                    |
                    +--edu.wpi.cs.dsrg.xmldb.xat.common.operator.updateoperator.UpdateOperatorImp
                          |
                          +--edu.wpi.cs.dsrg.xmldb.xat.common.operator.updateoperator.InsertImp

public class InsertImp
extends UpdateOperatorImp
implements Insert

Implementation for the Insert interface.

Since:
1.0
See Also:
Serialized Form

Field Summary
protected  java.lang.String[] funcArgs
          vector containing the arguments of the function
protected  int OrderPredicate
          indication of the order ..
protected  java.lang.String PCDATAContent
          PCDATAcontent to for inserting into mixed type elements
protected  java.lang.String relativeVariable
          relativeVariable is the other variable in ordered INSERT as in INSERT $x BEFORE/AFTER $y(relative variable)
protected  int updateFunction
          integer indicating update function name (new_attribute() OR new_ref() )
 
Fields inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.updateoperator.UpdateOperatorImp
context, variable
 
Fields inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATOperatorImp
columnsFiltered, outputColumnName, xnodOwner, xtabOutput
 
Fields inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObjectImp
stats, statsPresent
 
Fields inherited from interface edu.wpi.cs.dsrg.xmldb.xat.common.operator.updateoperator.Insert
AFTER, BEFORE, NEW_ATTRIBUTE, NEW_REF, UNKNOWN
 
Constructor Summary
InsertImp(XATNode xnodInit)
          Assigns a node to this operator .
InsertImp(XATNode xnodInit, java.lang.String contextInit)
          INSERT In such case on context will be set and the contents will be retrieved from the right child of the insert node
InsertImp(XATNode xnodInit, java.lang.String contextInit, int updateFunctionInit, java.lang.String[] params)
          INSERT new_attribute()/new_ref()
InsertImp(XATNode xnodInit, java.lang.String contextInit, java.lang.String variableInit)
          INSERT $x
InsertImp(XATNode xnodInit, java.lang.String contextInit, java.lang.String relativeVariableInit, int order)
          INSERT BEFORE/AFTER $y
InsertImp(XATNode xnodInit, java.lang.String contextInit, java.lang.String variableInit, java.lang.String relativeVariableInit, int order)
          INSERT $x BEFORE/AFTER $y
 
Method Summary
 java.lang.String[] getFuncArgs()
          Gets the function arguments
 int getOrderPredicate()
          Gets the order predicate within the operator
 java.lang.String getPCDATAContent()
          Gets the PCDATA content of the operator
 java.lang.String getRelativeVariable()
          Gets the relative Variable in the insert statement.
 XATTable getRight()
          Gets the right (secondary) data source
 int getUpdateFunction()
          Gets the value of updateFunction.
 void setFuncArgs(java.lang.String[] funArgs)
          Sets the function arguments value.
 void setOrderPredicate(int newOrder)
          Sets the order predicate of the query (BEFORE/AFTER)
 void setPCDATAContent(java.lang.String pcdata)
          Sets the PCDATA content to be inserted
 void setRelativeVariable(java.lang.String relVar)
          Sets the relative Variable in the insert statement
 void setUpdateFunction(int updateFunc)
          Sets the updateFunction to value that represents type of update Function.
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.updateoperator.UpdateOperatorImp
getContext, getVariable, setContext, setVariable
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATOperatorImp
clone, getColumnsFiltered, getNode, getOutput, getOutputColumnName, getOutputDataSource, getOutputDataSources, getPrimaryDataSource, getPrimarySource, setDefaultProperties, setNode, setOutput, setOutputColumnName, setProperty, toString
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObjectImp
addStatistic, compareTo, getStatistics, isValidStatistic, setDefaultStatistics
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATPropertiesImp
addProperty, getProperties, getProperty, isValidPropertyName, setNewPropertyValue
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

relativeVariable

protected java.lang.String relativeVariable
relativeVariable is the other variable in ordered INSERT as in INSERT $x BEFORE/AFTER $y(relative variable)

PCDATAContent

protected java.lang.String PCDATAContent
PCDATAcontent to for inserting into mixed type elements

OrderPredicate

protected int OrderPredicate
indication of the order .. BEFORE/AFTER

updateFunction

protected int updateFunction
integer indicating update function name (new_attribute() OR new_ref() )

funcArgs

protected java.lang.String[] funcArgs
vector containing the arguments of the function
Constructor Detail

InsertImp

public InsertImp(XATNode xnodInit)
Assigns a node to this operator .
Parameters:
XATNode - edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.XATNode
Since:
1.0

InsertImp

public InsertImp(XATNode xnodInit,
                 java.lang.String contextInit)
INSERT In such case on context will be set and the contents will be retrieved from the right child of the insert node
Parameters:
xnodInit - edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.XATNode
contextInit - is the context
Since:
1.0

InsertImp

public InsertImp(XATNode xnodInit,
                 java.lang.String contextInit,
                 java.lang.String relativeVariableInit,
                 int order)
INSERT BEFORE/AFTER $y
Parameters:
xnodInit - edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.XATNode
contextInit - is the context
relativeVariableInit - String
order - int
Since:
1.0

InsertImp

public InsertImp(XATNode xnodInit,
                 java.lang.String contextInit,
                 java.lang.String variableInit)
INSERT $x
Parameters:
xnodInit - edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.XATNode
contextInit - is the context
relativeVariableInit - String
order - int
Since:
1.0

InsertImp

public InsertImp(XATNode xnodInit,
                 java.lang.String contextInit,
                 java.lang.String variableInit,
                 java.lang.String relativeVariableInit,
                 int order)
INSERT $x BEFORE/AFTER $y
Parameters:
xnodInit - edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.XATNode
contextInit - is the context
relativeVariableInit - String
order - int
Since:
1.0

InsertImp

public InsertImp(XATNode xnodInit,
                 java.lang.String contextInit,
                 int updateFunctionInit,
                 java.lang.String[] params)
INSERT new_attribute()/new_ref()
Parameters:
xnodInit - edu.wpi.cs.dsrg.xmldb.xat.common.xatnode.XATNode
contextInit - is the context
relativeVariableInit - String
order - int
Since:
1.0
Method Detail

getOrderPredicate

public int getOrderPredicate()
Gets the order predicate within the operator
Specified by:
getOrderPredicate in interface Insert
Returns:
int
Since:
1.0

getPCDATAContent

public java.lang.String getPCDATAContent()
Gets the PCDATA content of the operator
Specified by:
getPCDATAContent in interface Insert
Returns:
int
Since:
1.0

getRight

public XATTable getRight()
                  throws XATNodeDoesNotExistException
Gets the right (secondary) data source
Specified by:
getRight in interface Insert
Returns:
int
Since:
1.0

getRelativeVariable

public java.lang.String getRelativeVariable()
Gets the relative Variable in the insert statement.
Specified by:
getRelativeVariable in interface Insert
Returns:
int
Since:
1.0

getUpdateFunction

public int getUpdateFunction()
Gets the value of updateFunction.
Specified by:
getUpdateFunction in interface Insert
Returns:
int
Since:
1.0

getFuncArgs

public java.lang.String[] getFuncArgs()
Gets the function arguments
Specified by:
getFuncArgs in interface Insert
Returns:
an array of String
Since:
1.0

setUpdateFunction

public void setUpdateFunction(int updateFunc)
Sets the updateFunction to value that represents type of update Function.
Specified by:
setUpdateFunction in interface Insert
Parameters:
updateFunc - int
Since:
1.0

setOrderPredicate

public void setOrderPredicate(int newOrder)
Sets the order predicate of the query (BEFORE/AFTER)
Specified by:
setOrderPredicate in interface Insert
Parameters:
newOrder - int
Since:
1.0

setPCDATAContent

public void setPCDATAContent(java.lang.String pcdata)
Sets the PCDATA content to be inserted
Specified by:
setPCDATAContent in interface Insert
Parameters:
pcdata - String
Since:
1.0

setRelativeVariable

public void setRelativeVariable(java.lang.String relVar)
Sets the relative Variable in the insert statement
Specified by:
setRelativeVariable in interface Insert
Parameters:
relVar - String
Since:
1.0

setFuncArgs

public void setFuncArgs(java.lang.String[] funArgs)
Sets the function arguments value.
Specified by:
setFuncArgs in interface Insert
Parameters:
funArgs - is an array String
Since:
1.0