Enum Class BambooStAXListImportStrategy

java.lang.Object
java.lang.Enum<BambooStAXListImportStrategy>
com.atlassian.bamboo.migration.BambooStAXListImportStrategy
All Implemented Interfaces:
Serializable, Comparable<BambooStAXListImportStrategy>, Constable

public enum BambooStAXListImportStrategy extends Enum<BambooStAXListImportStrategy>
Enumeration of transaction handling strategies for importing lists of elements.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Import of each 10000 list elements is surrounded by a single additional transaction
    Import of each list element is surrounded by a single additional transaction.
    Import of each list element is surrounded by a single additional transaction
    Import of all list elements is surrounded by a single additional transaction
    No additional transaction for importing element list
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract <T, I extends T>
    long
    importListItems(@NotNull org.springframework.transaction.support.TransactionOperations transactionOperations, @NotNull org.hibernate.Session session, @NotNull org.codehaus.staxmate.in.SMInputCursor listItemCursor, @NotNull com.atlassian.bamboo.migration.BambooStAXMappingListHelper<T,I> mappingHelper, @NotNull List<I> itemList, @NotNull String displayNodeName)
     
    <T, I extends T>
    List<I>
    importListXml(org.springframework.transaction.support.TransactionOperations transactionOperations, @NotNull org.hibernate.Session session, @NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor, @NotNull com.atlassian.bamboo.migration.BambooStAXMappingListHelper<T,I> mappingHelper)
    Strategy entry point
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NO_TRANSACTION

      public static final BambooStAXListImportStrategy NO_TRANSACTION
      No additional transaction for importing element list
    • LIST_ITEM_TRANSACTION

      public static final BambooStAXListImportStrategy LIST_ITEM_TRANSACTION
      Import of each list element is surrounded by a single additional transaction
    • LIST_10000_ITEMS_TRANSACTION

      public static final BambooStAXListImportStrategy LIST_10000_ITEMS_TRANSACTION
      Import of each 10000 list elements is surrounded by a single additional transaction
    • LIST_TRANSACTION

      public static final BambooStAXListImportStrategy LIST_TRANSACTION
      Import of all list elements is surrounded by a single additional transaction
    • LIST_ITEM_AND_CLEAR_SESSION_TRANSACTION

      public static final BambooStAXListImportStrategy LIST_ITEM_AND_CLEAR_SESSION_TRANSACTION
      Import of each list element is surrounded by a single additional transaction. Additionally session is cleared after transaction commit.
  • Field Details

    • DEFAULT_DISPLAY_PROGRESS_STEP

      public static final long DEFAULT_DISPLAY_PROGRESS_STEP
  • Method Details

    • values

      public static BambooStAXListImportStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static BambooStAXListImportStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • importListItems

      protected abstract <T, I extends T> long importListItems(@NotNull @NotNull org.springframework.transaction.support.TransactionOperations transactionOperations, @NotNull @NotNull org.hibernate.Session session, @NotNull @NotNull org.codehaus.staxmate.in.SMInputCursor listItemCursor, @NotNull @NotNull com.atlassian.bamboo.migration.BambooStAXMappingListHelper<T,I> mappingHelper, @NotNull @NotNull List<I> itemList, @NotNull @NotNull String displayNodeName) throws Exception
      Throws:
      Exception
    • importListXml

      public <T, I extends T> List<I> importListXml(org.springframework.transaction.support.TransactionOperations transactionOperations, @NotNull @NotNull org.hibernate.Session session, @NotNull @NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor, @NotNull @NotNull com.atlassian.bamboo.migration.BambooStAXMappingListHelper<T,I> mappingHelper) throws Exception
      Strategy entry point
      Parameters:
      transactionOperations -
      session - DB session object
      inputCursor - StAXMate's input cursor pointing to the begin-of-the-list XML node
      mappingHelper - importer object
      Returns:
      list of imported elements - this list is managed by the imported and might be not used to store elements.
      Throws:
      Exception - when something went wrong