Class MappedFieldsTracker


  • public class MappedFieldsTracker
    extends Object
    Keeps track of mapped object during this mapping process execution. Objects, which are referenced multiple types in object hierarchy will be fetched from here to retain referential integrity of resulting object graph.
    • Constructor Detail

      • MappedFieldsTracker

        public MappedFieldsTracker()
    • Method Detail

      • startTransaction

        public Integer startTransaction()
        Start a new transaction which supports commit or rollback. Nested transaction are also supported and may be individually rollbacked. Even if nested transactions are commited they may still be rollbacked by the rollback of an outer transaction until the root transaction is committed as well.
        Returns:
        transaction ID that can be used for commit or rollback of the transaction
        See Also:
        commitTransaction(Integer), rollbackTransaction(Integer)
      • commitTransaction

        public void commitTransaction​(Integer txId)
        Commit transaction with the given ID. The operations executed under this transaction my still be reverted by the rollback of a parent transaction (if any).
        Parameters:
        txId - - transaction ID as returned by startTransaction()
      • rollbackTransaction

        public void rollbackTransaction​(Integer txId)
        Rollback transaction with the given ID. The operations of this transactions as well as those of nested transactions are reverted.
        Parameters:
        txId - - transaction ID as returned by startTransaction()
      • hasTransaction

        public boolean hasTransaction()
        Checks if there is a transaction active.
        Returns:
        true if a transaction is active, false otherwise