Return-Path: Mailing-List: contact turbine-torque-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list turbine-torque-dev@jakarta.apache.org Received: (qmail 8137 invoked by uid 97); 22 Jan 2003 21:21:55 -0000 Received: (qmail 8133 invoked by uid 98); 22 Jan 2003 21:21:55 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Received: (qmail 8114 invoked from network); 22 Jan 2003 21:21:53 -0000 Received: from unknown (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 22 Jan 2003 21:21:53 -0000 Received: (qmail 11838 invoked by uid 500); 22 Jan 2003 21:20:25 -0000 Received: (qmail 11830 invoked from network); 22 Jan 2003 21:20:25 -0000 Received: from unknown (HELO icarus.apache.org) (208.185.179.13) by 208.185.179.12.available.above.net with SMTP; 22 Jan 2003 21:20:25 -0000 Received: (qmail 70891 invoked by uid 1280); 22 Jan 2003 21:20:24 -0000 Date: 22 Jan 2003 21:20:24 -0000 Message-ID: <20030122212024.70888.qmail@icarus.apache.org> From: mpoeschl@apache.org To: jakarta-turbine-torque-cvs@apache.org Subject: cvs commit: jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model Column.java Database.java ForeignKey.java Index.java Inheritance.java NameFactory.java NameGenerator.java Table.java Unique.java X-Spam-Rating: 208.185.179.12.available.above.net 1.6.2 0/1000/N mpoeschl 2003/01/22 13:20:24 Modified: src/java/org/apache/torque/engine/database/model Column.java Database.java ForeignKey.java Index.java Inheritance.java NameFactory.java NameGenerator.java Table.java Unique.java Log: o remove unneeded constructors o javadocs Revision Changes Path 1.25 +3 -1 jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Column.java Index: Column.java =================================================================== RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Column.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- Column.java 29 Nov 2002 13:50:29 -0000 1.24 +++ Column.java 22 Jan 2003 21:20:23 -0000 1.25 @@ -573,6 +573,8 @@ /** * String representation of the column. This is an xml representation. + * + * @return string representation in xml */ public String toString() { 1.20 +27 -8 jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Database.java Index: Database.java =================================================================== RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Database.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- Database.java 1 Jan 2003 14:02:27 -0000 1.19 +++ Database.java 22 Jan 2003 21:20:23 -0000 1.20 @@ -94,14 +94,9 @@ private boolean heavyIndexing; /** - * Creates a new instance with unset attributes. - */ - public Database() - { - } - - /** * Load the database object from an xml tag. + * + * @param attrib the xml attributes */ public void loadFromXML(Attributes attrib) { @@ -121,6 +116,8 @@ /** * Get the name of the Database + * + * @return name of the Database */ public String getName() { @@ -129,6 +126,8 @@ /** * Set the name of the Database + * + * @param name name of the Database */ public void setName(String name) { @@ -217,6 +216,8 @@ /** * Get type to use in Java sources (primitive || object) + * + * @return the type to use */ public String getDefaultJavaType() { @@ -226,6 +227,7 @@ /** * Get the value of defaultJavaNamingMethod which specifies the * method for converting schema names for table and column to Java names. + * * @return The default naming conversion used by this database. */ public String getDefaultJavaNamingMethod() @@ -262,6 +264,8 @@ /** * Return an array of all tables + * + * @return array of all tables */ public Table[] getTables() { @@ -276,6 +280,8 @@ /** * Return the table with the specified name. + * + * @param name table name * @return A Table object. If it does not exist it returns null */ public Table getTable(String name) @@ -285,6 +291,8 @@ /** * Return the table with the specified javaName. + * + * @param javaName name of the java object representing the table * @return A Table object. If it does not exist it returns null */ public Table getTableByJavaName(String javaName) @@ -294,6 +302,9 @@ /** * An utility method to add a new table from an xml attribute. + * + * @param attrib the xml attributes + * @return the created Table */ public Table addTable(Attributes attrib) { @@ -306,6 +317,8 @@ /** * Add a table to the list and sets the Database property to this Database + * + * @param tbl the table to add */ public void addTable(Table tbl) { @@ -318,6 +331,8 @@ /** * Set the parent of the database + * + * @param parent the parent */ public void setAppData(AppData parent) { @@ -326,6 +341,8 @@ /** * Get the parent of the table + * + * @return the parent */ public AppData getAppData() { @@ -477,6 +494,8 @@ /** * Creats a string representation of this Database. * The representation is given in xml format. + * + * @return string representation in xml */ public String toString() { 1.12 +54 -11 jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/ForeignKey.java Index: ForeignKey.java =================================================================== RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/ForeignKey.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ForeignKey.java 18 Dec 2002 14:24:37 -0000 1.11 +++ ForeignKey.java 22 Jan 2003 21:20:23 -0000 1.12 @@ -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"); @@ -102,6 +97,9 @@ /** * 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 + * + * @return true if the onUpdate attribute is set */ public boolean hasOnUpdate() { @@ -128,6 +128,8 @@ /** * Returns whether or not the onDelete attribute is set + * + * @return true if the onDelete attribute is set */ public boolean hasOnDelete() { @@ -136,6 +138,8 @@ /** * Returns the onUpdate attribute + * + * @return the onUpdate attribute */ public String getOnUpdate() { @@ -144,6 +148,8 @@ /** * Returns the onDelete attribute + * + * @return the onDelete attribute */ public String getOnDelete() { @@ -152,6 +158,8 @@ /** * Sets the onDelete attribute + * + * @param value the onDelete attribute */ public void setOnDelete(String value) { @@ -160,6 +168,8 @@ /** * 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() { @@ -216,6 +238,8 @@ /** * Returns the name of the table the foreign key is in + * + * @return the name of the table */ public String getTableName() { @@ -224,6 +248,8 @@ /** * Adds a new reference entry to the foreign key + * + * @param attrib the xml attributes */ public void addReference(Attributes attrib) { @@ -232,6 +258,9 @@ /** * 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) { @@ -241,6 +270,8 @@ /** * Returns a comma delimited string of local column names + * + * @return the local column names */ public String getLocalColumnNames() { @@ -249,6 +280,8 @@ /** * Returns a comma delimited string of foreign column names + * + * @return the foreign column names */ public String getForeignColumnNames() { @@ -257,6 +290,8 @@ /** * Returns the list of local column names. You should not edit this List. + * + * @return the local columns */ public List getLocalColumns() { @@ -266,6 +301,8 @@ /** * 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 @@ } /** - * Returns the list of local column names. 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() { @@ -290,6 +329,8 @@ /** * 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() { 1.22 +2 -2 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.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- Index.java 11 Dec 2002 19:14:01 -0000 1.21 +++ Index.java 22 Jan 2003 21:20:23 -0000 1.22 @@ -124,7 +124,7 @@ /** * Creates a name for the index using the NameFactory. * - * @throws EngineException + * @throws EngineException if the name could not be created */ private void createName() throws EngineException { 1.3 +5 -8 jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Inheritance.java Index: Inheritance.java =================================================================== RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Inheritance.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Inheritance.java 8 Nov 2001 17:20:52 -0000 1.2 +++ Inheritance.java 22 Jan 2003 21:20:23 -0000 1.3 @@ -70,14 +70,9 @@ private Column parent; /** - * Default Constructor - */ - public Inheritance() - { - } - - /** * Imports foreign key from an XML specification + * + * @param attrib the xml attributes */ public void loadFromXML (Attributes attrib) { @@ -161,6 +156,8 @@ /** * String representation of the foreign key. This is an xml representation. + * + * @return string representation in xml */ public String toString() { 1.10 +4 -2 jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/NameFactory.java Index: NameFactory.java =================================================================== RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/NameFactory.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- NameFactory.java 29 Nov 2002 13:50:29 -0000 1.9 +++ NameFactory.java 22 Jan 2003 21:20:23 -0000 1.10 @@ -102,7 +102,8 @@ * Factory method which retrieves an instance of the named generator. * * @param name The fully qualified class name of the name - * generation algorithm to retrieve. + * generation algorithm to retrieve. + * @return A name generator */ protected NameGenerator getAlgorithm(String name) { @@ -140,6 +141,7 @@ * implementation to use to generate names. * @param inputs Inputs used to generate a name. * @return The generated name. + * @throws EngineException */ public static String generateName(String algorithmName, List inputs) throws EngineException 1.10 +2 -2 jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/NameGenerator.java Index: NameGenerator.java =================================================================== RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/NameGenerator.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- NameGenerator.java 29 Nov 2002 13:50:29 -0000 1.9 +++ NameGenerator.java 22 Jan 2003 21:20:23 -0000 1.10 @@ -103,7 +103,7 @@ * * @param inputs Inputs used to generate a name. * @return The generated name. - * @throws EngineException + * @throws EngineException if the name could not be generated */ String generateName(List inputs) throws EngineException; } 1.38 +37 -3 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.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- Table.java 18 Dec 2002 13:56:04 -0000 1.37 +++ Table.java 22 Jan 2003 21:20:23 -0000 1.38 @@ -410,6 +410,9 @@ /** * A utility function to create a new foreign key * from attrib and add it to this table. + * + * @param attrib the xml attributes + * @return the created ForeignKey */ public ForeignKey addForeignKey(Attributes attrib) { @@ -449,6 +452,8 @@ /** * Adds the foreign key from another table that refers to this table. + * + * @param fk A foreign key refering to this table */ public void addReferrer(ForeignKey fk) { @@ -461,6 +466,8 @@ /** * Get list of references to this table. + * + * @return A list of references to this table */ public List getReferrers() { @@ -469,6 +476,8 @@ /** * Set whether this table contains a foreign PK + * + * @param b */ public void setContainsForeignPK(boolean b) { @@ -485,6 +494,8 @@ /** * A list of tables referenced by foreign keys in this table + * + * @return A list of tables */ public List getForeignTableNames() { @@ -498,6 +509,8 @@ /** * Adds a new FK to the FK list and set the * parent table of the column to the current table + * + * @param fk A foreign key */ public void addForeignKey(ForeignKey fk) { @@ -586,6 +599,8 @@ /** * A utility function to create a new Unique * from attrib and add it to this table. + * + * @param attrib the xml attributes */ public Unique addUnique(Attributes attrib) { @@ -851,6 +866,8 @@ /** * A name to use for creating a sequence if one is not specified. + * + * @return name of the sequence */ public String getSequenceName() { @@ -871,7 +888,9 @@ } /** - * Returns an Array containing all the FKs in the table + * Returns an Array containing all the indices in the table + * + * @return An array containing all the indices */ public Index[] getIndices() { @@ -886,6 +905,8 @@ /** * Returns an Array containing all the UKs in the table + * + * @return An array containing all the UKs */ public Unique[] getUnices() { @@ -900,6 +921,8 @@ /** * Returns a specified column. + * + * @param name name of the column * @return Return a Column object or null if it does not exist. */ public Column getColumn(String name) @@ -909,6 +932,8 @@ /** * Returns a specified column. + * + * @param javaName java name of the column * @return Return a Column object or null if it does not exist. */ public Column getColumnByJavaName(String javaName) @@ -920,9 +945,11 @@ * Return the first foreign key that includes col in it's list * of local columns. Eg. Foreign key (a,b,c) refrences tbl(x,y,z) * will be returned of col is either a,b or c. + * + * @param col column name included in the key * @return Return a Column object or null if it does not exist. */ - public ForeignKey getForeignKey (String col) + public ForeignKey getForeignKey(String col) { ForeignKey firstFK = null; for (Iterator iter = foreignKeys.iterator(); iter.hasNext();) @@ -948,6 +975,9 @@ /** * Returns true if the table contains a specified column + * + * @param col the column + * @return true if the table contains the column */ public boolean containsColumn(Column col) { @@ -956,6 +986,9 @@ /** * Returns true if the table contains a specified column + * + * @param name name of the column + * @return true if the table contains the column */ public boolean containsColumn(String name) { @@ -1134,6 +1167,7 @@ /** * Returns the elements of the list, separated by commas. * + * @param list a list of Columns * @return A CSV list. */ private String printList(List list) 1.8 +5 -8 jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Unique.java Index: Unique.java =================================================================== RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/engine/database/model/Unique.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Unique.java 8 Nov 2001 17:20:52 -0000 1.7 +++ Unique.java 22 Jan 2003 21:20:24 -0000 1.8 @@ -70,14 +70,9 @@ public class Unique extends Index { /** - * Creates a new instance. - */ - public Unique() - { - } - - /** * Returns true. + * + * @return true */ public final boolean isUnique() { @@ -86,6 +81,8 @@ /** * String representation of the index. This is an xml representation. + * + * @return string representation in xml */ public String toString() {