Package org.apache.openjpa.jdbc.meta

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


                ColumnIO io = new ColumnIO();
                row.setForeignKey(fk, io, keySm);
            }
        } else {
            // key is an embeddable or basic type
            FieldStrategy strategy = mapField.getStrategy();
            if (strategy instanceof 
                    HandlerRelationMapTableFieldStrategy) {
                HandlerRelationMapTableFieldStrategy strat =
                    (HandlerRelationMapTableFieldStrategy) strategy;
                Column[] kcols = strat.getKeyColumns((ClassMapping)meta);
View Full Code Here


                ColumnIO io = new ColumnIO();
                row.setForeignKey(fk, io, keySm);
            }
        } else {
            // key is an embeddable or basic type
            FieldStrategy strategy = mapField.getStrategy();
            if (strategy instanceof 
                    HandlerRelationMapTableFieldStrategy) {
                HandlerRelationMapTableFieldStrategy strat =
                    (HandlerRelationMapTableFieldStrategy) strategy;
                Column[] kcols = strat.getKeyColumns((ClassMapping)meta);
View Full Code Here

        Object[] curArgs;
        ColumnIO curIO;
        for (int i = 0; i < fms.length; i++) {
            if (fms[i].getManagement() != FieldMapping.MANAGE_PERSISTENT)
                continue;
            FieldStrategy strat = fms[i].getStrategy();
           
            if (!(strat instanceof Embeddable))
                throw new MetaDataException(_loc.get("not-embeddable",
                    vm, fms[i]));
           
View Full Code Here

     */
    void assertStrategy(Class<?> pcClass, String field, Class<? extends FieldStrategy> strategy,
            Class<? extends ValueHandler> handler) {

        FieldMapping fmd = getFieldMapping(pcClass, field);
        FieldStrategy actualStrategy = ((FieldMapping) fmd).getStrategy();
        assertEquals(strategy, actualStrategy.getClass());
        ValueHandler actualHandler = fmd.getHandler();
        if (handler == null) {
            if (actualHandler != null) {
                printMapping(fmd);
                fail("Expected no value handler for " + pcClass.getName() + "." + field +
View Full Code Here

        ClassMetaData cmd = repos.getMetaData(cls, null, true);
        assertNotNull("No metadat found for " + cls, cmd);
        FieldMetaData fmd = cmd.getField(field);
        assertNotNull("No metadata found for " + cls.getName() + "." + field + " Fields are "
                + Arrays.toString(cmd.getFieldNames()), fmd);
        FieldStrategy strategy = ((FieldMapping) fmd).getStrategy();
        System.err.println(cls.getName() + "." + field + ":" + strategy.getClass().getSimpleName());
        return strategy;
    }
View Full Code Here

                ColumnIO io = new ColumnIO();
                row.setForeignKey(fk, io, keySm);
            }
        } else {
            // key is an embeddable or basic type
            FieldStrategy strategy = mapField.getStrategy();
            if (strategy instanceof 
                    HandlerRelationMapTableFieldStrategy) {
                HandlerRelationMapTableFieldStrategy strat =
                    (HandlerRelationMapTableFieldStrategy) strategy;
                Column[] kcols = strat.getKeyColumns((ClassMapping)meta);
View Full Code Here

                ColumnIO io = new ColumnIO();
                row.setForeignKey(fk, io, keySm);
            }
        } else {
            // key is an embeddable or basic type
            FieldStrategy strategy = mapField.getStrategy();
            if (strategy instanceof 
                    HandlerRelationMapTableFieldStrategy) {
                HandlerRelationMapTableFieldStrategy strat =
                    (HandlerRelationMapTableFieldStrategy) strategy;
                Column[] kcols = strat.getKeyColumns((ClassMapping)meta);
View Full Code Here

        Object[] curArgs;
        ColumnIO curIO;
        for (int i = 0; i < fms.length; i++) {
            if (fms[i].getManagement() != FieldMapping.MANAGE_PERSISTENT)
                continue;
            FieldStrategy strat = fms[i].getStrategy();
           
            if (!(strat instanceof Embeddable))
                throw new MetaDataException(_loc.get("not-embeddable",
                    vm, fms[i]));
           
View Full Code Here

                ColumnIO io = new ColumnIO();
                row.setForeignKey(fk, io, keySm);
            }
        } else {
            // key is an embeddable or basic type
            FieldStrategy strategy = mapField.getStrategy();
            if (strategy instanceof 
                    HandlerRelationMapTableFieldStrategy) {
                HandlerRelationMapTableFieldStrategy strat =
                    (HandlerRelationMapTableFieldStrategy) strategy;
                Column[] kcols = strat.getKeyColumns((ClassMapping)meta);
View Full Code Here

                ColumnIO io = new ColumnIO();
                row.setForeignKey(fk, io, keySm);
            }
        } else {
            // key is an embeddable or basic type
            FieldStrategy strategy = mapField.getStrategy();
            if (strategy instanceof 
                    HandlerRelationMapTableFieldStrategy) {
                HandlerRelationMapTableFieldStrategy strat =
                    (HandlerRelationMapTableFieldStrategy) strategy;
                Column[] kcols = strat.getKeyColumns((ClassMapping)meta);
View Full Code Here

TOP

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

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.