Experimenter o = (Experimenter) session.get(Experimenter.class, new Integer(1)); if (o == null) { o = new Experimenter(); o.setOmeName("test"); session.save(o); }
Experimenter e = new Experimenter(); e.setOmeName("test"); session.save(e);
            public Object doInHibernate(org.hibernate.Session session)                    throws org.hibernate.HibernateException,                    java.sql.SQLException            {                Experimenter o = (Experimenter) session.get(Experimenter.class, new Integer(1));                if (o == null)                {                    o = new Experimenter();                    o.setOmeName("test");                    session.save(o);                }                                   Event e = (Event) session.get(Event.class, new Integer(1));                if (e == null)                {                    e = new Event();                    e.setName("test");                    session.save(e);                }                                   ome.model.core.Pixels p = new ome.model.core.Pixels();                p.setSizeX(new Integer(1));                p.setSizeY(new Integer(1));                p.setSizeZ(new Integer(1));                p.setSizeC(new Integer(1));                p.setSizeT(new Integer(1));                p.setSha1("09bc7b2dcc9a510f4ab3a40c47f7a4cb77954356");  // "pixels"                p.setBigEndian(Boolean.TRUE);                                p.setCreationEvent(e);                p.setOwner(o);                                session.save(p);                return null;            };