T
- public abstract class BambooStAXMappingHelperAbstractImpl<T,I extends T> extends Object implements BambooStAXMappingHelper<T,I>
BambooStAXMappingHelper.None
Modifier and Type | Field and Description |
---|---|
protected org.springframework.transaction.support.TransactionOperations |
transactionOperations |
Modifier | Constructor and Description |
---|---|
protected |
BambooStAXMappingHelperAbstractImpl(org.hibernate.SessionFactory sessionFactory,
org.springframework.transaction.support.TransactionOperations transactionOperations) |
Modifier and Type | Method and Description |
---|---|
protected abstract I |
createItemInstance(org.codehaus.staxmate.in.SMInputCursor inputCursor)
Creates empty instance of the imported object
|
protected org.codehaus.staxmate.out.SMOutputElement |
createRootElement(org.codehaus.staxmate.out.SMOutputElement outputElement)
Create root node for the exported object.
|
protected void |
exportProperties(org.codehaus.staxmate.out.SMOutputElement outputElement,
T object,
org.hibernate.Session session,
ExportDetailsBean exportDetailsBean)
Export object properties.
|
void |
exportXml(org.hibernate.Session session,
org.codehaus.staxmate.out.SMOutputElement outputElement,
T object,
ExportDetailsBean exportDetailsBean)
Implementation of object export.
|
protected void |
exportXml(org.codehaus.staxmate.out.SMOutputElement outputElement,
T object,
ExportDetailsBean exportDetailsBean)
Implementation of object export.
|
protected org.hibernate.Session |
getSession()
Get the Hibernate session
|
org.hibernate.SessionFactory |
getSessionFactory() |
String |
getXmlRootNodeName()
Returns local name of the XML parent node that will contain exported/imported object's properties
|
protected void |
importProperties(I object,
org.codehaus.staxmate.in.SMInputCursor inputCursor,
org.hibernate.Session session)
Import properties to the object.
|
I |
importXml(org.hibernate.Session session,
org.codehaus.staxmate.in.SMInputCursor inputCursor)
Implementation of object import.
|
protected I |
importXml(org.codehaus.staxmate.in.SMInputCursor inputCursor)
Object import.
|
boolean |
isShouldExport(ExportDetailsBean exportDetailsBean) |
protected void |
saveBambooObject(org.hibernate.Session session,
BambooIdProvider object)
Save object without regenerating the id if already assigned.
|
protected org.springframework.transaction.support.TransactionOperations transactionOperations
protected BambooStAXMappingHelperAbstractImpl(org.hibernate.SessionFactory sessionFactory, org.springframework.transaction.support.TransactionOperations transactionOperations)
@NotNull public String getXmlRootNodeName()
BambooStAXMappingHelper
getXmlRootNodeName
in interface BambooStAXMappingHelper<T,I extends T>
public boolean isShouldExport(@NotNull ExportDetailsBean exportDetailsBean)
protected void exportProperties(@NotNull org.codehaus.staxmate.out.SMOutputElement outputElement, @NotNull T object, @NotNull org.hibernate.Session session, ExportDetailsBean exportDetailsBean) throws Exception
outputElement
- the parent nodeobject
- object being exportedsession
- Hibernate session objectexportDetailsBean
- Exception
- when something went wrongprotected final void exportXml(@NotNull org.codehaus.staxmate.out.SMOutputElement outputElement, @NotNull T object, ExportDetailsBean exportDetailsBean) throws Exception
outputElement
- an element at which exporter should create a node to export dataobject
- object being exportedexportDetailsBean
- Exception
- when something went wrongpublic void exportXml(@NotNull org.hibernate.Session session, @NotNull org.codehaus.staxmate.out.SMOutputElement outputElement, @NotNull T object, ExportDetailsBean exportDetailsBean) throws Exception
exportXml
in interface BambooStAXMappingHelper<T,I extends T>
session
- Hibernate session objectoutputElement
- an element at which exporter should create a node to export dataobject
- object being exportedexportDetailsBean
- Exception
- when something went wrong@NotNull protected abstract I createItemInstance(org.codehaus.staxmate.in.SMInputCursor inputCursor) throws Exception
inputCursor
- input cursor that points to the parent node containing object propertiesXMLStreamException
- when something went wrongException
protected void importProperties(@NotNull I object, @NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor, @NotNull org.hibernate.Session session) throws Exception
object
- object being importedinputCursor
- input cursor pointing to the child node of node that was passed to importXml methodsession
- Hibernate session objectException
- when something went wrong@NotNull protected final I importXml(@NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor) throws Exception
inputCursor
- input cursor that points to the parent node containing object propertiesException
- when something went wrong@NotNull public I importXml(@NotNull org.hibernate.Session session, @NotNull org.codehaus.staxmate.in.SMInputCursor inputCursor) throws Exception
@NotNull protected org.codehaus.staxmate.out.SMOutputElement createRootElement(@NotNull org.codehaus.staxmate.out.SMOutputElement outputElement) throws XMLStreamException
outputElement
- parent node for the object's root nodeXMLStreamException
- when something went wrongprotected void saveBambooObject(@NotNull org.hibernate.Session session, @NotNull BambooIdProvider object) throws org.hibernate.HibernateException
session
- Hibernate session objectobject
- object to be savedorg.hibernate.HibernateException
- when save operation failedprotected org.hibernate.Session getSession()
public org.hibernate.SessionFactory getSessionFactory()
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.