org.vizzini.database
Class JunctionData

java.lang.Object
  extended by org.vizzini.database.JoinData
      extended by org.vizzini.database.JunctionData

 class JunctionData
extends JoinData

Provides storage for data detailing a junction between two tables. The middle table is constructed automatically.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Constructor Summary
JunctionData()
           
 
Method Summary
 void associate(IRecord record0, IRecord record1)
          Associate the given records by inserting a new record in the middle table.
 String constructSelectExpression(ITableData targetTableData, IRecord record, boolean forward)
          Construct a select expression using this join.
 void disassociate(IRecord record0, IRecord record1)
          Disassociate the given records by deleting the existing record in the middle table.
 String getColumnName22()
          Return the middle table second column name.
 String getColumnName3()
          Return the third table column name.
 String getLastTableName()
          Return the last table name.
 String getTableName3()
          Return the third table name.
 void inflate(Element element)
          Inflate this object from the given XML element.
 boolean match(String startTableName, String endTableName)
          Return true if the given table names match this join.
 void setColumnName22(String name)
          Set the middle table second column name.
 void setColumnName3(String name)
          Set the third column name.
 void setTableName3(String name)
          Set the third table name.
 String toDebugString()
          Return a debug string representation of this object.
 
Methods inherited from class org.vizzini.database.JoinData
getColumnName1, getColumnName2, getTableName1, getTableName2, setColumnName1, setColumnName2, setTableName1, setTableName2, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JunctionData

JunctionData()
Method Detail

associate

public void associate(IRecord record0,
                      IRecord record1)
               throws SQLException
Associate the given records by inserting a new record in the middle table.

Overrides:
associate in class JoinData
Throws:
SQLException
Since:
v0.3

constructSelectExpression

public String constructSelectExpression(ITableData targetTableData,
                                        IRecord record,
                                        boolean forward)
Construct a select expression using this join.

Overrides:
constructSelectExpression in class JoinData
Since:
v0.3

disassociate

public void disassociate(IRecord record0,
                         IRecord record1)
                  throws SQLException
Disassociate the given records by deleting the existing record in the middle table.

Overrides:
disassociate in class JoinData
Throws:
SQLException
Since:
v0.3

getColumnName22

public String getColumnName22()
Return the middle table second column name.

Since:
v0.3

getColumnName3

public String getColumnName3()
Return the third table column name.

Since:
v0.3

getLastTableName

public String getLastTableName()
Return the last table name. For this class, this is the third table name.

Overrides:
getLastTableName in class JoinData
Since:
v0.3

getTableName3

public String getTableName3()
Return the third table name.

Since:
v0.3

inflate

public void inflate(Element element)
Inflate this object from the given XML element.

Overrides:
inflate in class JoinData
Since:
v0.3

match

public boolean match(String startTableName,
                     String endTableName)
Return true if the given table names match this join.

Overrides:
match in class JoinData
Since:
v0.3

setColumnName22

public void setColumnName22(String name)
Set the middle table second column name.

Since:
v0.3

setColumnName3

public void setColumnName3(String name)
Set the third column name.

Since:
v0.3

setTableName3

public void setTableName3(String name)
Set the third table name.

Since:
v0.3

toDebugString

public String toDebugString()
Return a debug string representation of this object.

Overrides:
toDebugString in class JoinData
Since:
v0.3


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02