org.sql.generation.api.vendor
Class SQLVendorProvider

java.lang.Object
  extended by org.sql.generation.api.vendor.SQLVendorProvider

public class SQLVendorProvider
extends Object

This class provides easy way of acquiring vendors for specific databases.

Author:
Stanislav Muhametsin

Constructor Summary
SQLVendorProvider()
           
 
Method Summary
static
<VendorType extends SQLVendor>
VendorType
createVendor(Class<VendorType> vendorClass)
           Creates a new vendor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLVendorProvider

public SQLVendorProvider()
Method Detail

createVendor

public static <VendorType extends SQLVendor> VendorType createVendor(Class<VendorType> vendorClass)
                                                 throws IOException

Creates a new vendor. If one passes SQLVendor as a parameter, it will return the default vendor-neutral implementation.

Invoking this statement is equivalent to calling new ServiceLoader().firstProvider( vendorClass); .

Type Parameters:
VendorType - The type of the vendor.
Parameters:
vendorClass - The class of the vendor.
Returns:
The vendor of a given class.
Throws:
IOException - If ServiceLoader throws IOException.
See Also:
ServiceLoader


Copyright © 2010-2012. All Rights Reserved.