Re: Writers block on complex object model
- From: Lew <lew@xxxxxxxxxxxxx>
- Date: Mon, 05 Nov 2007 16:53:09 -0500
Phy6 wrote:
Hi, I am trying to find an easily extended way to write compose
concrete objects for my application.
The objects I am using are all things (nouns) like Customer, Database,
Shop, Task, Year, etc. etc. LOTS of classes like this.
I have GUI components (Tapestry) that display messages regarding the
object or objects.
I want to be able to do something like Customer.plural to get the
String "Customers". I'd like these conjugates available statically,
so no instance is needed (In case the object is null)
I have 4 conjugates for each noun: singular, plural, singular
possessive, plural possessive.
How about a ResourceBundle that defines each of those four names off a key for each class? The class can look up its plurals and possessives for display purposes.
bundle.getString( Task.getPluralPossessiveKey() )
--
Lew
.
- References:
- Writers block on complex object model
- From: Phy6
- Writers block on complex object model
- Prev by Date: Re: Java performance
- Next by Date: Re: Why is the main() of Java void ?
- Previous by thread: Re: Writers block on complex object model
- Next by thread: how to create intelligent invoker :)
- Index(es):
Relevant Pages
|
Loading