Package org.apache.openjpa.jdbc.meta

Examples of org.apache.openjpa.jdbc.meta.Version


        int type = table.getPrimaryKey().getColumns()[0].getType();
        assertEquals(Schemas.getJDBCName(type), Types.INTEGER, type);
    }

    public void testIndicators() {
        Version vers = _mapping.getVersion();
        assertNotNull(vers);
        assertEquals("MAPPINGTEST1", vers.getColumns()[0].getTable().
            getName().toUpperCase());
        assertEquals(Types.INTEGER, vers.getColumns()[0].getType());

        Discriminator cls = _mapping.getDiscriminator();
        assertNotNull(cls);
        assertEquals("MAPPINGTEST1", cls.getColumns()[0].getTable().
            getName().toUpperCase());
View Full Code Here


            if (dirty.get(fields[i].getIndex())
                && !bufferCustomInsert(fields[i], sm, store, customs))
                fields[i].insert(sm, store, rowMgr);
        }
        if (sup == null) {
            Version vers = mapping.getVersion();
            if (!bufferCustomInsert(vers, sm, store, customs))
                vers.insert(sm, store, rowMgr);
            Discriminator dsc = mapping.getDiscriminator();
            if (!bufferCustomInsert(dsc, sm, store, customs))
                dsc.insert(sm, store, rowMgr);
        }
    }
View Full Code Here

            if (!bufferCustomDelete(fields[i], sm, store, customs))
                fields[i].delete(sm, store, rowMgr);

        ClassMapping sup = mapping.getJoinablePCSuperclassMapping();
        if (sup == null) {
            Version vers = mapping.getVersion();
            if (!bufferCustomDelete(vers, sm, store, customs))
                vers.delete(sm, store, rowMgr);
            Discriminator dsc = mapping.getDiscriminator();
            if (!bufferCustomDelete(dsc, sm, store, customs))
                dsc.delete(sm, store, rowMgr);
        }
        mapping.delete(sm, store, rowMgr);
View Full Code Here

        RowManager rowMgr, JDBCStore store, Collection customs,
        boolean versionUpdateOnly) throws SQLException {
        while (mapping.getJoinablePCSuperclassMapping() != null)
            mapping = mapping.getJoinablePCSuperclassMapping();

        Version vers = mapping.getVersion();
        if (!bufferCustomUpdate(vers, sm, store, customs))
            vers.update(sm, store, rowMgr);

        if (versionUpdateOnly) {
            // if we are only updating the version column, we need to add
            // in the primary key select
            mapping.update(sm, store, rowMgr);
View Full Code Here

                && !bufferCustomInsert(fields[i], sm, store, customs)) {
                fields[i].insert(sm, store, rowMgr);
            }
        }
        if (sup == null) {
            Version vers = mapping.getVersion();
            if (!bufferCustomInsert(vers, sm, store, customs))
                vers.insert(sm, store, rowMgr);
            Discriminator dsc = mapping.getDiscriminator();
            if (!bufferCustomInsert(dsc, sm, store, customs))
                dsc.insert(sm, store, rowMgr);
        }
    }
View Full Code Here

            if (!bufferCustomDelete(fields[i], sm, store, customs))
                fields[i].delete(sm, store, rowMgr);

        ClassMapping sup = mapping.getJoinablePCSuperclassMapping();
        if (sup == null) {
            Version vers = mapping.getVersion();
            if (!bufferCustomDelete(vers, sm, store, customs))
                vers.delete(sm, store, rowMgr);
            Discriminator dsc = mapping.getDiscriminator();
            if (!bufferCustomDelete(dsc, sm, store, customs))
                dsc.delete(sm, store, rowMgr);
        }
        mapping.delete(sm, store, rowMgr);
View Full Code Here

            Collection customs,
        boolean versionUpdateOnly) throws SQLException {
        while (mapping.getJoinablePCSuperclassMapping() != null)
            mapping = mapping.getJoinablePCSuperclassMapping();

        Version vers = mapping.getVersion();
        if (!bufferCustomUpdate(vers, sm, store, customs))
            vers.update(sm, store, rowMgr);

        if (versionUpdateOnly) {
            // if we are only updating the version column, we need to add
            // in the primary key select
            mapping.update(sm, store, rowMgr);
View Full Code Here

        int type = table.getPrimaryKey().getColumns()[0].getType();
        assertEquals(Schemas.getJDBCName(type), Types.INTEGER, type);
    }

    public void testIndicators() {
        Version vers = _mapping.getVersion();
        assertNotNull(vers);
        assertEquals("MAPPINGTEST1", vers.getColumns()[0].getTable().
            getName().toUpperCase());
        assertEquals(Types.INTEGER, vers.getColumns()[0].getType());

        Discriminator cls = _mapping.getDiscriminator();
        assertNotNull(cls);
        assertEquals("MAPPINGTEST1", cls.getColumns()[0].getTable().
            getName().toUpperCase());
View Full Code Here

            if (dirty.get(fields[i].getIndex())
                && !bufferCustomInsert(fields[i], sm, store, customs))
                fields[i].insert(sm, store, rowMgr);
        }
        if (sup == null) {
            Version vers = mapping.getVersion();
            if (!bufferCustomInsert(vers, sm, store, customs))
                vers.insert(sm, store, rowMgr);
            Discriminator dsc = mapping.getDiscriminator();
            if (!bufferCustomInsert(dsc, sm, store, customs))
                dsc.insert(sm, store, rowMgr);
        }
    }
View Full Code Here

            if (!bufferCustomDelete(fields[i], sm, store, customs))
                fields[i].delete(sm, store, rowMgr);

        ClassMapping sup = mapping.getJoinablePCSuperclassMapping();
        if (sup == null) {
            Version vers = mapping.getVersion();
            if (!bufferCustomDelete(vers, sm, store, customs))
                vers.delete(sm, store, rowMgr);
            Discriminator dsc = mapping.getDiscriminator();
            if (!bufferCustomDelete(dsc, sm, store, customs))
                dsc.delete(sm, store, rowMgr);
        }
        mapping.delete(sm, store, rowMgr);
View Full Code Here

TOP

Related Classes of org.apache.openjpa.jdbc.meta.Version

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.