com.univocity.api.engine
Enum Transactions

java.lang.Object
  extended by java.lang.Enum<Transactions>
      extended by com.univocity.api.engine.Transactions
All Implemented Interfaces:
Serializable, Comparable<Transactions>

public enum Transactions
extends Enum<Transactions>

The Transactions enumeration provides options to determine how transactions should be organized in a data mapping cycle. It is used by in DataIntegrationEngine.executeCycle(Transactions) to

Author:
uniVocity Software Pty Ltd - dev@univocity.com
See Also:
DataIntegrationEngine, TransactionalOperation

Enum Constant Summary
PER_CYCLE
          Indicates all mappings in a data mapping cycle should be executed within a single transaction.
PER_MAPPING
          Indicates each mapping in a data mapping cycle will be executed within an individual transaction.
 
Method Summary
static Transactions valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Transactions[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PER_CYCLE

public static final Transactions PER_CYCLE
Indicates all mappings in a data mapping cycle should be executed within a single transaction. If one of the mappings in the cycle fail, all changes of the already executed mappings should be rolled back.

Note: If all mappings executed and an error occurs while committing, the changes already committed won't be rolled back.


PER_MAPPING

public static final Transactions PER_MAPPING
Indicates each mapping in a data mapping cycle will be executed within an individual transaction. If one of the mappings in the cycle fail, all changes of the already executed mappings will be kept.

Note: Data mappings with exclusion of records enabled cannot be executed with this setting. uniVocity executes data deletion in special mappings generated internally. These are executed in independently of the actual data mappings. An IllegalArgumentException will be thrown if any mapping in the cycle is configured with exclusion enabled.

Method Detail

values

public static Transactions[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Transactions c : Transactions.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Transactions valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2015 uniVocity Software Pty Ltd. All rights reserved.