You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by jg...@apache.org on 2009/03/20 22:09:46 UTC
svn commit: r756759 [2/2] - in /ibatis/trunk/java/tools/ibator/core: build/
buildsupport/org/apache/ibatis/ibator/build/ doc/ htmldoc/
src/org/apache/ibatis/ibator/ant/ src/org/apache/ibatis/ibator/api/
src/org/apache/ibatis/ibator/config/ src/org/apac...
Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/dao/elements/UpdateByPrimaryKeyWithBLOBsMethodGenerator.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/dao/elements/UpdateByPrimaryKeyWithBLOBsMethodGenerator.java?rev=756759&r1=756758&r2=756759&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/dao/elements/UpdateByPrimaryKeyWithBLOBsMethodGenerator.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/dao/elements/UpdateByPrimaryKeyWithBLOBsMethodGenerator.java Fri Mar 20 21:09:45 2009
@@ -72,7 +72,6 @@
}
private Method getMethodShell(Set<FullyQualifiedJavaType> importedTypes) {
- FullyQualifiedTable table = introspectedTable.getFullyQualifiedTable();
FullyQualifiedJavaType parameterType;
if (introspectedTable.getRules().generateRecordWithBLOBsClass()) {
@@ -94,7 +93,7 @@
importedTypes.add(fqjt);
}
- ibatorContext.getCommentGenerator().addGeneralMethodComment(method, table);
+ ibatorContext.getCommentGenerator().addGeneralMethodComment(method, introspectedTable);
return method;
}
Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/dao/elements/UpdateByPrimaryKeyWithoutBLOBsMethodGenerator.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/dao/elements/UpdateByPrimaryKeyWithoutBLOBsMethodGenerator.java?rev=756759&r1=756758&r2=756759&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/dao/elements/UpdateByPrimaryKeyWithoutBLOBsMethodGenerator.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/dao/elements/UpdateByPrimaryKeyWithoutBLOBsMethodGenerator.java Fri Mar 20 21:09:45 2009
@@ -72,7 +72,6 @@
}
private Method getMethodShell(Set<FullyQualifiedJavaType> importedTypes) {
- FullyQualifiedTable table = introspectedTable.getFullyQualifiedTable();
FullyQualifiedJavaType parameterType =
introspectedTable.getBaseRecordType();
importedTypes.add(parameterType);
@@ -88,7 +87,7 @@
importedTypes.add(fqjt);
}
- ibatorContext.getCommentGenerator().addGeneralMethodComment(method, table);
+ ibatorContext.getCommentGenerator().addGeneralMethodComment(method, introspectedTable);
return method;
}
Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/dao/templates/AbstractDAOTemplate.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/dao/templates/AbstractDAOTemplate.java?rev=756759&r1=756758&r2=756759&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/dao/templates/AbstractDAOTemplate.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/dao/templates/AbstractDAOTemplate.java Fri Mar 20 21:09:45 2009
@@ -20,7 +20,7 @@
import java.util.List;
import org.apache.ibatis.ibator.api.CommentGenerator;
-import org.apache.ibatis.ibator.api.FullyQualifiedTable;
+import org.apache.ibatis.ibator.api.IntrospectedTable;
import org.apache.ibatis.ibator.api.dom.java.Field;
import org.apache.ibatis.ibator.api.dom.java.FullyQualifiedJavaType;
import org.apache.ibatis.ibator.api.dom.java.Method;
@@ -73,7 +73,7 @@
configured = false;
}
- public final Method getConstructorClone(CommentGenerator commentGenerator, FullyQualifiedJavaType type, FullyQualifiedTable table) {
+ public final Method getConstructorClone(CommentGenerator commentGenerator, FullyQualifiedJavaType type, IntrospectedTable introspectedTable) {
configure();
Method answer = new Method();
answer.setConstructor(true);
@@ -91,7 +91,7 @@
answer.addException(fqjt);
}
- commentGenerator.addGeneralMethodComment(answer, table);
+ commentGenerator.addGeneralMethodComment(answer, introspectedTable);
return answer;
}
@@ -161,7 +161,7 @@
return checkedExceptions;
}
- public final List<Field> getFieldClones(CommentGenerator commentGenerator, FullyQualifiedTable table) {
+ public final List<Field> getFieldClones(CommentGenerator commentGenerator, IntrospectedTable introspectedTable) {
configure();
List<Field> answer = new ArrayList<Field>();
for (Field oldField : fields) {
@@ -173,14 +173,14 @@
field.setName(oldField.getName());
field.setType(oldField.getType());
field.setVisibility(oldField.getVisibility());
- commentGenerator.addFieldComment(field, table);
+ commentGenerator.addFieldComment(field, introspectedTable);
answer.add(field);
}
return answer;
}
- public final List<Method> getMethodClones(CommentGenerator commentGenerator, FullyQualifiedTable table) {
+ public final List<Method> getMethodClones(CommentGenerator commentGenerator, IntrospectedTable introspectedTable) {
configure();
List<Method> answer = new ArrayList<Method>();
for (Method oldMethod : methods) {
@@ -205,7 +205,7 @@
method.setReturnType(oldMethod.getReturnType());
method.setVisibility(oldMethod.getVisibility());
- commentGenerator.addGeneralMethodComment(method, table);
+ commentGenerator.addGeneralMethodComment(method, introspectedTable);
answer.add(method);
}
@@ -343,7 +343,7 @@
/**
* Override this method to configure a constructor for generated
- * DAO implementation classes. During code generation, ibator will
+ * DAO implementation classes. During code generation, Ibator will
* build a new constructor using the visibility, parameters, body lines,
* and exceptions set on the constructor template. When overriding this
* method, call <code>setConstructorTemplate(Method)</code> to
@@ -354,7 +354,7 @@
/**
* Override this method to configure an insert method template.
* A method template is a string with three substitution
- * markers that ibator will fill in when generating code. The
+ * markers that Ibator will fill in when generating code. The
* substitution markers will be:
* <ul>
* <li>{0} - The SqlMap namespace</li>
@@ -377,7 +377,7 @@
/**
* Override this method to configure a queryForList method template.
* A method template is a string with three substitution
- * markers that ibator will fill in when generating code. The
+ * markers that Ibator will fill in when generating code. The
* substitution markers will be:
* <ul>
* <li>{0} - The SqlMap namespace</li>
@@ -399,7 +399,7 @@
/**
* Override this method to configure a queryForObject method template.
* A method template is a string with three substitution
- * markers that ibator will fill in when generating code. The
+ * markers that Ibator will fill in when generating code. The
* substitution markers will be:
* <ul>
* <li>{0} - The SqlMap namespace</li>
@@ -421,7 +421,7 @@
/**
* Override this method to configure an update method template.
* A method template is a string with three substitution
- * markers that ibator will fill in when generating code. The
+ * markers that Ibator will fill in when generating code. The
* substitution markers will be:
* <ul>
* <li>{0} - The SqlMap namespace</li>
@@ -443,7 +443,7 @@
/**
* Override this method to configure a delete method template.
* A method template is a string with three substitution
- * markers that ibator will fill in when generating code. The
+ * markers that Ibator will fill in when generating code. The
* substitution markers will be:
* <ul>
* <li>{0} - The SqlMap namespace</li>
Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/model/BaseModelClassGenerator.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/model/BaseModelClassGenerator.java?rev=756759&r1=756758&r2=756759&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/model/BaseModelClassGenerator.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/model/BaseModelClassGenerator.java Fri Mar 20 21:09:45 2009
@@ -56,8 +56,8 @@
field.setType(fqjt);
field.setName(property);
ibatorContext.getCommentGenerator().addFieldComment(field,
- introspectedTable.getFullyQualifiedTable(),
- introspectedColumn.getActualColumnName());
+ introspectedTable,
+ introspectedColumn);
return field;
}
@@ -72,8 +72,8 @@
method.setName(JavaBeansUtil.getSetterMethodName(property));
method.addParameter(new Parameter(fqjt, property));
ibatorContext.getCommentGenerator().addSetterComment(method,
- introspectedTable.getFullyQualifiedTable(),
- introspectedColumn.getActualColumnName());
+ introspectedTable,
+ introspectedColumn);
StringBuilder sb = new StringBuilder();
if (isTrimStringsEnabled() && introspectedColumn.isStringColumn()) {
@@ -107,8 +107,8 @@
method.setReturnType(fqjt);
method.setName(JavaBeansUtil.getGetterMethodName(property, fqjt));
ibatorContext.getCommentGenerator().addGetterComment(method,
- introspectedTable.getFullyQualifiedTable(),
- introspectedColumn.getActualColumnName());
+ introspectedTable,
+ introspectedColumn);
StringBuilder sb = new StringBuilder();
sb.append("return "); //$NON-NLS-1$
Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/model/ExampleGenerator.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/model/ExampleGenerator.java?rev=756759&r1=756758&r2=756759&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/model/ExampleGenerator.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/generator/ibatis2/model/ExampleGenerator.java Fri Mar 20 21:09:45 2009
@@ -78,7 +78,7 @@
}
}
- commentGenerator.addGeneralMethodComment(method, table);
+ commentGenerator.addGeneralMethodComment(method, introspectedTable);
topLevelClass.addMethod(method);
// add shallow copy constructor if the update by
@@ -95,7 +95,7 @@
method.addParameter(new Parameter(type, "example")); //$NON-NLS-1$
method.addBodyLine("this.orderByClause = example.orderByClause;"); //$NON-NLS-1$
method.addBodyLine("this.oredCriteria = example.oredCriteria;"); //$NON-NLS-1$
- commentGenerator.addGeneralMethodComment(method, table);
+ commentGenerator.addGeneralMethodComment(method, introspectedTable);
topLevelClass.addMethod(method);
}
@@ -104,7 +104,7 @@
field.setVisibility(JavaVisibility.PROTECTED);
field.setType(FullyQualifiedJavaType.getStringInstance());
field.setName("orderByClause"); //$NON-NLS-1$
- commentGenerator.addFieldComment(field, table);
+ commentGenerator.addFieldComment(field, introspectedTable);
topLevelClass.addField(field);
method = new Method();
@@ -113,7 +113,7 @@
method.addParameter(new Parameter(FullyQualifiedJavaType
.getStringInstance(), "orderByClause")); //$NON-NLS-1$
method.addBodyLine("this.orderByClause = orderByClause;"); //$NON-NLS-1$
- commentGenerator.addGeneralMethodComment(method, table);
+ commentGenerator.addGeneralMethodComment(method, introspectedTable);
topLevelClass.addMethod(method);
method = new Method();
@@ -121,7 +121,7 @@
method.setReturnType(FullyQualifiedJavaType.getStringInstance());
method.setName("getOrderByClause"); //$NON-NLS-1$
method.addBodyLine("return orderByClause;"); //$NON-NLS-1$
- commentGenerator.addGeneralMethodComment(method, table);
+ commentGenerator.addGeneralMethodComment(method, introspectedTable);
topLevelClass.addMethod(method);
// add field and methods for the list of ored criteria
@@ -139,7 +139,7 @@
field.addSuppressTypeWarningsAnnotation();
}
field.setName("oredCriteria"); //$NON-NLS-1$
- commentGenerator.addFieldComment(field, table);
+ commentGenerator.addFieldComment(field, introspectedTable);
topLevelClass.addField(field);
method = new Method();
@@ -150,7 +150,7 @@
}
method.setName("getOredCriteria"); //$NON-NLS-1$
method.addBodyLine("return oredCriteria;"); //$NON-NLS-1$
- commentGenerator.addGeneralMethodComment(method, table);
+ commentGenerator.addGeneralMethodComment(method, introspectedTable);
topLevelClass.addMethod(method);
method = new Method();
@@ -163,7 +163,7 @@
.getCriteriaInstance(), "criteria")); //$NON-NLS-1$
method.addBodyLine("oredCriteria.add(criteria);"); //$NON-NLS-1$
- commentGenerator.addGeneralMethodComment(method, table);
+ commentGenerator.addGeneralMethodComment(method, introspectedTable);
topLevelClass.addMethod(method);
method = new Method();
@@ -178,7 +178,7 @@
method.addBodyLine("oredCriteria.add(criteria);"); //$NON-NLS-1$
method.addBodyLine("}"); //$NON-NLS-1$
method.addBodyLine("return criteria;"); //$NON-NLS-1$
- commentGenerator.addGeneralMethodComment(method, table);
+ commentGenerator.addGeneralMethodComment(method, introspectedTable);
topLevelClass.addMethod(method);
method = new Method();
@@ -187,14 +187,14 @@
method.setReturnType(FullyQualifiedJavaType.getCriteriaInstance());
method.addBodyLine("Criteria criteria = new Criteria();"); //$NON-NLS-1$
method.addBodyLine("return criteria;"); //$NON-NLS-1$
- commentGenerator.addGeneralMethodComment(method, table);
+ commentGenerator.addGeneralMethodComment(method, introspectedTable);
topLevelClass.addMethod(method);
method = new Method();
method.setVisibility(JavaVisibility.PUBLIC);
method.setName("clear"); //$NON-NLS-1$
method.addBodyLine("oredCriteria.clear();"); //$NON-NLS-1$
- commentGenerator.addGeneralMethodComment(method, table);
+ commentGenerator.addGeneralMethodComment(method, introspectedTable);
topLevelClass.addMethod(method);
// now generate the inner class that holds the AND conditions
@@ -222,7 +222,7 @@
answer.setVisibility(JavaVisibility.PUBLIC);
answer.setStatic(true);
ibatorContext.getCommentGenerator().addClassComment(answer,
- introspectedTable.getFullyQualifiedTable());
+ introspectedTable);
method = new Method();
method.setVisibility(JavaVisibility.PROTECTED);
Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/DefaultCommentGenerator.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/DefaultCommentGenerator.java?rev=756759&r1=756758&r2=756759&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/DefaultCommentGenerator.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/DefaultCommentGenerator.java Fri Mar 20 21:09:45 2009
@@ -21,6 +21,8 @@
import org.apache.ibatis.ibator.api.CommentGenerator;
import org.apache.ibatis.ibator.api.FullyQualifiedTable;
+import org.apache.ibatis.ibator.api.IntrospectedColumn;
+import org.apache.ibatis.ibator.api.IntrospectedTable;
import org.apache.ibatis.ibator.api.dom.java.CompilationUnit;
import org.apache.ibatis.ibator.api.dom.java.Field;
import org.apache.ibatis.ibator.api.dom.java.InnerClass;
@@ -49,6 +51,14 @@
suppressDate = false;
}
+ /**
+ * Method from the old version of the interface.
+ *
+ * TODO - remove in release 1.2.3
+ *
+ * @deprecated as of version 1.2.2.
+ * @see DefaultCommentGenerator#addFieldComment(Field, IntrospectedTable, IntrospectedColumn)
+ */
public void addFieldComment(Field field, FullyQualifiedTable table, String columnName) {
StringBuilder sb = new StringBuilder();
@@ -66,6 +76,14 @@
field.addJavaDocLine(" */"); //$NON-NLS-1$
}
+ /**
+ * Method from the old version of the interface.
+ *
+ * TODO - remove in release 1.2.3
+ *
+ * @deprecated as of version 1.2.2.
+ * @see DefaultCommentGenerator#addFieldComment(Field, IntrospectedTable)
+ */
public void addFieldComment(Field field, FullyQualifiedTable table) {
StringBuilder sb = new StringBuilder();
@@ -81,6 +99,14 @@
field.addJavaDocLine(" */"); //$NON-NLS-1$
}
+ /**
+ * Method from the old version of the interface.
+ *
+ * TODO - remove in release 1.2.3
+ *
+ * @deprecated as of version 1.2.2.
+ * @see DefaultCommentGenerator#addClassComment(InnerClass, IntrospectedTable)
+ */
public void addClassComment(InnerClass innerClass, FullyQualifiedTable table) {
StringBuilder sb = new StringBuilder();
@@ -96,6 +122,14 @@
innerClass.addJavaDocLine(" */"); //$NON-NLS-1$
}
+ /**
+ * Method from the old version of the interface.
+ *
+ * TODO - remove in release 1.2.3
+ *
+ * @deprecated as of version 1.2.2.
+ * @see DefaultCommentGenerator#addEnumComment(InnerEnum, IntrospectedTable)
+ */
public void addEnumComment(InnerEnum innerEnum, FullyQualifiedTable table) {
StringBuilder sb = new StringBuilder();
@@ -111,6 +145,14 @@
innerEnum.addJavaDocLine(" */"); //$NON-NLS-1$
}
+ /**
+ * Method from the old version of the interface.
+ *
+ * TODO - remove in release 1.2.3
+ *
+ * @deprecated as of version 1.2.2.
+ * @see DefaultCommentGenerator#addGetterComment(Method, IntrospectedTable, IntrospectedColumn)
+ */
public void addGetterComment(Method method, FullyQualifiedTable table, String columnName) {
StringBuilder sb = new StringBuilder();
@@ -137,6 +179,14 @@
method.addJavaDocLine(" */"); //$NON-NLS-1$
}
+ /**
+ * Method from the old version of the interface.
+ *
+ * TODO - remove in release 1.2.3
+ *
+ * @deprecated as of version 1.2.2.
+ * @see DefaultCommentGenerator#addSetterComment(Method, IntrospectedTable, IntrospectedColumn)
+ */
public void addSetterComment(Method method, FullyQualifiedTable table, String columnName) {
StringBuilder sb = new StringBuilder();
@@ -166,6 +216,14 @@
method.addJavaDocLine(" */"); //$NON-NLS-1$
}
+ /**
+ * Method from the old version of the interface.
+ *
+ * TODO - remove in release 1.2.3
+ *
+ * @deprecated as of version 1.2.2.
+ * @see DefaultCommentGenerator#addGeneralMethodComment(Method, IntrospectedTable)
+ */
public void addGeneralMethodComment(Method method, FullyQualifiedTable table) {
StringBuilder sb = new StringBuilder();
@@ -255,4 +313,44 @@
return new Date().toString();
}
}
+
+ public void addClassComment(InnerClass innerClass,
+ IntrospectedTable introspectedTable) {
+ addClassComment(innerClass, introspectedTable.getFullyQualifiedTable());
+ }
+
+ public void addEnumComment(InnerEnum innerEnum,
+ IntrospectedTable introspectedTable) {
+ addEnumComment(innerEnum, introspectedTable.getFullyQualifiedTable());
+ }
+
+ public void addFieldComment(Field field,
+ IntrospectedTable introspectedTable,
+ IntrospectedColumn introspectedColumn) {
+ addFieldComment(field, introspectedTable.getFullyQualifiedTable(),
+ introspectedColumn.getActualColumnName());
+ }
+
+ public void addFieldComment(Field field, IntrospectedTable introspectedTable) {
+ addFieldComment(field, introspectedTable.getFullyQualifiedTable());
+ }
+
+ public void addGeneralMethodComment(Method method,
+ IntrospectedTable introspectedTable) {
+ addGeneralMethodComment(method, introspectedTable.getFullyQualifiedTable());
+ }
+
+ public void addGetterComment(Method method,
+ IntrospectedTable introspectedTable,
+ IntrospectedColumn introspectedColumn) {
+ addGetterComment(method, introspectedTable.getFullyQualifiedTable(),
+ introspectedColumn.getActualColumnName());
+ }
+
+ public void addSetterComment(Method method,
+ IntrospectedTable introspectedTable,
+ IntrospectedColumn introspectedColumn) {
+ addSetterComment(method, introspectedTable.getFullyQualifiedTable(),
+ introspectedColumn.getActualColumnName());
+ }
}
Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/IbatorObjectFactory.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/IbatorObjectFactory.java?rev=756759&r1=756758&r2=756759&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/IbatorObjectFactory.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/IbatorObjectFactory.java Fri Mar 20 21:09:45 2009
@@ -35,7 +35,7 @@
import org.apache.ibatis.ibator.internal.util.messages.Messages;
/**
- * This class creates the different configurable ibator generators
+ * This class creates the different configurable Ibator generators
*
* @author Jeff Butler
*/
Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/XmlFileMergerJaxp.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/XmlFileMergerJaxp.java?rev=756759&r1=756758&r2=756759&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/XmlFileMergerJaxp.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/XmlFileMergerJaxp.java Fri Mar 20 21:09:45 2009
@@ -111,8 +111,8 @@
existingRootElement.setAttribute(node.getNodeName(), node.getNodeValue());
}
- // remove the old ibator generated elements and any
- // white space before the old ibator nodes
+ // remove the old Ibator generated elements and any
+ // white space before the old Ibator nodes
List<Node> nodesToDelete = new ArrayList<Node>();
NodeList children = existingRootElement.getChildNodes();
int length = children.getLength();
@@ -129,7 +129,7 @@
existingRootElement.removeChild(node);
}
- // add the new ibator generated elements
+ // add the new Ibator generated elements
children = newRootElement.getChildNodes();
length = children.getLength();
Node firstChild = existingRootElement.getFirstChild();
Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/db/DatabaseIntrospector.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/db/DatabaseIntrospector.java?rev=756759&r1=756758&r2=756759&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/db/DatabaseIntrospector.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/internal/db/DatabaseIntrospector.java Fri Mar 20 21:09:45 2009
@@ -442,6 +442,7 @@
introspectedColumn.setActualColumnName(rs.getString("COLUMN_NAME")); //$NON-NLS-1$
introspectedColumn.setNullable(rs.getInt("NULLABLE") == DatabaseMetaData.columnNullable); //$NON-NLS-1$
introspectedColumn.setScale(rs.getInt("DECIMAL_DIGITS")); //$NON-NLS-1$
+ introspectedColumn.setRemarks(rs.getString("REMARKS")); //$NON-NLS-1$
ActualTableName atn = new ActualTableName(rs.getString("TABLE_CAT"), //$NON-NLS-1$
rs.getString("TABLE_SCHEM"), //$NON-NLS-1$
Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/EqualsHashCodePlugin.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/EqualsHashCodePlugin.java?rev=756759&r1=756758&r2=756759&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/EqualsHashCodePlugin.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/EqualsHashCodePlugin.java Fri Mar 20 21:09:45 2009
@@ -101,7 +101,7 @@
* <p>
* The generated <tt>equals</tt> method will be correct unless:
* <ul>
- * <li>Other fields have been added to the ibator generated classes</li>
+ * <li>Other fields have been added to the Ibator generated classes</li>
* <li>A <tt>rootClass</tt> is specified that holds state</li>
* </ul>
*
@@ -125,7 +125,7 @@
}
ibatorContext.getCommentGenerator().addGeneralMethodComment(method,
- introspectedTable.getFullyQualifiedTable());
+ introspectedTable);
method.addBodyLine("if (this == that) {"); //$NON-NLS-1$
method.addBodyLine("return true;"); //$NON-NLS-1$
@@ -217,7 +217,7 @@
}
ibatorContext.getCommentGenerator().addGeneralMethodComment(method,
- introspectedTable.getFullyQualifiedTable());
+ introspectedTable);
method.addBodyLine("int hash = 23;"); //$NON-NLS-1$
Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SerializablePlugin.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SerializablePlugin.java?rev=756759&r1=756758&r2=756759&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SerializablePlugin.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SerializablePlugin.java Fri Mar 20 21:09:45 2009
@@ -17,7 +17,6 @@
import java.util.List;
-import org.apache.ibatis.ibator.api.FullyQualifiedTable;
import org.apache.ibatis.ibator.api.IbatorPluginAdapter;
import org.apache.ibatis.ibator.api.IntrospectedTable;
import org.apache.ibatis.ibator.api.dom.java.Field;
@@ -55,23 +54,23 @@
@Override
public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
- makeSerializable(topLevelClass, introspectedTable.getFullyQualifiedTable());
+ makeSerializable(topLevelClass, introspectedTable);
return true;
}
@Override
public boolean modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
- makeSerializable(topLevelClass, introspectedTable.getFullyQualifiedTable());
+ makeSerializable(topLevelClass, introspectedTable);
return true;
}
@Override
public boolean modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
- makeSerializable(topLevelClass, introspectedTable.getFullyQualifiedTable());
+ makeSerializable(topLevelClass, introspectedTable);
return true;
}
- protected void makeSerializable(TopLevelClass topLevelClass, FullyQualifiedTable table) {
+ protected void makeSerializable(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
topLevelClass.addImportedType(serializable);
topLevelClass.addSuperInterface(serializable);
@@ -82,7 +81,7 @@
field.setStatic(true);
field.setType(new FullyQualifiedJavaType("long")); //$NON-NLS-1$
field.setVisibility(JavaVisibility.PRIVATE);
- ibatorContext.getCommentGenerator().addFieldComment(field, table);
+ ibatorContext.getCommentGenerator().addFieldComment(field, introspectedTable);
topLevelClass.addField(field);
}
Modified: ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SqlMapConfigPlugin.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SqlMapConfigPlugin.java?rev=756759&r1=756758&r2=756759&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SqlMapConfigPlugin.java (original)
+++ ibatis/trunk/java/tools/ibator/core/src/org/apache/ibatis/ibator/plugins/SqlMapConfigPlugin.java Fri Mar 20 21:09:45 2009
@@ -129,7 +129,7 @@
/*
* This method collects the name of every SqlMap file generated
- * by ibator in this context.
+ * by Ibator in this context.
*/
@Override
public boolean sqlMapGenerated(GeneratedXmlFile sqlMap, IntrospectedTable introspectedTable) {