Yup. Whatever works is fine with me. My intent with this particular set of changes was to get Workflows prepped for persistence. If and when you make method/signature changes on WikiPage, the refactoring will be easy.
On Mon, Apr 6, 2009 at 10:09 AM, Janne Jalkanen <[email protected]> wrote: > From WikiPage > >> - public Object getAttribute( String key ); >> + public Serializable getAttribute( String key ); > > I'm sort of leaning towards getting rid of these generic methods and having > something like > > Date getDateAttribute(String key) > Long getLongAttribute(String key) > String getAttribute(String key) > > And vice versa > > void setAttribute(String key, Date value) > > This allows us to make some basic automatic translations (e.g you can > still get a Long attribute as a String, it'll just be the result of > Long.toString()) but most of all, it gets rid of annoying casting > needs and ClassCastExceptions. > >> - public Map getAttributes(); >> + public Map<String,Serializable> getAttributes(); > > This I am hoping to get rid of soon. With the very large attributes > we will be seeing, this is just not a feasible API. > > /Janne >
