You totally can!
I 'personally' like the extra call to getContent() (standard JDK) and then getText() (Groovy JDK InputStream) since it makes reading the code a bit easier for those who haven't memorized a lot of the Groovy JDK yet. I think many developers, myself included, seeing Url.getText() would think that it returns the url itself as a string.
Double Brace initialization is great for readability in my opinion. It allows the eyes to note that an object has been allocated and instantiated, then skip over configuration of the object until it's needed.
You can abstract away the resultTransformer by specifying uniqueResult: true
:
def objs = Model.withCriteria(uniqueResult: true) { ... }
Awesome, I'll take a look at it. Although <tab> for completion might be a bit for me to get used to. I come from a heavy IDE background so <C-Space> is where my muscle memory is at.
I've always wondered the pros and cons of Command-T vs Ctrl-P plugins.
Why have the extra method for address? Just rename c1 to address.
@joni Thats great. Just added it. Thanks.