|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl<T> com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl<T>
T
- public abstract class BambooStAXMappingListHelperAbstractImpl<T>
Skeleton implementation of StAX based export-import helper class for lists.
The XML representation of such a list is:
Constructor Summary | |
---|---|
protected |
BambooStAXMappingListHelperAbstractImpl(net.sf.hibernate.SessionFactory sessionFactory)
|
Method Summary | |
---|---|
void |
afterImportListItem(org.codehaus.staxmate.in.SMInputCursor inputCursor,
java.util.List<T> list,
T object,
long objectIndex,
net.sf.hibernate.Session session)
Called after parser completes parsing all child nodes in list's element node. |
void |
beforeImportListItem(org.codehaus.staxmate.in.SMInputCursor inputCursor,
java.util.List<T> list,
net.sf.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(net.sf.hibernate.Session session,
T object,
long objectIndex,
long flushSize)
|
void |
exportListXml(net.sf.hibernate.Session session,
org.codehaus.staxmate.out.SMOutputElement outputElement,
java.lang.Iterable<T> iterable)
Exports a collection to the XML. |
void |
exportListXml(org.codehaus.staxmate.out.SMOutputElement outputElement,
java.lang.Iterable<T> iterable)
Exports a collection to the XML. |
java.lang.String |
getXmlElementNodeName()
Returns local name of list element node |
java.util.List<T> |
importListXml(net.sf.hibernate.Session session,
org.codehaus.staxmate.in.SMInputCursor inputCursor)
Import list from XML |
java.util.List<T> |
importListXml(org.codehaus.staxmate.in.SMInputCursor inputCursor)
Import list from XML |
void |
setListImportStrategy(BambooStAXListImportStrategy listImportStrategy)
|
Methods inherited from class com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl |
---|
commitClearSession, commitSession, createItemInstance, exportProperties, exportXml, exportXml, getSession, getSessionFactory, importProperties, importXml, importXml, saveBambooObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.bamboo.migration.BambooStAXMappingHelper |
---|
exportXml, getXmlRootNodeName, importXml |
Constructor Detail |
---|
protected BambooStAXMappingListHelperAbstractImpl(net.sf.hibernate.SessionFactory sessionFactory)
Method Detail |
---|
public void beforeImportListItem(@NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor, @NotNull java.util.List<T> list, @NotNull net.sf.hibernate.Session session) throws java.lang.Exception
inputCursor
- inputCursor pointing to the list's element opening nodelist
- list of elements being importedsession
- Hibernate session object
java.lang.Exception
- when something went wrongpublic void afterImportListItem(@NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor, @NotNull java.util.List<T> list, @NotNull T object, long objectIndex, @NotNull net.sf.hibernate.Session session) throws java.lang.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 object
java.lang.Exception
- when something went wrong@NotNull protected org.codehaus.staxmate.out.SMOutputElement createListRootElement(@NotNull org.codehaus.staxmate.out.SMOutputElement outputElement) throws javax.xml.stream.XMLStreamException
outputElement
- parent node for list root node
javax.xml.stream.XMLStreamException
- when something went wrong@NotNull protected org.codehaus.staxmate.out.SMOutputElement createRootElement(@NotNull org.codehaus.staxmate.out.SMOutputElement outputElement) throws javax.xml.stream.XMLStreamException
createRootElement
in class BambooStAXMappingHelperAbstractImpl<T>
outputElement
- list root node
javax.xml.stream.XMLStreamException
- when something went wrongpublic final void exportListXml(@NotNull org.codehaus.staxmate.out.SMOutputElement outputElement, @NotNull java.lang.Iterable<T> iterable) throws java.lang.Exception
outputElement
- parent node for collection root nodeiterable
- collection to be exported
java.lang.Exception
- when something went wrongpublic void exportListXml(@NotNull net.sf.hibernate.Session session, @NotNull org.codehaus.staxmate.out.SMOutputElement outputElement, @NotNull java.lang.Iterable<T> iterable) throws java.lang.Exception
session
- Hibernate session objectoutputElement
- parent node for collection root nodeiterable
- collection to be exported
java.lang.Exception
- when something went wrong@NotNull public final java.util.List<T> importListXml(@NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor) throws java.lang.Exception
inputCursor
- parent node for list root node
java.lang.Exception
- when something went wrong@NotNull public java.util.List<T> importListXml(@NotNull net.sf.hibernate.Session session, @NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor) throws java.lang.Exception
session
- Hibernate session objectinputCursor
- parent node for list root node
java.lang.Exception
- when something went wrongprotected void eventEndElementOfListItemSaveObject(@NotNull net.sf.hibernate.Session session, @NotNull T object, long objectIndex, long flushSize) throws net.sf.hibernate.HibernateException, java.sql.SQLException
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 executed
java.sql.SQLException
- when something went wrong
net.sf.hibernate.HibernateException
- when something went wrongpublic void setListImportStrategy(@NotNull BambooStAXListImportStrategy listImportStrategy)
@NotNull public java.lang.String getXmlElementNodeName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |