"Select or create" from database, in Java
===

I've done all my database development for the past few years in Ruby, mostly using ActiveRecord.  Now I'm stuck using Java for a project, and it feels **so** verbose and hamfisted, I'm wondering if I'm doing things wrong.

In an ORM paradigm, if I want to insert into related tables, I'd so something like

    # Joe Bob got a new car
    p = Person.find_or_create_by_name("Joe Bob");
    Car.new({:make=>"Toyota", :plate=>"ABC 123", :owner=>p});

In Java, at least using JDBC directly, I'm going to have to do the Person lookup by hand, insert if it doesn't exist, then create the Car entry.

Of course, in real life, it's more than just 2 tables and the pain scales exponentially.  Surely there's a better way?