tudresden.ocl.sql
Class SybaseSQLBuilder
java.lang.Object
tudresden.ocl.sql.SybaseSQLBuilder
- All Implemented Interfaces:
- SQLBuilder
- public class SybaseSQLBuilder
- extends Object
- implements SQLBuilder
implementation of the SQLBuilder for Sybase DBMS
- Author:
- Andrea Kling
|
Method Summary |
void |
addAlias(String name)
|
void |
addAnd()
|
void |
addColumn(String name)
|
void |
addColumn(String colName,
boolean optional,
String colType)
|
void |
addColumn(String colName,
String type,
boolean pk)
|
void |
addColumnSeparator()
|
void |
addEquation(String op1,
String op2)
|
void |
addFKConstraint(String conName,
String tableName,
String[] colName,
String fkTable,
String[] fkColName)
|
void |
addFKConstraint(String constrName,
String tableName,
String colName,
String fkTable,
String fkColName)
|
void |
addTable(String name)
|
void |
beginTable(String tableName)
|
private String |
check(String word)
|
void |
createAssertionReplacement(String triggerName,
String tableName,
String viewName,
String errMsg)
|
void |
createECATriggerTemplate(String triggerName,
String tableName,
String viewName)
|
void |
createFrom()
|
void |
createSelect()
|
void |
createUnion()
|
void |
createView(String name,
boolean alias)
|
void |
createWhere()
|
void |
endStatement()
adds a statement seperator for sql-scripts |
void |
endTable()
|
void |
endView()
|
String |
getCode()
|
String |
getDescription()
|
private String |
indent(int length)
|
void |
reset()
Resets the Builder to an empty product. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
datatypes
private Hashtable datatypes
theCode
private StringBuffer theCode
nextAliasPos
private int nextAliasPos
aliasCount
private int aliasCount
pks
private String pks
reserved
private HashSet reserved
SybaseSQLBuilder
public SybaseSQLBuilder()
addAlias
public void addAlias(String name)
- Specified by:
addAlias in interface SQLBuilder
addAnd
public void addAnd()
- Specified by:
addAnd in interface SQLBuilder
addColumn
public void addColumn(String name)
- Specified by:
addColumn in interface SQLBuilder
indent
private String indent(int length)
check
private String check(String word)
addColumn
public void addColumn(String colName,
String type,
boolean pk)
- Specified by:
addColumn in interface SQLBuilder
addColumn
public void addColumn(String colName,
boolean optional,
String colType)
- Specified by:
addColumn in interface SQLBuilder
addColumnSeparator
public void addColumnSeparator()
- Specified by:
addColumnSeparator in interface SQLBuilder
addEquation
public void addEquation(String op1,
String op2)
- Specified by:
addEquation in interface SQLBuilder
addFKConstraint
public void addFKConstraint(String constrName,
String tableName,
String colName,
String fkTable,
String fkColName)
- Specified by:
addFKConstraint in interface SQLBuilder
addFKConstraint
public void addFKConstraint(String conName,
String tableName,
String[] colName,
String fkTable,
String[] fkColName)
- Specified by:
addFKConstraint in interface SQLBuilder
addTable
public void addTable(String name)
- Specified by:
addTable in interface SQLBuilder
beginTable
public void beginTable(String tableName)
- Specified by:
beginTable in interface SQLBuilder
createAssertionReplacement
public void createAssertionReplacement(String triggerName,
String tableName,
String viewName,
String errMsg)
- Specified by:
createAssertionReplacement in interface SQLBuilder
createECATriggerTemplate
public void createECATriggerTemplate(String triggerName,
String tableName,
String viewName)
- Specified by:
createECATriggerTemplate in interface SQLBuilder
createSelect
public void createSelect()
- Specified by:
createSelect in interface SQLBuilder
createFrom
public void createFrom()
- Specified by:
createFrom in interface SQLBuilder
createWhere
public void createWhere()
- Specified by:
createWhere in interface SQLBuilder
createUnion
public void createUnion()
- Specified by:
createUnion in interface SQLBuilder
createView
public void createView(String name,
boolean alias)
- Specified by:
createView in interface SQLBuilder
endTable
public void endTable()
- Specified by:
endTable in interface SQLBuilder
endView
public void endView()
- Specified by:
endView in interface SQLBuilder
endStatement
public void endStatement()
- Description copied from interface:
SQLBuilder
- adds a statement seperator for sql-scripts
- Specified by:
endStatement in interface SQLBuilder
getCode
public String getCode()
- Specified by:
getCode in interface SQLBuilder
- Returns:
- the product that was build (database specific DDL)
reset
public void reset()
- Description copied from interface:
SQLBuilder
- Resets the Builder to an empty product.
- Specified by:
reset in interface SQLBuilder
getDescription
public String getDescription()
- Specified by:
getDescription in interface SQLBuilder
- Returns:
- a description of the database system(s) the builder is for
Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.