File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Getting column names from the table name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Getting column names from the table name" Watch "Getting column names from the table name" New topic

Getting column names from the table name

Vijay Tidake
Ranch Hand

Joined: Nov 04, 2008
Posts: 146


I want to use the expandable table in UI.

For that when user select table name I want to know the column names to show up them in the UI table.

Currently I am using the Hibernate.So I wanted to know that how to get column metadata from the table name.


The important thing is not to stop questioning.Curiosity has its own reason for existing.
Mahesh Panchananam

Joined: Jun 30, 2011
Posts: 18
The simple way I can suggest is define properties in the POJO properly and convert the text to upper case for the UI purpose.
I am not sure whether there is any way to get the names of columns, even if there is a way, dont apply that unnecessarily.

Mahesh PS
I agree. Here's the link:
subject: Getting column names from the table name
It's not a secret anymore!