mpoeschl 2003/05/27 12:23:33
Modified: src/java/org/apache/torque/engine/database/model Tag:
TORQUE_3_0_BRANCH ForeignKey.java
Log:
TRQS98: Documentation changes in ForeignKey.java
Revision Changes Path
No revision
No revision
1.10.2.1 +70 -28
db-torque/src/java/org/apache/torque/engine/database/model/Attic/ForeignKey.java
Index: ForeignKey.java
===================================================================
RCS file:
/home/cvs/db-torque/src/java/org/apache/torque/engine/database/model/Attic/ForeignKey.java,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -r1.10 -r1.10.2.1
--- ForeignKey.java 29 Nov 2002 13:50:29 -0000 1.10
+++ ForeignKey.java 27 May 2003 19:23:32 -0000 1.10.2.1
@@ -60,7 +60,7 @@
import org.xml.sax.Attributes;
/**
- * A Class for information about foreign keys of a table.
+ * A class for information about foreign keys of a table.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Fedor</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Daniel Rall</a>
@@ -81,16 +81,11 @@
private final String SETNULL = "SETNULL";
/**
- * Default Constructor
- */
- public ForeignKey()
- {
- }
-
- /**
* Imports foreign key from an XML specification
+ *
+ * @param attrib the xml attributes
*/
- public void loadFromXML (Attributes attrib)
+ public void loadFromXML(Attributes attrib)
{
foreignTableName = attrib.getValue("foreignTable");
name = attrib.getValue("name");
@@ -101,7 +96,10 @@
}
/**
- * normalizes the input of onDelete, onUpdate attributes
+ * Normalizes the input of onDelete, onUpdate attributes
+ *
+ * @param attrib the attribute to normalize
+ * @return nomalized form
*/
private String normalizeFKey(String attrib)
{
@@ -113,13 +111,15 @@
attrib = attrib.toUpperCase();
if (attrib.equals(SETNULL))
{
- attrib = "SET NULL";
+ attrib = "SET NULL";
}
return attrib;
}
/**
- * returns whether or not the onUpdate attribute is set
+ * Returns whether or not the onUpdate attribute is set
+ *
+ * @return true if the onUpdate attribute is set
*/
public boolean hasOnUpdate()
{
@@ -127,7 +127,9 @@
}
/**
- * returns whether or not the onDelete attribute is set
+ * Returns whether or not the onDelete attribute is set
+ *
+ * @return true if the onDelete attribute is set
*/
public boolean hasOnDelete()
{
@@ -135,7 +137,9 @@
}
/**
- * returns the onUpdate attribute
+ * Returns the onUpdate attribute
+ *
+ * @return the onUpdate attribute
*/
public String getOnUpdate()
{
@@ -143,7 +147,9 @@
}
/**
- * returns the onDelete attribute
+ * Returns the onDelete attribute
+ *
+ * @return the onDelete attribute
*/
public String getOnDelete()
{
@@ -151,7 +157,9 @@
}
/**
- * sets the onDelete attribute
+ * Sets the onDelete attribute
+ *
+ * @param value the onDelete attribute
*/
public void setOnDelete(String value)
{
@@ -159,7 +167,9 @@
}
/**
- * sets the onUpdate attribute
+ * Sets the onUpdate attribute
+ *
+ * @param value the onUpdate attribute
*/
public void setOnUpdate(String value)
{
@@ -168,6 +178,8 @@
/**
* Returns the name attribute.
+ *
+ * @return the name
*/
public String getName()
{
@@ -176,6 +188,8 @@
/**
* Sets the name attribute.
+ *
+ * @param name the name
*/
public void setName(String name)
{
@@ -184,6 +198,8 @@
/**
* Get the foreignTableName of the FK
+ *
+ * @return the name of the foreign table
*/
public String getForeignTableName()
{
@@ -192,6 +208,8 @@
/**
* Set the foreignTableName of the FK
+ *
+ * @param tableName the name of the foreign table
*/
public void setForeignTableName(String tableName)
{
@@ -200,6 +218,8 @@
/**
* Set the parent Table of the foreign key
+ *
+ * @param parent the table
*/
public void setTable(Table parent)
{
@@ -208,6 +228,8 @@
/**
* Get the parent Table of the foreign key
+ *
+ * @return the parent table
*/
public Table getTable()
{
@@ -215,7 +237,9 @@
}
/**
- * Returns the Name of the table the foreign key is in
+ * Returns the name of the table the foreign key is in
+ *
+ * @return the name of the table
*/
public String getTableName()
{
@@ -223,7 +247,9 @@
}
/**
- * adds a new reference entry to the foreign key
+ * Adds a new reference entry to the foreign key
+ *
+ * @param attrib the xml attributes
*/
public void addReference(Attributes attrib)
{
@@ -231,7 +257,10 @@
}
/**
- * adds a new reference entry to the foreign key
+ * Adds a new reference entry to the foreign key
+ *
+ * @param local name of the local column
+ * @param foreign name of the foreign column
*/
public void addReference(String local, String foreign)
{
@@ -240,7 +269,9 @@
}
/**
- * Return a comma delimited string of local column names
+ * Returns a comma delimited string of local column names
+ *
+ * @return the local column names
*/
public String getLocalColumnNames()
{
@@ -248,7 +279,9 @@
}
/**
- * Return a comma delimited string of foreign column names
+ * Returns a comma delimited string of foreign column names
+ *
+ * @return the foreign column names
*/
public String getForeignColumnNames()
{
@@ -256,7 +289,9 @@
}
/**
- * Return the list of local columns. You should not edit this List.
+ * Returns the list of local column names. You should not edit this List.
+ *
+ * @return the local columns
*/
public List getLocalColumns()
{
@@ -264,8 +299,10 @@
}
/**
- * Utility method to get local column to foreign column
+ * Utility method to get local column names to foreign column names
* mapping for this foreign key.
+ *
+ * @return table mapping foreign names to local names
*/
public Hashtable getLocalForeignMapping()
{
@@ -280,7 +317,9 @@
}
/**
- * Return the list of local columns. You should not edit this List.
+ * Returns the list of foreign column names. You should not edit this List.
+ *
+ * @return the foreign columns
*/
public List getForeignColumns()
{
@@ -288,8 +327,10 @@
}
/**
- * Utility method to get local column to foreign column
+ * Utility method to get foreign column names to local column names
* mapping for this foreign key.
+ *
+ * @return table mapping local names to foreign names
*/
public Hashtable getForeignLocalMapping()
{
@@ -305,6 +346,8 @@
/**
* String representation of the foreign key. This is an xml representation.
+ *
+ * @return string representation in xml
*/
public String toString()
{
@@ -327,4 +370,3 @@
return result.toString();
}
}
-
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]