T
- public abstract class BambooStAXMappingListHelperAbstractImpl<T,I extends T> extends BambooStAXMappingHelperAbstractImpl<T,I>
BambooStAXMappingHelper.None
transactionOperations
Modifier | Constructor and Description |
---|---|
protected |
BambooStAXMappingListHelperAbstractImpl(org.hibernate.SessionFactory sessionFactory,
BambooStAXListImportStrategy listImportStrategy,
org.springframework.transaction.support.TransactionOperations transactionOperations) |
protected |
BambooStAXMappingListHelperAbstractImpl(org.hibernate.SessionFactory sessionFactory,
org.springframework.transaction.support.TransactionOperations transactionOperations) |
Modifier and Type | Method and Description |
---|---|
void |
afterImportListItem(org.codehaus.staxmate.in.SMInputCursor inputCursor,
List<I> list,
I object,
long objectIndex,
org.hibernate.Session session)
Called after parser completes parsing all child nodes in list's element node.
|
void |
beforeImportListItem(org.codehaus.staxmate.in.SMInputCursor inputCursor,
List<I> list,
org.hibernate.Session session)
Called when parser reaches the list's element node.
|
protected org.codehaus.staxmate.out.SMOutputElement |
createListRootElement(org.codehaus.staxmate.out.SMOutputElement outputElement)
Creates list root node
|
protected org.codehaus.staxmate.out.SMOutputElement |
createRootElement(org.codehaus.staxmate.out.SMOutputElement outputElement)
Creates list item node
|
protected void |
eventEndElementOfListItemSaveObject(org.hibernate.Session session,
T object,
long objectIndex,
long flushSize) |
<E extends T> |
exportListXml(org.hibernate.Session session,
org.codehaus.staxmate.out.SMOutputElement outputElement,
Iterable<E> iterable,
ExportDetailsBean exportDetailsBean)
Exports a collection to the XML.
|
<E extends T> |
exportListXml(org.codehaus.staxmate.out.SMOutputElement outputElement,
Iterable<E> iterable,
ExportDetailsBean exportDetailsBean)
Exports a collection to the XML.
|
protected void |
flushIfNeeded(org.hibernate.Session session,
long objectIndex,
long flushSize) |
String |
getXmlElementNodeName()
Returns local name of list element node
|
String |
getXmlRootNodeName()
Returns local name of the XML parent node that will contain exported/imported object's properties
|
List<I> |
importListXml(org.hibernate.Session session,
org.codehaus.staxmate.in.SMInputCursor inputCursor)
Import list from XML
|
List<I> |
importListXml(org.codehaus.staxmate.in.SMInputCursor inputCursor)
Import list from XML
|
protected void |
importListXmlInTransaction(org.codehaus.staxmate.in.SMInputCursor inputCursor) |
createItemInstance, exportProperties, exportXml, exportXml, getSession, getSessionFactory, importProperties, importXml, importXml, isShouldExport, saveBambooObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
exportXml, importXml
protected BambooStAXMappingListHelperAbstractImpl(org.hibernate.SessionFactory sessionFactory, BambooStAXListImportStrategy listImportStrategy, org.springframework.transaction.support.TransactionOperations transactionOperations)
protected BambooStAXMappingListHelperAbstractImpl(org.hibernate.SessionFactory sessionFactory, org.springframework.transaction.support.TransactionOperations transactionOperations)
@NotNull public String getXmlElementNodeName()
@NotNull public String getXmlRootNodeName()
BambooStAXMappingHelper
getXmlRootNodeName
in interface BambooStAXMappingHelper<T,I extends T>
getXmlRootNodeName
in class BambooStAXMappingHelperAbstractImpl<T,I extends T>
public void beforeImportListItem(@NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor, @NotNull List<I> list, @NotNull org.hibernate.Session session) throws Exception
inputCursor
- inputCursor pointing to the list's element opening nodelist
- list of elements being importedsession
- Hibernate session objectException
- when something went wrongpublic void afterImportListItem(@NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor, @NotNull List<I> list, @NotNull I object, long objectIndex, @NotNull org.hibernate.Session session) throws Exception
inputCursor
- cursor pointing to the list's element opening nodelist
- list of elements being importedobject
- object that has been importedobjectIndex
- one-based index of the object being parsedsession
- Hibernate session objectException
- when something went wrong@NotNull protected org.codehaus.staxmate.out.SMOutputElement createListRootElement(@NotNull org.codehaus.staxmate.out.SMOutputElement outputElement) throws XMLStreamException
outputElement
- parent node for list root nodeXMLStreamException
- when something went wrong@NotNull protected org.codehaus.staxmate.out.SMOutputElement createRootElement(@NotNull org.codehaus.staxmate.out.SMOutputElement outputElement) throws XMLStreamException
createRootElement
in class BambooStAXMappingHelperAbstractImpl<T,I extends T>
outputElement
- list root nodeXMLStreamException
- when something went wrongpublic final <E extends T> void exportListXml(@NotNull org.codehaus.staxmate.out.SMOutputElement outputElement, @NotNull Iterable<E> iterable, ExportDetailsBean exportDetailsBean) throws Exception
outputElement
- parent node for collection root nodeiterable
- collection to be exportedexportDetailsBean
- Exception
- when something went wrongpublic <E extends T> void exportListXml(@NotNull org.hibernate.Session session, @NotNull org.codehaus.staxmate.out.SMOutputElement outputElement, @NotNull Iterable<E> iterable, ExportDetailsBean exportDetailsBean) throws Exception
session
- Hibernate session objectoutputElement
- parent node for collection root nodeiterable
- collection to be exportedexportDetailsBean
- Exception
- when something went wrong@NotNull public final List<I> importListXml(@NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor) throws Exception
inputCursor
- parent node for list root nodeException
- when something went wrong@NotNull public List<I> importListXml(@NotNull org.hibernate.Session session, @NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor) throws Exception
session
- Hibernate session objectinputCursor
- parent node for list root nodeException
- when something went wrongprotected void importListXmlInTransaction(org.codehaus.staxmate.in.SMInputCursor inputCursor)
protected void eventEndElementOfListItemSaveObject(@NotNull org.hibernate.Session session, @NotNull T object, long objectIndex, long flushSize) throws org.hibernate.HibernateException
session
- Hibernate session objectobject
- object to be savedobjectIndex
- one-based index of the object in the list of object being readflushSize
- number of objects to be saved before session.flush() is executedSQLException
- when something went wrongorg.hibernate.HibernateException
- when something went wrongprotected void flushIfNeeded(org.hibernate.Session session, long objectIndex, long flushSize) throws org.hibernate.HibernateException
org.hibernate.HibernateException
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.