This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 156304 - MetadataElementHandle doesn't support Value type
Summary: MetadataElementHandle doesn't support Value type
Alias: None
Product: db
Classification: Unclassified
Component: DB schema (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jaroslav Havlin
Depends on:
Blocks: 155714
  Show dependency tree
Reported: 2009-01-05 19:24 UTC by Rob Englander
Modified: 2013-02-23 04:13 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

proposed patch v1 (40.30 KB, patch)
2012-10-21 14:52 UTC, matthias42
Details | Diff
Proposed Patch v2 (44.77 KB, patch)
2013-02-12 10:01 UTC, Jaroslav Havlin
Details | Diff
Proposed Patch v3 (44.82 KB, patch)
2013-02-12 15:53 UTC, Jaroslav Havlin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Englander 2009-01-05 19:24:33 UTC
The MetadataElementHandle doesn't support Value type.
Comment 1 David Vancouvering 2009-01-05 19:42:04 UTC
Sorry, I don't understand this.  Can you provide some more background to help me understand?  Thanks.
Comment 2 Rob Englander 2009-01-05 19:54:06 UTC
MetadataElementHandle is missing code for resolving Value handles.  There is no "Kind" for 

So, for instance, I can't create a handle to the Value instance I get back from calling
Comment 3 David Vancouvering 2009-01-05 20:10:24 UTC
OK, got it, thanks.
Comment 4 matthias42 2012-10-21 14:52:44 UTC
Created attachment 126262 [details]
proposed patch v1

The attached bug fixes this problem at the cost of an api breach.

I was not able to create a procedure in derby that returns a value, so I looked at functions, which by definition return a value. I extended the metadata to include functions and added a resolve-method for functions and returnvalues to the MetadataElementHandle.

I extended the unittest to verify resolving handles for parameters, functions, procedures and returnValues.

Please have a look at it (i wouldn't consider it for 7.3!)
Comment 5 Jaroslav Havlin 2013-02-12 10:01:17 UTC
Created attachment 131279 [details]
Proposed Patch v2

Updating Matthias's patch (increased version number, added @since tags).

Thank you very much for providing the patch.
Comment 6 Jaroslav Havlin 2013-02-12 10:05:29 UTC
Please review changes in module db.metadata.model.

The module API is not public (friend private), so the API review 
is not mandatory, but if you are interested, please check it.

Thank you.

API Changes (under org.netbeans.modules.db.metadata.model):

New classes:


New methods:

api.Schema.getFunction(String name)
spi.SchemaImplementation.getFunction(String name)

Changed methods (incompatible API changes):
(return type changed from api.Procedure to api.MetadataElement)

Comment 7 Jaroslav Tulach 2013-02-12 12:01:13 UTC
Y01a If the change is incompatible, it is better to increase the major version (the one after /). That will prevent linkage errors (old client w/ new API).

Y01b Alternatively consider keeping compatibility by adding new method getEnclosingElement() and deprecating getParent (while keeping its behavior in previously existing situations).
Comment 8 Jaroslav Havlin 2013-02-12 15:53:25 UTC
Created attachment 131302 [details]
Proposed Patch v3

Y01 - I think a) is fine in this case. Specification version changed to 1.0.
      Thank you.
Comment 9 Jaroslav Havlin 2013-02-19 09:09:57 UTC
Unless there are any objections, I'll integrate tomorrow.
Thank you.
Comment 10 Jaroslav Havlin 2013-02-20 16:16:17 UTC
Integrated as
Comment 11 Quality Engineering 2013-02-23 04:13:17 UTC
Integrated into 'main-golden', will be available in build *201302222300* on (upload may still be in progress)
User: Jaroslav Havlin <>
Log: #156304: MetadataElementHandle doesn't support Value type