Adding setComment on SFieldMeta
Franck Routier <[email protected]> Thu, 01 Oct 2009 11:51:00 +0200
| Newsgroups | gmane.comp.java.orm.simpleorm |
|---|---|
| Organization | Axège Sarl |
| Message-ID | <1254390660.13754.11.camel@franck-laptop> |
Hi,
I am making heavy use of a special UserProperty on my fields to store
the field comments.
On the one side, field comments act as a default field label in the UI
(and possibly as a key for I18N), and on the other side, they can be
used to generate a COMMENT DDL to make the database more readable.
I was wondering if the community would agree to standardize on the
following:
1) create an enum for standard field properties, with only one value for
now, being SFIELD_COMMENT. (the enum would be defined in SFieldMeta
class)
2) add two methods to SFieldMeta, setComment(String comment) and
getComment(), that would call putUserProperty(SFIELD_COMMENT, comment)
and getUserProperty(SFIELD_COMMENT);
This would make the code more readable and easier to type than the
lengthy putUserProperty form.
3) maybe change the DDL generation part to create the COMMENT ON
COLUMN ... statements (optional ?)
What do you think of it ?
Franck
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/SimpleORM/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/SimpleORM/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[email protected]
mailto:[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/