Author: tfischer
Date: Fri May 17 22:56:36 2013
New Revision: 1484024
URL: http://svn.apache.org/r1484024
Log:
TORQUE-273
change model types from String to Boolean where possible
fix some checkstyle and javadoc issues
Modified:
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Column.java
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Table.java
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Unique.java
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/UniqueColumn.java
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/View.java
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/ViewColumn.java
Modified:
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Column.java
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Column.java?rev=1484024&r1=1484023&r2=1484024&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Column.java
(original)
+++
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Column.java
Fri May 17 22:56:36 2013
@@ -87,7 +87,7 @@ public class Column
/**
* Whether getters and setters for the field in the database object
- * should be public instead of protected.
+ * should be protected instead of public.
*/
public Boolean _protected;
Modified:
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Table.java
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Table.java?rev=1484024&r1=1484023&r2=1484024&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Table.java
(original)
+++
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Table.java
Fri May 17 22:56:36 2013
@@ -84,7 +84,7 @@ public class Table
/**
* The unqualified name of the data object class.
- * If null, the class name will be determined frome the name attribute.
+ * If null, the class name will be determined from the name attribute.
*/
public String javaName;
@@ -101,56 +101,87 @@ public class Table
// properties for generation of ORM classes
+ /** The class name of the data object class. */
public String dbObjectClassName;
+ /** The class name of the data object base class. */
public String baseDbObjectClassName;
+ /** The class name of the peer static wrapper class. */
public String peerClassName;
+ /** The class name of the peer static wrapper base class. */
public String basePeerClassName;
+ /** The class name of the peer implementation class. */
public String peerImplClassName;
+ /** The class name of the peer implementation base class. */
public String basePeerImplClassName;
+ /** The class name of the data object bean class. */
public String beanClassName;
+ /** The class name of the data object bean base class. */
public String baseBeanClassName;
+ /** The class name of the manager class. */
public String managerClassName;
+ /** The class name of the manager base class. */
public String baseManagerClassName;
+ /** The class name of the record mapper class. */
public String recordMapperClassName;
+ /** The class name of the record mapper base class. */
public String baseRecordMapperClassName;
+ /** The package of the data object class. */
public String dbObjectPackage;
+ /** The package of the data object base class. */
public String baseDbObjectPackage;
+ /** The package of the peer class. */
public String peerPackage;
+ /** The package of the peer base class. */
public String basePeerPackage;
+ /** The package of the record mapper class. */
public String recordMapperPackage;
+ /** The package of the record mapper base class. */
public String baseRecordMapperPackage;
+ /** The package of the manager class. */
public String managerPackage;
+ /** The package of the manager base class. */
public String baseManagerPackage;
+ /** The package of the data object bean class. */
public String beanPackage;
+ /** The package of the data object bean base class. */
public String baseBeanPackage;
+ /**
+ * The optimistic Locking mode to use.
+ * Valid values are "selectForUpdate", "simpleSelect". */
public String optimisticLockingMode;
- public String useManagers;
+ /** Override flag whether manager classes are used in this table. */
+ public Boolean useManagers;
- public String saveMethodsInDbObjects;
+ /**
+ * Whether the save method resides in the data objects
+ * (default is it is in the peer).
+ */
+ public Boolean saveMethodsInDbObjects;
+ /** The interface for the peer class. */
public String peerInterface;
// properties for sql generation
Modified:
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Unique.java
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Unique.java?rev=1484024&r1=1484023&r2=1484024&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Unique.java
(original)
+++
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/Unique.java
Fri May 17 22:56:36 2013
@@ -1,9 +1,5 @@
package org.apache.torque.templates.model;
-import java.util.ArrayList;
-import java.util.List;
-
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -23,6 +19,9 @@ import java.util.List;
* under the License.
*/
+import java.util.ArrayList;
+import java.util.List;
+
/**
* The model of the unique tag in a Torque schema file.
*
@@ -32,12 +31,16 @@ public class Unique
{
// schema properties
+ /** The table where this unique constraint belongs to. */
public Table parent;
+ /** The options for this unique constraint. */
public List<Option> optionList = new ArrayList<Option>();
+ /** The columns in this unique constraint. */
public List<UniqueColumn> uniqueColumnList = new ArrayList<UniqueColumn>();
+ /** The name of the constraint. */
public String name;
// SQL generation properties
Modified:
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/UniqueColumn.java
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/UniqueColumn.java?rev=1484024&r1=1484023&r2=1484024&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/UniqueColumn.java
(original)
+++
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/UniqueColumn.java
Fri May 17 22:56:36 2013
@@ -1,7 +1,5 @@
package org.apache.torque.templates.model;
-
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -28,7 +26,12 @@ package org.apache.torque.templates.mode
*/
public class UniqueColumn
{
+ /** The unique constraint to which this unique column definition belongs.
*/
public Unique parent;
+ /**
+ * The unqualified name of the column to be included in the
+ * unique constraint.
+ */
public String name;
}
Modified:
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/View.java
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/View.java?rev=1484024&r1=1484023&r2=1484024&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/View.java
(original)
+++
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/View.java
Fri May 17 22:56:36 2013
@@ -1,8 +1,5 @@
package org.apache.torque.templates.model;
-import java.util.ArrayList;
-import java.util.List;
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -22,6 +19,9 @@ import java.util.List;
* under the License.
*/
+import java.util.ArrayList;
+import java.util.List;
+
/**
* The model of the view tag in a Torque schema file.
*
@@ -29,28 +29,47 @@ import java.util.List;
*/
public class View
{
+ /** The database to which this view belongs. */
public Database parent;
+ /** The options for this view. */
public List<Option> optionList = new ArrayList<Option>();
+ /** The columns of this view. */
public List<ViewColumn> columnList;
+ /** The view's name. */
public String name;
+ /** The base class of the data object class. */
public String baseClass;
+ /** The base class of the peer class. */
public String basePeer;
- public String _abstract;
+ /** Whether the data object class is abstract. */
+ public Boolean _abstract;
+ /**
+ * The unqualified name of the data object class.
+ * If null, the class name will be determined from the name attribute.
+ */
public String javaName;
+ /** The remainder of the sql for the view after column definitions. */
public String sqlSuffix;
+ /**
+ * The complete SQL for creating the view.
+ * If set, overrides all other means of generating the SQL
+ * for view creation.
+ */
public String createSql;
+ /** Whether sql generation should be skipped. */
public Boolean skipSql;
+ /** A description of the view. */
public String description;
}
Modified:
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/ViewColumn.java
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/ViewColumn.java?rev=1484024&r1=1484023&r2=1484024&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/ViewColumn.java
(original)
+++
db/torque/torque4/trunk/torque-templates/src/main/java/org/apache/torque/templates/model/ViewColumn.java
Fri May 17 22:56:36 2013
@@ -1,9 +1,5 @@
package org.apache.torque.templates.model;
-import java.util.ArrayList;
-import java.util.List;
-
-
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -23,6 +19,9 @@ import java.util.List;
* under the License.
*/
+import java.util.ArrayList;
+import java.util.List;
+
/**
* The model of the column tag in a Torque schema file.
*
@@ -30,29 +29,47 @@ import java.util.List;
*/
public class ViewColumn
{
+ /** The view to which the view column belongs. */
public View parent;
+ /** The list of options for this view column. */
public List<Option> options = new ArrayList<Option>();
+ /** The list of inheritances for this view column. */
public List<Inheritance> inheritances = new ArrayList<Inheritance>();
+ /** The view column's name. */
public String name;
+ /** The type of the view column. */
public String type;
+ /**
+ * How many decimal places, characters or bytes the view column can take.
+ */
public String size;
+ /** The scale of the view column. */
public String scale;
+ /** The field name for the view column in the database object. */
public String javaName;
+ /** The type of the field for the view column in the database object. */
public String javaType;
+ /** The domain reference name to set common settings. */
public String domain;
+ /** The sql snippet which contains the value to select. */
public String select;
+ /**
+ * Whether getters and setters for the field in the database object
+ * should be protected instead of public.
+ */
public String _protected;
+ /** The description of (== comment for) the view column. */
public String description;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]