edu.wpi.cs.dsrg.xmldb.xat.component.sqlgeneration
Class QueryFragment

java.lang.Object
  |
  +--edu.wpi.cs.dsrg.xmldb.xat.component.sqlgeneration.QueryFragment

public class QueryFragment
extends java.lang.Object
implements java.lang.Cloneable

 QueryFragment contains a fragment type,
 a name, a binding, and in some cases, a list of parameters
 The name is the name of the table or column name to use
 The binding is what to rename the name to, 
 so SELCECT xxx AS yyy, has a name of xxx and a binding of yyy and the
 clause type is select
 


Constructor Summary
QueryFragment(int fragmentType, java.lang.String fragmentText)
          Create a QueryFragment with a fragment type and a name
QueryFragment(int fragmentType, java.lang.String fragmentText, java.lang.String fragmentBinding)
          Create a QueryFragment with a fragment type, a binding, and a name
QueryFragment(int fragmentType, java.lang.String fragmentText, java.lang.String fragmentBinding, java.lang.String fragmentParams)
          Create a QueryFragment with a fragment type, a binding, a name, and parameters
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this object
 java.lang.String getBinding()
          Returns the binding
 int getClauseType()
          Returns the fragment type
 java.lang.String getName()
          Returns the name
 java.lang.String getParams()
          Returns the parameters
 void setBinding(java.lang.String newBinding)
          Sets the binding
 void setName(java.lang.String newName)
          Sets the name
 void setParams(java.lang.String newParams)
          Sets the parameters
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryFragment

public QueryFragment(int fragmentType,
                     java.lang.String fragmentText)
Create a QueryFragment with a fragment type and a name

QueryFragment

public QueryFragment(int fragmentType,
                     java.lang.String fragmentText,
                     java.lang.String fragmentBinding)
Create a QueryFragment with a fragment type, a binding, and a name

QueryFragment

public QueryFragment(int fragmentType,
                     java.lang.String fragmentText,
                     java.lang.String fragmentBinding,
                     java.lang.String fragmentParams)
Create a QueryFragment with a fragment type, a binding, a name, and parameters
Method Detail

clone

public java.lang.Object clone()
Returns a clone of this object
Overrides:
clone in class java.lang.Object
Returns:
Object

getBinding

public java.lang.String getBinding()
Returns the binding
Returns:
java.lang.String

getClauseType

public int getClauseType()
Returns the fragment type
Returns:
int

getName

public java.lang.String getName()
Returns the name
Returns:
java.lang.String

getParams

public java.lang.String getParams()
Returns the parameters
Returns:
java.lang.String

setBinding

public void setBinding(java.lang.String newBinding)
Sets the binding
Parameters:
newBinding - java.lang.String

setName

public void setName(java.lang.String newName)
Sets the name
Parameters:
newName - java.lang.String

setParams

public void setParams(java.lang.String newParams)
Sets the parameters
Parameters:
newParams - java.lang.String