User: dsundstrom
Date: 02/03/03 12:02:29
Modified: src/main/org/jboss/ejb/plugins/cmp/jdbc/metadata
JDBCDeclaredQueryMetaData.java
Log:
Added optional alias element to select in declared-sql for specifing the
exact alias that will be used for the main select table.
Revision Changes Path
1.11 +16 -1
jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCDeclaredQueryMetaData.java
Index: JDBCDeclaredQueryMetaData.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCDeclaredQueryMetaData.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- JDBCDeclaredQueryMetaData.java 26 Feb 2002 23:59:27 -0000 1.10
+++ JDBCDeclaredQueryMetaData.java 3 Mar 2002 20:02:29 -0000 1.11
@@ -19,7 +19,7 @@
* Imutable class contains information about a declated query.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Dain Sundstrom</a>
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.11 $
*/
public final class JDBCDeclaredQueryMetaData implements JDBCQueryMetaData {
/**
@@ -64,6 +64,10 @@
private final String fieldName;
/**
+ * The aliase that is used for the main select table.
+ */
+ private final String alias;
+ /**
* Read ahead meta data.
*/
private final JDBCReadAheadMetaData readAhead;
@@ -124,6 +128,7 @@
ejbName = null;
fieldName = null;
}
+ alias = MetaData.getOptionalChildContent(selectElement, "alias");
} else {
if(method.getName().startsWith("ejbSelect")) {
throw new DeploymentException("The select element of " +
@@ -132,6 +137,7 @@
distinct = false;
ejbName = null;
fieldName = null;
+ alias = null;
}
}
@@ -211,6 +217,15 @@
*/
public String getFieldName() {
return fieldName;
+ }
+
+ /**
+ * The alias that is used for the select table.
+ * @return the alias that is used for the table from which the entity or
+ * field is selected.
+ */
+ public String getAlias() {
+ return alias;
}
/**
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development