com.force.sdk.jpa.exception
Class ForceApiExceptionMap

java.lang.Object
  extended by com.force.sdk.jpa.exception.ForceApiExceptionMap

public final class ForceApiExceptionMap
extends Object

Maps Force.com API Exceptions to appropriate JPA Exceptions.

Author:
Tim Kral

Method Summary
static org.datanucleus.exceptions.NucleusException mapToNucleusException(com.sforce.soap.partner.fault.ApiFault af, boolean isQuery, boolean isOptimistic)
          Method to map specific api exception codes to the proper DataNucleus exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

mapToNucleusException

public static org.datanucleus.exceptions.NucleusException mapToNucleusException(com.sforce.soap.partner.fault.ApiFault af,
                                                                                boolean isQuery,
                                                                                boolean isOptimistic)
Method to map specific api exception codes to the proper DataNucleus exception.

Parameters:
af - the Force.com ApiFault exception to map
isQuery - whether the exception happened during a query or not
isOptimistic - whether JPA transactions are in optimistic mode
Returns:
the properly mapped NucleusException


Copyright © 2011. All Rights Reserved.