For example I have business data object Cup.
I can define it on Groovy script easily.
def new_cup = new Cup();
new_cup.name = "Tiny Cup";
new_cup.description = "Nice tiny cup";
new_cup.ownerId = 5;
But how I can store it into database programmatically now?