Ticket #484 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Topaz should be able to handle predicates with Class type of Set<T>.

Reported by: amit Assigned to: pradeep
Priority: critical Milestone:
Component: topaz Version: 0.7
Keywords: generics topaz Cc:
Blocking: Blocked By:

Description

Generics are really quite useful and it would be good if we provide support for them. Currently Topaz support <T>, but not Set<T>.

Dependency Graph

Change History

(follow-up: ↓ 2 ) 07/13/07 01:23:17 changed by ronald

I don't think OTM actually handles a field of a generic type - you can declare it, but I don't think it'll persist/load properly because it's effectively of type java.lang.Object . For the same reason I don't think we can support Set<T> because we'd have to resolve T "by hand" for every class that references the parameterized class (and we'd also have to keep multiple class-metadata's, one for each reference with a specific type).

(in reply to: ↑ 1 ) 07/13/07 14:29:47 changed by pradeep

Replying to ronald:

Amit's intend here was that Set<T> should be parsed same as Set of Objects. Same way as T is parsed as an Object.

On writes everything is fine. On reads, more than the declared type, what OTM will go by is the rdf:type of the object found. If there were no rdf:type, then the value will be null.

So there is limited support for parameterized types as long as it has an rdf:type and OTM is able to resolve a class from the SessionFactory? during loading.

07/13/07 14:39:08 changed by pradeep

  • status changed from new to closed.
  • resolution set to fixed.

(In [3176]) Make sure we don't barf on Collection<T> generics syntax.

Closes #484.

08/07/07 16:25:51 changed by

  • milestone deleted.

Milestone Bugs deleted