com.force.sdk.jpa
Class ForceConnectionFactory

java.lang.Object
  extended by org.datanucleus.store.connection.AbstractConnectionFactory
      extended by com.force.sdk.jpa.ForceConnectionFactory
All Implemented Interfaces:
org.datanucleus.store.connection.ConnectionFactory

public class ForceConnectionFactory
extends org.datanucleus.store.connection.AbstractConnectionFactory

Factory for creating connections to the Force.com service.

Author:
Fiaz Hossain

Field Summary
 
Fields inherited from class org.datanucleus.store.connection.AbstractConnectionFactory
omfContext, options, resourceType
 
Fields inherited from interface org.datanucleus.store.connection.ConnectionFactory
DATANUCLEUS_CONNECTION_RESOURCE_TYPE, DATANUCLEUS_CONNECTION2_RESOURCE_TYPE, RESOURCE_TYPE_OPTION
 
Constructor Summary
ForceConnectionFactory(org.datanucleus.OMFContext omfContext, String resourceType)
          Factory constructor for Force.com connections.
 
Method Summary
 org.datanucleus.store.connection.ManagedConnection createManagedConnection(Object poolKey, Map transactionOptions)
          Instantiates the connections to the Force.com service.
 
Methods inherited from class org.datanucleus.store.connection.AbstractConnectionFactory
getConnection, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForceConnectionFactory

public ForceConnectionFactory(org.datanucleus.OMFContext omfContext,
                              String resourceType)
Factory constructor for Force.com connections.

Parameters:
omfContext - The OMF context
resourceType - Type of resource (tx, nontx)
Method Detail

createManagedConnection

public org.datanucleus.store.connection.ManagedConnection createManagedConnection(Object poolKey,
                                                                                  Map transactionOptions)
Instantiates the connections to the Force.com service. It either reads the configs from thread local (which would have been set from OAuth) or it gets the config from the store manager.



Copyright © 2011. All Rights Reserved.