Package org.apache.torque.adapter

Examples of org.apache.torque.adapter.Adapter


     * Tests whether an external adapter is loaded correctly.
     * @throws Exception if an error occurs during the Test.
     */
    public void testExternalAdapter() throws Exception
    {
        Adapter adapter = Torque.getDatabase(POSTGRESQL_NAME).getAdapter();
        assertNotNull(adapter);
        assertTrue(adapter instanceof PostgresAdapter);
    }
View Full Code Here


            throws TorqueException
    {
        IDMethod idMethod = tableMap.getPrimaryKeyMethod();
        if (IDMethod.NATIVE == idMethod)
        {
            Adapter adapter = Torque.getAdapter(getDatabaseName());
            if (adapter == null)
            {
               throw new TorqueException(
                   "missing adapter configuration for database "
                       + getDatabaseName()
                       + "check the Torque configuration");
            }
            idMethod = adapter.getIDMethodType();
        }
        Object keyInfo = tableMap.getPrimaryKeyMethodInfo(idMethod);
        return keyInfo;
    }
View Full Code Here

TOP

Related Classes of org.apache.torque.adapter.Adapter

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.