Examples of UAuthorTypeRecord


Examples of org.jooq.test.oracle.generatedclasses.test.udt.records.UAuthorTypeRecord

    }

    @Test
    public void testOracleMemberProcedures() throws Exception {
        UAuthorTypeRecord author1;
        UAuthorTypeRecord author2;

        // Unattached:
        author1 = new UAuthorTypeRecord();
        author1.setId(1);
        author2 = load(ora(), author1);
        assertEquals(1, (int) author1.getId());
        assertEquals(1, (int) author2.getId());
        assertNull(author1.getFirstName());
        assertEquals("George", author2.getFirstName());
        assertNull(author1.getLastName());
        assertEquals("Orwell", author2.getLastName());

        // Attached
        author1 = ora().newRecord(U_AUTHOR_TYPE);
        author1.setId(1);
        author2 = author1.load();
        assertEquals(1, (int) author1.getId());
        assertEquals(1, (int) author2.getId());
        assertEquals("George", author1.getFirstName());
        assertEquals("George", author2.getFirstName());
        assertEquals("Orwell", author1.getLastName());
        assertEquals("Orwell", author2.getLastName());

        // Count books
        author1 = ora().newRecord(U_AUTHOR_TYPE);
        assertEquals(BigDecimal.ZERO, author1.countBooks());
        assertEquals(BigDecimal.ZERO, ora().select(countBooks(author1)).fetchOne(0));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.