|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteasik.sketch.util.Export.Constraints.ExportConstraint
easik.sketch.util.Export.Constraints.ExportPullback
public class ExportPullback
A class to create a pullback constraint object, including all necessary information gleaned from the XML file. Should not be used for any other purpose than database exportation, as it contains no graphical information.
Field Summary | |
---|---|
private java.lang.String |
_targetTable
The codomain of the paths in the pullback |
private static java.lang.String |
PULL_A_INS_PROC_NAME
The name of the after insert procedure for the pullback |
private static java.lang.String |
PULL_DEL_PROC_NAME
The name of the delete procedure for the pullback |
Fields inherited from class easik.sketch.util.Export.Constraints.ExportConstraint |
---|
_a_i_tables, _b_d_tables, _b_i_tables, _baseTable, _db_name, _id, _paths, _procedureStrings |
Constructor Summary | |
---|---|
ExportPullback(int id)
Constructor calling the constructor of the ExportConstraint superclass |
Method Summary | |
---|---|
private java.lang.String |
getAllTablesInPullback()
Returns a list of all names of tables in the pullback, separated by commas. |
private java.lang.String |
getAltPathConditions(ExportPath alt,
ExportPath main)
Gets the alternate path conditions for testing whether a pullback condition is formed. |
private java.lang.String |
getBeforeIfStatement()
Gets the statements to determine whether the entry is a valid pullback entry. |
private java.lang.String |
getDeleteString()
Gets the delete string for SQL deleting from the codomain of the pullback constraint, the element which is the codomain of the element being deleted from the domain. |
private java.lang.String |
getFinalInsertStatements(ExportPath path)
Determines the INSERT statements necessary for the procedure called AFTER INSERT on the domain of |
private java.lang.String |
getIfStatement(ExportPath main,
ExportPath alt)
Gets the IF THEN SQL statement for this procedure. |
private java.lang.String |
getSecondIfStatement(ExportPath main,
ExportPath alt)
Gets the main path conditions to determine whether the pullback table contains elements along the path for every element in the alternate table which leads to the same element as the main table. |
private java.lang.String |
getSelectIntoStatement(ExportPath path,
int p)
Creates an INSERT INTO ... |
private java.lang.String |
getSelectStatement(ExportPath p)
Determines the conditions required for an insert into the pullback table AFTER INSERT into the table for which the procedure is being called. |
private java.lang.String |
getSubConditions(ExportPath path)
Gets the conditions for the insert, given the path, minus the initial conditions. |
private java.lang.String |
getTestForDuplicateStatement()
Gets the string that determines whether the pullback has a duplicate entry. |
private void |
setAfterInsertProcs()
Sets the procedures to be called AFTER INSERT on the tables which form the codomains of the first and third paths. |
private void |
setAIForTable(ExportPath mainP,
ExportPath subP)
Sets AFTER INSERT procedure for the table which is the domain of path mainP. |
void |
setBaseTable()
Sets the base table of this constraint. |
private void |
setBeforeDeleteProcs()
Sets the procedure to be called BEFORE DELETE on the domain of the pullback constraint. |
void |
setConstraintStrings()
Sets all constraint strings for this constraint. |
private void |
setPullbackInsertProcs()
Sets the procedure to be called BEFORE INSERT on the pull back table (that is, the base table) of this constraint. |
void |
setTargetTable()
Sets the target table of this constraint. |
Methods inherited from class easik.sketch.util.Export.Constraints.ExportConstraint |
---|
addPath, getBaseTable, getConstraintStrings, getPaths, getTimeNames, set_db_name |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String PULL_DEL_PROC_NAME
private static final java.lang.String PULL_A_INS_PROC_NAME
private java.lang.String _targetTable
Constructor Detail |
---|
public ExportPullback(int id)
id
- A unique id to identify this constraint from all othersMethod Detail |
---|
public void setBaseTable()
setBaseTable
in class ExportConstraint
public void setTargetTable()
setTargetTable
in class ExportConstraint
public void setConstraintStrings()
setConstraintStrings
in class ExportConstraint
private void setPullbackInsertProcs()
private java.lang.String getBeforeIfStatement()
private java.lang.String getSelectIntoStatement(ExportPath path, int p)
path
- The path for which this insert statement is being called.p
- The index of the opposite path in the pullback
private java.lang.String getTestForDuplicateStatement()
private void setAfterInsertProcs()
private void setAIForTable(ExportPath mainP, ExportPath subP)
mainP
- The path which has the table as its domain for which we want to set the procedure.subP
- The opposite path which has the same codomain as mainPprivate java.lang.String getIfStatement(ExportPath main, ExportPath alt)
main
- The path for which the procedure is being calledalt
- The path opposing path for this procedure
private java.lang.String getAltPathConditions(ExportPath alt, ExportPath main)
alt
- The path which does not contain the table for which the procedure is being called.main
- The path which contains the table to which the procedure is being called.
private java.lang.String getSecondIfStatement(ExportPath main, ExportPath alt)
alt
- The path which does not contain the table for which the procedure is being called.main
- The path which contains the table to which the procedure is being called.
private java.lang.String getFinalInsertStatements(ExportPath path)
path
- The path which has, as its domain, the table for which the procedure is being called.
private java.lang.String getSelectStatement(ExportPath p)
p
- The path for which the select statement must be determined.
private java.lang.String getSubConditions(ExportPath path)
path
- The path for which we need the conditions.
private void setBeforeDeleteProcs()
private java.lang.String getDeleteString()
private java.lang.String getAllTablesInPullback()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |