-->
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.  [ 5 posts ] 
Author Message
 Post subject: How to abreviate fully qualified class names
PostPosted: Fri Dec 12, 2003 7:51 am 
Newbie

Joined: Mon Dec 08, 2003 1:44 pm
Posts: 16
Location: Germany
Hello!

Is there a possibility to abreviate fully qualified class names used in the <class> and <subclass>-Tag?

I have for instance two packages:

org.openuss.group.specification.business.*
org.openuss.group.business.entity.*

The wildcard ("*") then is used to specify the concrete class name, i. e. "org.openuss.group.specification.busniess.MyClass".

Now I'd like to have the packages mentioned above somehow "imported" or I'd like to use a variable in which I can store the package name, so that I can shorten the name to something like this: "variable.MyClass".

Does their exist a solution?

Best thanks in advance!

Philipp Hinnah


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 12, 2003 8:04 am 
Newbie

Joined: Fri Dec 12, 2003 7:50 am
Posts: 3
Location: London
Take a look at 5.1.16 import from
http://www.hibernate.org/hib_docs/reference/html/or-mapping.html
This might help, depending on exactly what you want.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 12, 2003 8:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
No, this is not possible. We *could* introduce a <package> element, I suppose. Would this be popular?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 12, 2003 8:26 am 
Newbie

Joined: Mon Dec 08, 2003 1:44 pm
Posts: 16
Location: Germany
Quote:
No, this is not possible. We *could* introduce a <package> element, I suppose. Would this be popular?


Thanks for the fast help!
In my opinion a <package> element might reduce paperwork and it also makes the code more clear.

Philipp Hinnah


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 12, 2003 8:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Yeah, actually I never liked all the fully qualified classnames, for a long time. But no-one ever asked for that to be changed before and it *does* help if you use auto-refactoring tools.

But I think it might be nice to just add a package attribute to <hibernate-mapping> that would apply to any unqualified classnames.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.