You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by mp...@apache.org on 2002/12/11 20:14:01 UTC
cvs commit: jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model Table.java Index.java
mpoeschl 2002/12/11 11:14:01
Modified: src/java/org/apache/torque/engine/database/model Table.java
Index.java
Log:
o remove deprecated methods
o javadocs
Revision Changes Path
1.36 +1 -17 jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Table.java
Index: Table.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Table.java,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- Table.java 29 Nov 2002 13:50:29 -0000 1.35
+++ Table.java 11 Dec 2002 19:14:01 -0000 1.36
@@ -1103,14 +1103,6 @@
}
/**
- * @deprecated Use getPrimaryKey() instead.
- */
- public final ArrayList getPrimaryKeys()
- {
- return (ArrayList) getPrimaryKey();
- }
-
- /**
* Determine whether this table has a primary key.
*
* @return Whether this table has any primary key parts.
@@ -1128,14 +1120,6 @@
public String printPrimaryKey()
{
return printList(columnList);
- }
-
- /**
- * @deprecated Use printPrimaryKey() instead.
- */
- public final String printPrimaryKeys()
- {
- return printPrimaryKey();
}
/**
1.21 +33 -49 jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Index.java
Index: Index.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Index.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- Index.java 29 Nov 2002 13:50:29 -0000 1.20
+++ Index.java 11 Dec 2002 19:14:01 -0000 1.21
@@ -57,9 +57,7 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-
import org.apache.torque.engine.EngineException;
-
import org.xml.sax.Attributes;
/**
@@ -73,9 +71,11 @@
{
/** enables debug output */
private static final boolean DEBUG = false;
-
+ /** name of the index */
private String indexName;
+ /** table */
private Table parentTable;
+ /** columns */
private List indexColumns;
/**
@@ -121,6 +121,11 @@
}
}
+ /**
+ * Creates a name for the index using the NameFactory.
+ *
+ * @throws EngineException
+ */
private void createName() throws EngineException
{
Table table = getTable();
@@ -143,6 +148,8 @@
/**
* Imports index from an XML specification
+ *
+ * @param attrib the xml attributes
*/
public void loadFromXML(Attributes attrib)
{
@@ -150,16 +157,9 @@
}
/**
- * @see #isUnique()
- * @deprecated Use isUnique() instead.
- */
- public boolean getIsUnique()
- {
- return isUnique();
- }
-
- /**
* Returns the uniqueness of this index.
+ *
+ * @return the uniqueness of this index
*/
public boolean isUnique()
{
@@ -167,16 +167,9 @@
}
/**
- * @see #getName()
- * @deprecated Use getName() instead.
- */
- public String getIndexName()
- {
- return getName();
- }
-
- /**
* Gets the name of this index.
+ *
+ * @return the name of this index
*/
public String getName()
{
@@ -196,16 +189,9 @@
}
/**
- * @see #setName(String name)
- * @deprecated Use setName(String name) instead.
- */
- public void setIndexName(String name)
- {
- setName(name);
- }
-
- /**
* Set the name of this index.
+ *
+ * @param name the name of this index
*/
public void setName(String name)
{
@@ -214,6 +200,8 @@
/**
* Set the parent Table of the index
+ *
+ * @param parent the table
*/
public void setTable(Table parent)
{
@@ -222,6 +210,8 @@
/**
* Get the parent Table of the index
+ *
+ * @return the table
*/
public Table getTable()
{
@@ -230,6 +220,8 @@
/**
* Returns the Name of the table the index is in
+ *
+ * @return the name of the table
*/
public String getTableName()
{
@@ -238,6 +230,8 @@
/**
* Adds a new column to an index.
+ *
+ * @param attrib xml attributes for the column
*/
public void addColumn(Attributes attrib)
{
@@ -245,16 +239,9 @@
}
/**
- * @see #getColumnList()
- * @deprecated Use getColumnList() instead.
- */
- public String getIndexColumnList()
- {
- return getColumnList();
- }
-
- /**
* Return a comma delimited string of the columns which compose this index.
+ *
+ * @return a list of column names
*/
public String getColumnList()
{
@@ -262,16 +249,9 @@
}
/**
- * @see #getColumns()
- * @deprecated Use getColumns() instead.
- */
- public List getIndexColumns()
- {
- return getColumns();
- }
-
- /**
* Return the list of local columns. You should not edit this list.
+ *
+ * @return a list of columns
*/
public List getColumns()
{
@@ -283,6 +263,8 @@
* index. Slightly over-allocates the list's buffer (just in case
* more elements are going to be added, such as when a name is
* being generated). Feel free to modify this list.
+ *
+ * @return a list of column names
*/
protected List getColumnNames()
{
@@ -298,6 +280,8 @@
/**
* String representation of the index. This is an xml representation.
+ *
+ * @return a xml representation
*/
public String toString()
{