Enum BambooStAXListImportStrategy

    • Enum Constant Detail

      • 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 Detail

      • DEFAULT_DISPLAY_PROGRESS_STEP

        public static final long DEFAULT_DISPLAY_PROGRESS_STEP
    • Method Detail

      • values

        public static BambooStAXListImportStrategy[] 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 (BambooStAXListImportStrategy c : BambooStAXListImportStrategy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static BambooStAXListImportStrategy 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
      • 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