Package com.shoesobjects

Examples of com.shoesobjects.MyRecord


        super.tearDown();
        dao = null;
    }

    public void testSaveRecord() throws Exception {
        record = new MyRecord();
        record.setFirstName("Rod");
        record.setLastName("Johnson");
        dao.saveRecord(record);
        Assert.assertNotNull("primary key assigned", record.getId());
    }
View Full Code Here


        return session;
    }

    public MyRecord getRecord(Long id) {
        Session session = this.getSession();
        MyRecord record = null;
        try {
            record = (MyRecord) session.load(MyRecord.class, id);
        } catch (HibernateException e) {
            e.printStackTrace();
        } finally {
View Full Code Here

    }

    public void removeRecord(Long id) {
        Session session = this.getSession();
        try {
            MyRecord record = (MyRecord) session.load(MyRecord.class, id);
            session.delete(record);
            session.flush();
        } catch (HibernateException e) {
            e.printStackTrace();
        } finally {
View Full Code Here

TOP

Related Classes of com.shoesobjects.MyRecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.