[
https://issues.apache.org/jira/browse/TUSCANY-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518904
]
Amita Vadhavkar commented on TUSCANY-1465:
------------------------------------------
1) The way ResultDescriptor can be replaced on a Command is thru set method.
And in this, I am
replacing the resultSetShape for the Command (way to notify) as well. In
forming ResultSetShape,
the list gets sorted. So the sorting will happen once for each new call to
setResultDescriptor().
So, where will be the problem?
2) Done. (always return a new ArrayList from sorter)
3) ResultDescriptor is generated code, so directly can not add comparable
interface to it.
Another way will be extend ResultDescriptor implement Comparable in this
extension and
use this as wrapper over ResultDescriptor internal to DAS. But as the present
requirement
is just a simple sorting of index, avoided it and used directly
ResultDescriptor. Any suggestion?
4) renamed to set/getResultDescriptors(). Also added
addResultDescriptor(ResultDescriptor),
removeResultDescriptor(ResultDescriptor), and getResultDescriptor(int) and used
in a test case.
Please see below, if it looks OK, so I will submit patch based on this.
/**
* Add/replace based on index (>=0)embedded in resultDescriptor else add at
end
* @param resultDescriptor
*/
void addResultDescriptor(ResultDescriptor resultDescriptor);
/**
* remove ResultDescriptor at given index(>=0) and return same. If not
* present return null. For -ve index, return null
* @param index
* @return
*/
ResultDescriptor removeResultDescriptor(int index);
/**
* Remove resultDescriptor only if matched for index(>=0), name, type,
schema
* name and table name and return same, else return null For -ve index,
ignore
* index and if unique match for rest of the attriutes, remove/return, if
multiple
* matches found, throw RuntimeException
* @param resultDescriptor
* @return
*/
ResultDescriptor removeResultDescriptor(ResultDescriptor resultDescriptor);
/**
* Return resultDescriptor if exact match for index(>=0) found
* else return null;
*
* @param index
* @return
*/
ResultDescriptor getResultDescriptor(int index);
5) List<Type> , is JDK5 feature and recently we resolved JIRA-1237 to ensure
compatibility with JDK1.4
so avoided use of JDK5.
6) The test fail is the test case code problem ..please see..from 1464 last
comment -
{............I took a clean base from trunk and applied 1464 and 1465 to it.
The problem was in the test cases of 1465 and I am creating new patch for it.
(As 1464 is now catching absence of PK from select, the 2 cases were failing in
1465, as in converter
column name should match table (dbms) column name and can not be aby arbitrary
names)
.............}
> Allow passing ResultDescriptor for dynamic Commands
> ---------------------------------------------------
>
> Key: TUSCANY-1465
> URL: https://issues.apache.org/jira/browse/TUSCANY-1465
> Project: Tuscany
> Issue Type: Bug
> Components: Java DAS RDB
> Affects Versions: Java-DAS-Next
> Reporter: Amita Vadhavkar
> Assignee: Amita Vadhavkar
> Fix For: Java-DAS-Next
>
> Attachments: 1465.patch
>
>
> http://www.mail-archive.com/[email protected]/msg19886.html
> Action for the issue discussed in above mail.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]