Fórum

Can we create a model object for the required database table

thumbnail
Gurumurthy Godlaveeti, modificado 11 Anos atrás.

Can we create a model object for the required database table

Regular Member Postagens: 208 Data de Entrada: 12/08/11 Postagens Recentes
Hello Everybody ,
I am having one new idea but i don't exactly whether will it work or not . The concept is ...........................................


Creating a dynamic model objects to database tables . so in my requirement what i do is , i make the configuration between the tables (table names & column names also ) and my categories . so when i search that category then i can see the table names and columns also . and now i would like to create the model object for the selected tables and i have to fill the data for selected columns by creating setXXX() methods . At last i should store the data in to the proper tables .

Is it possible , if so please share those information .


Thanks .
thumbnail
Priyanka Dhingra, modificado 11 Anos atrás.

RE: Can we create a model object for the required database table

Liferay Master Postagens: 501 Data de Entrada: 20/12/11 Postagens Recentes
Hi,

Is it something different from how the conventional service builder is used???
thumbnail
Gurumurthy Godlaveeti, modificado 11 Anos atrás.

RE: Can we create a model object for the required database table

Regular Member Postagens: 208 Data de Entrada: 12/08/11 Postagens Recentes
Yes , i think it's a different because service builder is making chaining between database tables and our service layer (Model classes , [Entity]impl classes .....) . But my requirement is i want to create model class dynamically for the particular database table and then i want to fill the data into those setXXX() methods . At last i have to push that object into Database .
thumbnail
Gurumurthy Godlaveeti, modificado 11 Anos atrás.

RE: Can we create a model object for the required database table

Regular Member Postagens: 208 Data de Entrada: 12/08/11 Postagens Recentes
Hi Amit ,

First of all thanks for your reply .
The first link giving the basic information about the Pojo and how you can create the Jtable (Swing concept) objects dynamically . But i want to create the database table objects and setXXX() and getXXX() methods based the number of columns and then i want to store those pojo object into DB .
thumbnail
Priyanka Dhingra, modificado 11 Anos atrás.

RE: Can we create a model object for the required database table

Liferay Master Postagens: 501 Data de Entrada: 20/12/11 Postagens Recentes
Hi Gurumurthy Godlaveeti,
But why you want to do this??
Any specific reason?

These layers provide security to the database changes...Why you want to do it directly?
thumbnail
Gurumurthy Godlaveeti, modificado 11 Anos atrás.

RE: Can we create a model object for the required database table

Regular Member Postagens: 208 Data de Entrada: 12/08/11 Postagens Recentes
Hi Priyanka Dhingra ,

It's for my company project tools and wants to add bulk of information into configured tables . In feature the tables or columns might increase or reduce so that time also it should work with out any changes .