Fork me on GitHub

n. Slang a rough lawless young Kuali developer.
[perhaps variant of Houlihan, Irish surname]
kualiganism n

Blog of an rSmart Java Developer. Full of code examples, solutions, best practices, et al.

Tuesday, February 19, 2013

Simple Generic Cast Method for Rice


As things are now, if one wants to cast a Document or BusinessObject to access a method, one has to do something like:

This is a pretty ugly way to handle casting. It's also difficult to read. The added parenthesis make it difficult to determine what type the method is being executed on.

Using generics, it's possible to add a method to the in KRAD which will make casting much nicer.

Here's what I did

I added a new cast() method to the

The result is a new class that looks like:

Now I can cast objects like this:

The result is a much cleaner cast that is easier to read. At least, it is to me. I'll leave it up to you whether you think it is easier or not. I know what you're thinking. "This should be in Object!!" Agreed. It should be.

Sunday, February 3, 2013

Kuali Rice Possibly Switching to GitHub

Many have asked again and again whether Kuali will use Git. Looks like formal discussions as to what is technically involved in switching and how Rice will be impacted by Git are underway. Not just Git either, but GitHub. See more details here: Moving from svn to git