Package org.datanucleus.store.mapped

Examples of org.datanucleus.store.mapped.DatastoreAdapter


    public void testGetNewDatastoreAdapter2()
    {
        DatabaseMetaData md = new DatabaseMetaData();
        md.setProductName("unknown");
        md.setProductVersion("1");
        DatastoreAdapter adapter = factory.getNewDatastoreAdapter(clr, md, DerbyAdapter.class.getName(), pluginMgr);
        assertNotNull(adapter);
        assertEquals(DerbyAdapter.class.getName(), adapter.getClass().getName());
    }
View Full Code Here


        DatabaseMetaData md = new DatabaseMetaData();
   
        //test Derby adapter 
        md.setProductName("Derby");
        md.setProductVersion("10");
        DatastoreAdapter adapter = factory.getNewDatastoreAdapter(clr, md, null, pluginMgr);
        assertNotNull(adapter);
        assertEquals(DerbyAdapter.class.getName(), adapter.getClass().getName());
    }
View Full Code Here

    public void testGetNewDatastoreAdapter4()
    {
        DatabaseMetaData md = new DatabaseMetaData();
   
        md.setProductName(null);
        DatastoreAdapter adapter = factory.getNewDatastoreAdapter(clr, md, null, pluginMgr);
        assertNull(adapter);
    }
View Full Code Here

     */
    public JavaTypeMapping getMapping(DatastoreContainerObject datastoreContainer,
            AbstractMemberMetaData fmd, ClassLoaderResolver clr, int fieldRole)
    {
        Class mc = null;
        DatastoreAdapter dba = datastoreContainer.getStoreManager().getDatastoreAdapter();

        AbstractMemberMetaData overrideMmd = null;
        if (fmd.getTypeConverterName() != null)
        {
            // Member should be mapped using a TypeConverter (which defines the datastore type)
View Full Code Here

            {
                caseSensitive = true;
                pattern = pattern.substring(4);
            }

            DatastoreAdapter dba = qs.getStoreManager().getDatastoreAdapter();
            RegularExpressionConverter converter = new RegularExpressionConverter(
                dba.getPatternExpressionZeroMoreCharacters().charAt(0),
                dba.getPatternExpressionAnyCharacter().charAt(0),
                dba.getEscapeCharacter().charAt(0));
            if (caseSensitive)
            {
                StringLiteral patternExpr = new StringLiteral(qs, mapping, converter.convert(pattern).toLowerCase());
                //StringExpression escapedExpr = (StringExpression) qs.getStoreManager().getDatastoreAdapter().getEscapedPatternExpression(patternExpr);
                return new LikeExpression(this.toLowerCaseMethod(), ScalarExpression.OP_LIKE, patternExpr);
View Full Code Here

TOP

Related Classes of org.datanucleus.store.mapped.DatastoreAdapter

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.