Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Table properties
Table properties [message #658158] Mon, 07 March 2011 08:28 Go to next message
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 61
Registered: February 2011
Member
Hello all.
How can i retrieve table attributes, like column count, column type and so on in my table model?
Re: Table properties [message #658267 is a reply to message #658158] Mon, 07 March 2011 15:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30541
Registered: July 2009
Senior Member
Alex,

I'm supposed to guess what a table model is?


Alex wrote:
> Hello all.
> How can i retrieve table attributes, like column count, column type
> and so on in my table model?
Re: Table properties [message #658277 is a reply to message #658267] Mon, 07 March 2011 16:55 Go to previous messageGo to next message
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 61
Registered: February 2011
Member
I want to use teneo hibernate factory with my swing jtable component. In jtable i use abstracttablemodel. In this model i must define table metadata, like column count, column class, row count and so on.
Re: Table properties [message #658281 is a reply to message #658277] Mon, 07 March 2011 17:12 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Alex,
The datastore has a method: getClassMappings which returns an iterator of the in-memory hibernate mapping. You need to
study the returned objects in the debugger to see what you can do with it. But you can surely find the columns.

But... I am not sure if you want to use the database model for this. The great thing of EMF is that you have the model
at hand at runtime. So column count etc. can be retrieved from the in-memory ecore model.

The rowcount is something you have to compute yourselve using a hql/jpql query.

gr. Martin

On 03/07/2011 05:55 PM, Alex wrote:
> I want to use teneo hibernate factory with my swing jtable component. In jtable i use abstracttablemodel. In this model
> i must define table metadata, like column count, column class, row count and so on.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: Table properties [message #658282 is a reply to message #658277] Mon, 07 March 2011 17:14 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30541
Registered: July 2009
Senior Member
Alex,

I think you should do a bit of homework and then ask questions when
there's enough context for them to make sense. After all, EMF generated
editor already provides a table view, but my sense is you've not looked
at that.


Alex wrote:
> I want to use teneo hibernate factory with my swing jtable component.
> In jtable i use abstracttablemodel. In this model i must define table
> metadata, like column count, column class, row count and so on.
Re: Table properties [message #658303 is a reply to message #658282] Mon, 07 March 2011 19:05 Go to previous messageGo to next message
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 61
Registered: February 2011
Member
Thank you for reply, but i can't find anywhere how can i use this stuff with swing jtable.
Re: Table properties [message #658306 is a reply to message #658303] Mon, 07 March 2011 19:15 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30541
Registered: July 2009
Senior Member
Alex,

Nor will you find stuff about swing.

You'll have to look at how things like AdapterFactoryLabelProvider and
AdapterFactoryContentProvider interface with JFace's label and content
providers to figure out how to map those same ideas to swing.


Alex wrote:
> Thank you for reply, but i can't find anywhere how can i use this
> stuff with swing jtable.
Previous Topic:Can a proxy be restored after it is resolved?
Next Topic:Data generator base on ecore
Goto Forum:
  


Current Time: Mon Oct 14 18:57:45 GMT 2019

Powered by FUDForum. Page generated in 0.01643 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top