Package org.openengsb.core.edbi.api

Examples of org.openengsb.core.edbi.api.IndexNameTranslator


    @Override
    protected TableEngine createEngine(DataSource dataSource, TypeMap typeMap) {

        // Translators (mockito 1.8.5 has a bug with overloading generics)
        IndexNameTranslator indexNameTranslatorStub = new IndexNameTranslator() {
            @Override
            public String translate(Index<?> index) {
                return (index == testIndex) ? "HISTORY_TABLE" : null;
            }
        };
View Full Code Here


        when(typeMap.getType(Long.class)).thenReturn(new DataType(Types.BIGINT, "LONG"));
        when(typeMap.getType(Date.class)).thenReturn(new DataType(Types.TIMESTAMP, "TIMESTAMP"));
        when(typeMap.getType(UUID.class)).thenReturn(new DataType(Types.VARCHAR, "VARCHAR"));

        // Translators
        IndexNameTranslator headIndexNameTranslator = new IndexNameTranslator() {
            @Override
            public String translate(Index<?> index) {
                return "INDEX_HEAD";
            }
        };

        IndexNameTranslator historyIndexNameTranslator = new IndexNameTranslator() {
            @Override
            public String translate(Index<?> index) {
                return "INDEX_HISTORY";
            }
        };
View Full Code Here

    }

    @Override
    protected TableEngine createEngine(DataSource dataSource, TypeMap typeMap) {
        // Translators (mockito 1.8.5 has a bug with overloading generics)
        IndexNameTranslator indexNameTranslatorStub = new IndexNameTranslator() {
            @Override
            public String translate(Index<?> index) {
                return (index == testIndex) ? "HEAD_TABLE" : null;
            }
        };
View Full Code Here

TOP

Related Classes of org.openengsb.core.edbi.api.IndexNameTranslator

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.