-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Where to start creating EntityPOJOClass classes
PostPosted: Fri May 25, 2007 7:09 am 
Newbie

Joined: Sun Apr 15, 2007 4:29 pm
Posts: 7
Hi all,

I want to create a POJOClass from a String like "Person=name;String;10"
It is only an instance. It means that I have a Person POJO and it has a field. The name of the field is "name", type is "String" and length is "10". After that I will use the hibernate tools to generate the code using the POJOClass I created. In other words, I don't want to read from a POJO or database to create the "POJOClass"s :) I want to read from a single string like above.

Can you show me where to start creating a EntityPOJOClass.

Note: I want to do this to add some extra information to keep in EntityPOJOClass (for example ResourceBundle for the bean. So I will create a fully web application. (Maybe I can add a List to the EntityPOJOClass for each language to support localization)). I hope I explained what I need well.

Further Example:
"Person=name;String;10;[bundle_in_en,bundle_in_fr]". So I can read this String, to be able to get the ResourceBundles for the POJO,too.

public class MyEntityPOJOClass extends EntityPOJOClass{
Map bundleMap=new HashMap();

public void addToBundleMap(String language,String name){
bundleMap.put(language,name);
}
// now in my "ftl" templates i can use the bundleMap.
.....
}

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 25, 2007 11:41 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
why not just have a separate tool class that reads some file with the additonal info ?

see http://www.hibernate.org/hib_docs/tools ... e/#d0e1374

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 28, 2007 3:38 am 
Newbie

Joined: Sun Apr 15, 2007 4:29 pm
Posts: 7
It is another option and I will make a separate tool for this. But I want to read excel files to create my POJOs (And also persistance classes). I know there are a lot of versions, from db, annotated classes or xml files. And I want to add a new one with reading Excel files.

Maybe creating an "xml" file from excel and creating POJOs with the existing tools would be the better. I just need to hear what will you do to make this work.

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 28, 2007 5:51 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
read excel files to create pojo's ?! That'a *new* one ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.