Package com.force.sdk.jpa.schema

Examples of com.force.sdk.jpa.schema.ForceStoreSchemaHandler


        TestContext tc = TestContext.get();
        tc.setUserInfo(testname, uinfo);
    }

    private TableImpl getTable(EntityManager emm, Class<?> entity) {
        ForceStoreSchemaHandler schemaHandler = (ForceStoreSchemaHandler) ((ObjectManagerImpl) emm.getDelegate())
                .getStoreManager().getSchemaHandler();
        return schemaHandler.getTable(((ForceStoreManager) schemaHandler.getStoreManager()).getMetaDataManager()
                .getMetaDataForClass(entity, null));
    }
View Full Code Here


     */
    public void testMetadataCache() throws Exception {
        Object delegate = em.getDelegate();
        Assert.assertNotNull(delegate);
        ObjectManagerImpl om = (ObjectManagerImpl) delegate;
        ForceStoreSchemaHandler forceSH = (ForceStoreSchemaHandler) om.getStoreManager().getSchemaHandler();
        // Search for an entity that we know is used by the tests
        Assert.assertNotNull(forceSH.getTable("TestEntity"));
        // Search for an entity that we know is NOT used by the tests
        Assert.assertNull(forceSH.getTable("Task"));
    }
View Full Code Here

     */
    public void testTransientFields() throws Exception {
        Object delegate = em.getDelegate();
        Assert.assertNotNull(delegate);
        ObjectManagerImpl om = (ObjectManagerImpl) delegate;
        ForceStoreSchemaHandler forceSH = (ForceStoreSchemaHandler) om.getStoreManager().getSchemaHandler();
        // Search for TestEntity
        TableImpl table = forceSH.getTable("TestEntity");
        Assert.assertNotNull(table.getColumnByForceApiName("lastModifiedDate"));
        Assert.assertNull(table.getColumnByForceApiName("unused"));
        // Do the same test with TestEntityMethodAnnotations
        table = forceSH.getTable("TestEntityMethodAnnotations");
        Assert.assertNotNull(table.getColumnByForceApiName("lastModifiedDate"));
        Assert.assertNull(table.getColumnByForceApiName("unused"));
        // Now test the same thing with @Embedded object EmploymentPeriod
        table = forceSH.getTable("EmployeeEntity");
        Assert.assertNotNull(table.getColumnByForceApiName("emp_end__c"));
        Assert.assertNull(table.getColumnByForceApiName("duration__c"));
    }
View Full Code Here

TOP

Related Classes of com.force.sdk.jpa.schema.ForceStoreSchemaHandler

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.