This came up before, and here is the rationale. If you add an app specific data object to Column, you have to add another parameterized type to Column. That's more verbose, somewhat confusing, and it will be Void for most users anyway. I'm a big fan of parameterized types because they make the API feels more bulletproof, but I also think parameterized types can be cumbersome if they aren't intended to support the most common use cases.
Subclassing Column is good option if you need a lot of app specific data. Yes you have to cast it, but who cares if you're in control of which columns go into your table. In the original design, we envisioned people subclassing Column for app specific data. So, now we're special casing the data store field as a string. But MANY databases use String names to describe columns, and its just so convenient to have that field accessible from the Column itself. I've seen more than a few requests for this feature. If you are using an SQL database, this will probably come in handy. If you don't need it, don't use it, and the compiler should compile it out. On 2011/08/02 20:13:12, rjrjr wrote:
It's John L's call, but that's certainly my preference.
On Tue, Aug 2, 2011 at 1:10 PM, John Porter Simons
<porte...@google.com>wrote:
> The other way we (me and dramos@) discussed doing this was, in our > CellTable subclass, have a map from Column to String to store these
database
> column names. I can update to that and revert this if you like. > > > On Tue, Aug 2, 2011 at 1:01 PM, Ray Ryan <mailto:rj...@google.com>
wrote:
> >> I was biting my tongue on this one, but I guess I'll jump in and
agree,
>> this smells bad. >> >> @jlabanca, is there no hook in Column or maybe Cell.Context where
this
>> kind of app-specific data can be added? >> >> On Tue, Aug 2, 2011 at 12:32 PM, Jeff Larsen
<mailto:larse...@gmail.com> wrote:
>> >>> I'm inclined to agree with Stephen here. No where else in GWT
widgetry
>>> is there a reference to database related things. I don't think
this is a big
>>> deal either, but it seems like a more application specific thing
rather than
>>> something that belongs inside GWT proper. >>> >>> -- >>> http://groups.google.com/group/Google-Web-Toolkit-Contributors >>> >> >> >
http://gwt-code-reviews.appspot.com/1503806/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors