You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ka...@apache.org on 2012/11/28 15:16:33 UTC
svn commit: r1414718 - in /db/derby/code/trunk/java/engine/org/apache/derby:
iapi/types/TypeId.java impl/sql/catalog/SystemColumnImpl.java
impl/sql/compile/ResultColumnList.java
impl/sql/compile/StaticMethodCallNode.java
Author: kahatlen
Date: Wed Nov 28 14:16:31 2012
New Revision: 1414718
URL: http://svn.apache.org/viewvc?rev=1414718&view=rev
Log:
DERBY-6003: Create row templates outside of the generated code
Initial cleanup: Remove unused field from TypeId, and remove the
corresponding parameter from the constructor.
Modified:
db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java
db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SystemColumnImpl.java
db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java
db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java
Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java?rev=1414718&r1=1414717&r2=1414718&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java Wed Nov 28 14:16:31 2012
@@ -417,13 +417,12 @@ public final class TypeId
}
}
- public static TypeId getUserDefinedTypeId(String className, boolean delimitedIdentifier)
- throws StandardException
- {
- return new TypeId(StoredFormatIds.USERDEFINED_TYPE_ID_V3,
- new UserDefinedTypeIdImpl(className), delimitedIdentifier
- );
- }
+ public static TypeId getUserDefinedTypeId(String className)
+ throws StandardException
+ {
+ return new TypeId(StoredFormatIds.USERDEFINED_TYPE_ID_V3,
+ new UserDefinedTypeIdImpl(className));
+ }
/**
* This factory method is used for ANSI UDTs. If the className argument is null,
@@ -546,7 +545,7 @@ public final class TypeId
** It's a non-primitive type (a class) that does not correspond
** to a SQL built-in type, so treat it as a user-defined type.
*/
- return TypeId.getUserDefinedTypeId(javaTypeName, false);
+ return TypeId.getUserDefinedTypeId(javaTypeName);
}
}
@@ -666,7 +665,6 @@ public final class TypeId
private int formatId;
/* Set in setTypeIdSpecificInstanceVariables() as needed */
- private boolean classNameWasDelimitedIdentifier;
private boolean isBitTypeId;
private boolean isLOBTypeId;
private boolean isBooleanTypeId;
@@ -698,22 +696,6 @@ public final class TypeId
this.baseTypeId = baseTypeId;
setTypeIdSpecificInstanceVariables();
}
- /**
- * Constructor for a TypeId for user defined types
- *
- * @param formatId Format id of specific type id.
- * @param baseTypeId The Base type id
- * @param classNameWasDelimitedIdentifier Whether or not the class name
- * was a delimited identifier
- */
- public TypeId(int formatId, BaseTypeIdImpl baseTypeId,
- boolean classNameWasDelimitedIdentifier)
- {
- this.formatId = formatId;
- this.baseTypeId = baseTypeId;
- this.classNameWasDelimitedIdentifier = classNameWasDelimitedIdentifier;
- setTypeIdSpecificInstanceVariables();
- }
/**
* we want equals to say if these are the same type id or not.
@@ -1017,17 +999,6 @@ public final class TypeId
}
/**
- * For user types, tell whether or not the class name was a
- * delimited identifier. For all other types, return false.
- *
- * @return Whether or not the class name was a delimited identifier.
- */
- public boolean getClassNameWasDelimitedIdentifier()
- {
- return classNameWasDelimitedIdentifier;
- }
-
- /**
* Does this TypeId represent a TypeId for a StringDataType.
*
* @return Whether or not this TypeId represents a TypeId for a StringDataType.
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SystemColumnImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SystemColumnImpl.java?rev=1414718&r1=1414717&r2=1414718&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SystemColumnImpl.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/catalog/SystemColumnImpl.java Wed Nov 28 14:16:31 2012
@@ -134,7 +134,7 @@ class SystemColumnImpl implements System
throws StandardException
{
- TypeId typeId = TypeId.getUserDefinedTypeId(javaClassName, false);
+ TypeId typeId = TypeId.getUserDefinedTypeId(javaClassName);
DataTypeDescriptor dtd = new DataTypeDescriptor(typeId, nullability);
return new SystemColumnImpl(name, dtd);
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java?rev=1414718&r1=1414717&r2=1414718&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java Wed Nov 28 14:16:31 2012
@@ -3542,7 +3542,8 @@ public class ResultColumnList extends Qu
case Types.JAVA_OBJECT:
case Types.OTHER:
{
- cti = TypeId.getUserDefinedTypeId(rsmd.getColumnTypeName(index), false);
+ cti = TypeId.getUserDefinedTypeId(
+ rsmd.getColumnTypeName(index));
break;
}
default:
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java?rev=1414718&r1=1414717&r2=1414718&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/StaticMethodCallNode.java Wed Nov 28 14:16:31 2012
@@ -505,7 +505,7 @@ public class StaticMethodCallNode extend
break;
}
- typeId = TypeId.getUserDefinedTypeId(arrayType, false);
+ typeId = TypeId.getUserDefinedTypeId(arrayType);
}
// this is the type descriptor of the require method parameter
@@ -665,10 +665,8 @@ public class StaticMethodCallNode extend
if (sigParameterCount != parameterCount) {
- TypeId typeId = TypeId.getUserDefinedTypeId("java.sql.ResultSet[]", false);
-
DataTypeDescriptor dtd = new DataTypeDescriptor(
- typeId,
+ TypeId.getUserDefinedTypeId("java.sql.ResultSet[]"),
0,
0,
false,