Class XMLDatabinder
- java.lang.Object
-
- com.atlassian.confluence.impl.hibernate.extras.XMLDatabinder
-
- Direct Known Subclasses:
AtlassianXMLDatabinder
@Deprecated public abstract class XMLDatabinder extends Object
Deprecated.since 8.0.0Moved from hibernate-extras. This would be temporarily available to support legacy import export.- Since:
- 8.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classXMLDatabinder.FieldWithTypeDeprecated.An inner class that encapsulates an object's field and its corresponding Hibernate type
-
Field Summary
Fields Modifier and Type Field Description protected Set<ExportHibernateHandle>bucketHandlesDeprecated.Handles of propertysetitems.protected static StringCARRIAGE_RETURNDeprecated.protected static StringCONST_CLOSE_CDATADeprecated.protected static StringCONST_OPEN_CDATADeprecated.protected StringencodingDeprecated.protected static StringEND_TAG_CARRIAGE_RETURNDeprecated.protected Set<ExportHibernateHandle>excludedHandlesDeprecated.A set of handles for identifying Objects to skip in the export.protected Set<ExportHibernateHandle>handlesDeprecated.Handles about to be or currently being iterated over bywriteObjects(Writer, Iterable).static StringISO_DATE_FORMATDeprecated.static StringISO_TIMESTAMP_FORMATDeprecated.protected static StringLEFT_CHEVRONDeprecated.protected Set<ExportHibernateHandle>nextHandlesDeprecated.A set of handles to be transferred tohandlesafter the current minor iteration ofwriteObjects(Writer, Iterable).protected Set<ExportHibernateHandle>processedHandlesDeprecated.A set of handles of object that have already been written or otherwise dealt with.protected static StringRIGHT_CHEVRONDeprecated.protected static StringSTART_CLOSE_TAGDeprecated.protected HibernateTranslatortranslatorDeprecated.
-
Constructor Summary
Constructors Constructor Description XMLDatabinder(org.hibernate.engine.spi.SessionFactoryImplementor factory, String encoding, HibernateTranslator translator)Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddClass(Writer writer, Class clazz, String classAttributeName, String packageAttributeName)Deprecated.protected voidassociatedObjectFound(Object object)Deprecated.XMLDatabinderbind(Object object)Deprecated.XMLDatabinderbindAll(Collection objects)Deprecated.Register a set of objects as being ones that should be exported.protected voidcommit()Deprecated.voidexcludeClass(Class<?> clazz)Deprecated.Mark a class as being excluded from the export.voidexcludeClassFromEntityExport(Class<?> clazz)Deprecated.voidexcludeClassFromReferenceExport(Class<?> clazz)Deprecated.protected List<XMLDatabinder.FieldWithType>getExportableFields(Class<?> clazz)Deprecated.Get the exportable fields of a class from the in-memory map If the list of exportable fields is not in the map, they will be extracted from the class with the Reflection API and then put into the mapprotected org.hibernate.persister.entity.EntityPersistergetPersister(Class clazz)Deprecated.protected voidincrementProgress()Deprecated.We need to commit and flush session for every batch of records handledprotected voidincrementProgressTotal()Deprecated.protected booleanisExcludedAsProperty(org.hibernate.type.Type type, Object obj)Deprecated.protected booleanisExcludedOrProcessed(ExportHibernateHandle handle)Deprecated.protected ObjectmaybeInitializeIfProxy(Object object)Deprecated.protected voidobjectWritten(ExportHibernateHandle handle)Deprecated.abstract booleanparseCustomType(Writer writer, org.hibernate.type.Type type, Object value, String xmlValue)Deprecated.protected voidrenderComponentType(Writer writer, String name, org.hibernate.type.Type type, Object value, String componentName)Deprecated.protected voidrenderEntityType(Writer writer, String name, Object value, String propertyName)Deprecated.protected voidrenderEnumType(Writer writer, String name, org.hibernate.type.Type type, Object value, String propertyName)Deprecated.protected voidrenderOtherType(Writer writer, String name, org.hibernate.type.Type type, Object value, String propertyName, boolean doType)Deprecated.protected voidrenderProperty(Writer writer, String name, org.hibernate.type.Type type, Object value, String componentName, String propertyName, String collectionName, boolean doType)Deprecated.voidtoGenericXML(Writer writer, ExportProgress progressMeter)Deprecated.XMLDatabinderunbind(Object object)Deprecated.XMLDatabinderunbindAll(Collection objects)Deprecated.Register a set of objects as being ones that should *not* be exported.protected voidwriteObject(Writer writer, ExportHibernateHandle handle, Object object, org.hibernate.persister.entity.EntityPersister persister)Deprecated.protected voidwriteObjects(Writer writer, Iterable<ExportHibernateHandle> iter)Deprecated.
-
-
-
Field Detail
-
ISO_TIMESTAMP_FORMAT
public static final String ISO_TIMESTAMP_FORMAT
Deprecated.- See Also:
- Constant Field Values
-
ISO_DATE_FORMAT
public static final String ISO_DATE_FORMAT
Deprecated.- See Also:
- Constant Field Values
-
handles
protected Set<ExportHibernateHandle> handles
Deprecated.Handles about to be or currently being iterated over bywriteObjects(Writer, Iterable).
-
bucketHandles
protected Set<ExportHibernateHandle> bucketHandles
Deprecated.Handles of propertysetitems. For some reason we do this last. It may just be tradition.
-
excludedHandles
protected Set<ExportHibernateHandle> excludedHandles
Deprecated.A set of handles for identifying Objects to skip in the export.
-
nextHandles
protected Set<ExportHibernateHandle> nextHandles
Deprecated.A set of handles to be transferred tohandlesafter the current minor iteration ofwriteObjects(Writer, Iterable).
-
processedHandles
protected Set<ExportHibernateHandle> processedHandles
Deprecated.A set of handles of object that have already been written or otherwise dealt with.
-
encoding
protected String encoding
Deprecated.
-
translator
protected final HibernateTranslator translator
Deprecated.
-
LEFT_CHEVRON
protected static final String LEFT_CHEVRON
Deprecated.- See Also:
- Constant Field Values
-
RIGHT_CHEVRON
protected static final String RIGHT_CHEVRON
Deprecated.- See Also:
- Constant Field Values
-
CARRIAGE_RETURN
protected static final String CARRIAGE_RETURN
Deprecated.- See Also:
- Constant Field Values
-
START_CLOSE_TAG
protected static final String START_CLOSE_TAG
Deprecated.- See Also:
- Constant Field Values
-
END_TAG_CARRIAGE_RETURN
protected static final String END_TAG_CARRIAGE_RETURN
Deprecated.- See Also:
- Constant Field Values
-
CONST_OPEN_CDATA
protected static final String CONST_OPEN_CDATA
Deprecated.- See Also:
- Constant Field Values
-
CONST_CLOSE_CDATA
protected static final String CONST_CLOSE_CDATA
Deprecated.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
XMLDatabinder
public XMLDatabinder(org.hibernate.engine.spi.SessionFactoryImplementor factory, String encoding, HibernateTranslator translator)Deprecated.
-
-
Method Detail
-
getPersister
protected final org.hibernate.persister.entity.EntityPersister getPersister(Class clazz) throws org.hibernate.MappingException
Deprecated.- Throws:
org.hibernate.MappingException
-
objectWritten
protected final void objectWritten(ExportHibernateHandle handle) throws org.hibernate.HibernateException
Deprecated.- Throws:
org.hibernate.HibernateException
-
incrementProgress
protected void incrementProgress() throws org.hibernate.HibernateExceptionDeprecated.We need to commit and flush session for every batch of records handled- Throws:
org.hibernate.HibernateException
-
incrementProgressTotal
protected void incrementProgressTotal()
Deprecated.
-
commit
protected void commit() throws org.hibernate.HibernateExceptionDeprecated.- Throws:
org.hibernate.HibernateException
-
toGenericXML
public void toGenericXML(Writer writer, ExportProgress progressMeter) throws org.hibernate.HibernateException, IOException
Deprecated.- Throws:
org.hibernate.HibernateExceptionIOException
-
writeObjects
protected void writeObjects(Writer writer, Iterable<ExportHibernateHandle> iter) throws org.hibernate.HibernateException, IOException
Deprecated.- Throws:
org.hibernate.HibernateExceptionIOException
-
writeObject
protected final void writeObject(Writer writer, ExportHibernateHandle handle, Object object, org.hibernate.persister.entity.EntityPersister persister) throws IOException, org.hibernate.HibernateException
Deprecated.- Throws:
IOExceptionorg.hibernate.HibernateException
-
getExportableFields
protected final List<XMLDatabinder.FieldWithType> getExportableFields(Class<?> clazz)
Deprecated.Get the exportable fields of a class from the in-memory map If the list of exportable fields is not in the map, they will be extracted from the class with the Reflection API and then put into the map- Parameters:
clazz- the class in question- Returns:
- the list of exportable fields of the input class
-
isExcludedOrProcessed
protected final boolean isExcludedOrProcessed(ExportHibernateHandle handle)
Deprecated.
-
addClass
protected final void addClass(Writer writer, Class clazz, String classAttributeName, String packageAttributeName) throws IOException
Deprecated.- Throws:
IOException
-
bind
public XMLDatabinder bind(Object object)
Deprecated.
-
unbind
public XMLDatabinder unbind(Object object)
Deprecated.
-
bindAll
public XMLDatabinder bindAll(Collection objects)
Deprecated.Register a set of objects as being ones that should be exported.- Parameters:
objects- either objects or handles.- Returns:
- itself for chaining purposes
-
unbindAll
public XMLDatabinder unbindAll(Collection objects)
Deprecated.Register a set of objects as being ones that should *not* be exported.- Parameters:
objects- either objects or handles.- Returns:
- itself for chaining purposes
-
renderProperty
protected final void renderProperty(Writer writer, String name, org.hibernate.type.Type type, Object value, String componentName, String propertyName, String collectionName, boolean doType) throws org.hibernate.HibernateException, IOException
Deprecated.- Throws:
org.hibernate.HibernateExceptionIOException
-
renderOtherType
protected final void renderOtherType(Writer writer, String name, org.hibernate.type.Type type, Object value, String propertyName, boolean doType) throws org.hibernate.HibernateException, IOException
Deprecated.- Throws:
org.hibernate.HibernateExceptionIOException
-
parseCustomType
public abstract boolean parseCustomType(Writer writer, org.hibernate.type.Type type, Object value, String xmlValue) throws IOException
Deprecated.- Throws:
IOException
-
renderEnumType
protected final void renderEnumType(Writer writer, String name, org.hibernate.type.Type type, Object value, String propertyName) throws org.hibernate.HibernateException, IOException
Deprecated.- Throws:
org.hibernate.HibernateExceptionIOException
-
renderEntityType
protected final void renderEntityType(Writer writer, String name, Object value, String propertyName) throws org.hibernate.HibernateException, IOException
Deprecated.- Throws:
org.hibernate.HibernateExceptionIOException
-
isExcludedAsProperty
protected final boolean isExcludedAsProperty(org.hibernate.type.Type type, Object obj)Deprecated.
-
renderComponentType
protected final void renderComponentType(Writer writer, String name, org.hibernate.type.Type type, Object value, String componentName) throws org.hibernate.HibernateException, IOException
Deprecated.- Throws:
org.hibernate.HibernateExceptionIOException
-
associatedObjectFound
protected final void associatedObjectFound(Object object)
Deprecated.
-
excludeClass
public void excludeClass(Class<?> clazz)
Deprecated.Mark a class as being excluded from the export. Any entities of this type will be excluded from the export.- Parameters:
clazz- type to exclude from exports.
-
excludeClassFromReferenceExport
public void excludeClassFromReferenceExport(Class<?> clazz)
Deprecated.
-
excludeClassFromEntityExport
public void excludeClassFromEntityExport(Class<?> clazz)
Deprecated.
-
-