org.apache.ojb.tools.mapping.reversedb
Class DBFKRelation

java.lang.Object
  extended byorg.apache.ojb.tools.mapping.reversedb.DBFKRelation
All Implemented Interfaces:
MetadataNodeInterface, PropertySheetModel, javax.swing.tree.TreeNode

public class DBFKRelation
extends java.lang.Object
implements MetadataNodeInterface, javax.swing.tree.TreeNode, PropertySheetModel

Version:
$Id: DBFKRelation.java,v 1.6 2003/12/12 16:37:16 brj Exp $
Author:
Florian Bruckner

Field Summary
(package private)  java.util.ArrayList alColumnPairs
           
(package private)  DBTable fkTable
           
(package private)  DBTable pkTable
           
(package private)  boolean pkTableIsParent
           
 
Constructor Summary
DBFKRelation(DBTable pPkTable, DBTable pFkTable, boolean ppkTableIsParent)
          Creates a new instance of DBFKReference
 
Method Summary
 void addColumnPair(DBColumn pPkColumn, DBColumn pFkColumn)
           
 java.util.Enumeration children()
           
 void generateJava(java.io.File aFile, java.lang.String strHeader, java.lang.String strFooter)
           
 boolean getAllowsChildren()
           
 boolean getAutoDelete()
           
 boolean getAutoRetrieve()
           
 boolean getAutoUpdate()
           
 javax.swing.tree.TreeNode getChildAt(int param)
           
 int getChildCount()
           
 java.util.Iterator getColumnPairIterator()
           
 java.lang.String getFieldName()
           
 java.lang.String getFieldType()
           
 DBTable getFKTable()
           
 int getIndex(javax.swing.tree.TreeNode treeNode)
           
 java.lang.String getJavaFieldDefinition()
           
 java.lang.String getJavaGetterSetterDefinition()
           
 javax.swing.tree.TreeNode getParent()
           
 DBTable getPKTable()
           
 java.lang.Class getPropertySheetClass()
           
 java.lang.String getXML()
           
 boolean isEnabled()
           
 boolean isLeaf()
           
 boolean isPkTableParent()
           
 boolean isTreeEnabled()
           
 void setAutoDelete(boolean b)
           
 void setAutoRetrieve(boolean b)
           
 void setAutoUpdate(boolean b)
           
 void setEnabled(boolean b)
           
 void setFieldName(java.lang.String s)
           
 void setFieldType(java.lang.String s)
           
 void setPackage(java.lang.String packageName)
           
 java.lang.String toString()
           
 void writeXML(java.io.PrintWriter pw)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pkTable

DBTable pkTable

fkTable

DBTable fkTable

pkTableIsParent

boolean pkTableIsParent

alColumnPairs

java.util.ArrayList alColumnPairs
Constructor Detail

DBFKRelation

public DBFKRelation(DBTable pPkTable,
                    DBTable pFkTable,
                    boolean ppkTableIsParent)
Creates a new instance of DBFKReference

Method Detail

isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean b)

getFieldName

public java.lang.String getFieldName()

setFieldName

public void setFieldName(java.lang.String s)

getFieldType

public java.lang.String getFieldType()

setFieldType

public void setFieldType(java.lang.String s)

isPkTableParent

public boolean isPkTableParent()

setAutoRetrieve

public void setAutoRetrieve(boolean b)

getAutoRetrieve

public boolean getAutoRetrieve()

setAutoUpdate

public void setAutoUpdate(boolean b)

getAutoUpdate

public boolean getAutoUpdate()

setAutoDelete

public void setAutoDelete(boolean b)

getAutoDelete

public boolean getAutoDelete()

getFKTable

public DBTable getFKTable()

getPKTable

public DBTable getPKTable()

isTreeEnabled

public boolean isTreeEnabled()

addColumnPair

public void addColumnPair(DBColumn pPkColumn,
                          DBColumn pFkColumn)

getColumnPairIterator

public java.util.Iterator getColumnPairIterator()

children

public java.util.Enumeration children()
Specified by:
children in interface javax.swing.tree.TreeNode

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode

getChildAt

public javax.swing.tree.TreeNode getChildAt(int param)
Specified by:
getChildAt in interface javax.swing.tree.TreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface javax.swing.tree.TreeNode

getIndex

public int getIndex(javax.swing.tree.TreeNode treeNode)
Specified by:
getIndex in interface javax.swing.tree.TreeNode

getParent

public javax.swing.tree.TreeNode getParent()
Specified by:
getParent in interface javax.swing.tree.TreeNode

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface javax.swing.tree.TreeNode

toString

public java.lang.String toString()

getPropertySheetClass

public java.lang.Class getPropertySheetClass()
Specified by:
getPropertySheetClass in interface PropertySheetModel

getXML

public java.lang.String getXML()
Specified by:
getXML in interface MetadataNodeInterface

writeXML

public void writeXML(java.io.PrintWriter pw)
Specified by:
writeXML in interface MetadataNodeInterface

generateJava

public void generateJava(java.io.File aFile,
                         java.lang.String strHeader,
                         java.lang.String strFooter)
                  throws java.io.IOException,
                         java.io.FileNotFoundException
Specified by:
generateJava in interface MetadataNodeInterface
Throws:
java.io.IOException
java.io.FileNotFoundException

setPackage

public void setPackage(java.lang.String packageName)
Specified by:
setPackage in interface MetadataNodeInterface

getJavaFieldDefinition

public java.lang.String getJavaFieldDefinition()

getJavaGetterSetterDefinition

public java.lang.String getJavaGetterSetterDefinition()


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14