Package com.atlassian.bamboo.migration
Enum Class BambooStAXListImportStrategy
java.lang.Object
java.lang.Enum<BambooStAXListImportStrategy>
com.atlassian.bamboo.migration.BambooStAXListImportStrategy
- All Implemented Interfaces:
Serializable
,Comparable<BambooStAXListImportStrategy>
,Constable
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 ConstantDescriptionImport of each 10000 list elements is surrounded by a single additional transactionImport of each list element is surrounded by a single additional transaction.Import of each list element is surrounded by a single additional transactionImport of all list elements is surrounded by a single additional transactionNo additional transaction for importing element list -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract <T,
I extends T>
longimportListItems
(@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 pointstatic BambooStAXListImportStrategy
Returns the enum constant of this class with the specified name.static BambooStAXListImportStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_TRANSACTION
No additional transaction for importing element list -
LIST_ITEM_TRANSACTION
Import of each list element is surrounded by a single additional transaction -
LIST_10000_ITEMS_TRANSACTION
Import of each 10000 list elements is surrounded by a single additional transaction -
LIST_TRANSACTION
Import of all list elements is surrounded by a single additional transaction -
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
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
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 nameNullPointerException
- 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 ExceptionStrategy entry point- Parameters:
transactionOperations
-session
- DB session objectinputCursor
- StAXMate's input cursor pointing to the begin-of-the-list XML nodemappingHelper
- 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
-