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 class
XMLDatabinder.FieldWithType
Deprecated.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>
bucketHandles
Deprecated.Handles of propertysetitems.protected static String
CARRIAGE_RETURN
Deprecated.protected static String
CONST_CLOSE_CDATA
Deprecated.protected static String
CONST_OPEN_CDATA
Deprecated.protected String
encoding
Deprecated.protected static String
END_TAG_CARRIAGE_RETURN
Deprecated.protected Set<ExportHibernateHandle>
excludedHandles
Deprecated.A set of handles for identifying Objects to skip in the export.protected Set<ExportHibernateHandle>
handles
Deprecated.Handles about to be or currently being iterated over bywriteObjects(Writer, Iterable)
.static String
ISO_DATE_FORMAT
Deprecated.static String
ISO_TIMESTAMP_FORMAT
Deprecated.protected static String
LEFT_CHEVRON
Deprecated.protected Set<ExportHibernateHandle>
nextHandles
Deprecated.A set of handles to be transferred tohandles
after the current minor iteration ofwriteObjects(Writer, Iterable)
.protected Set<ExportHibernateHandle>
processedHandles
Deprecated.A set of handles of object that have already been written or otherwise dealt with.protected static String
RIGHT_CHEVRON
Deprecated.protected static String
START_CLOSE_TAG
Deprecated.protected HibernateTranslator
translator
Deprecated.
-
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 void
addClass(Writer writer, Class clazz, String classAttributeName, String packageAttributeName)
Deprecated.protected void
associatedObjectFound(Object object)
Deprecated.XMLDatabinder
bind(Object object)
Deprecated.XMLDatabinder
bindAll(Collection objects)
Deprecated.Register a set of objects as being ones that should be exported.protected void
commit()
Deprecated.void
excludeClass(Class<?> clazz)
Deprecated.Mark a class as being excluded from the export.void
excludeClassFromEntityExport(Class<?> clazz)
Deprecated.void
excludeClassFromReferenceExport(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.EntityPersister
getPersister(Class clazz)
Deprecated.protected void
incrementProgress()
Deprecated.We need to commit and flush session for every batch of records handledprotected void
incrementProgressTotal()
Deprecated.protected boolean
isExcludedAsProperty(org.hibernate.type.Type type, Object obj)
Deprecated.protected boolean
isExcludedOrProcessed(ExportHibernateHandle handle)
Deprecated.protected Object
maybeInitializeIfProxy(Object object)
Deprecated.protected void
objectWritten(ExportHibernateHandle handle)
Deprecated.abstract boolean
parseCustomType(Writer writer, org.hibernate.type.Type type, Object value, String xmlValue)
Deprecated.protected void
renderComponentType(Writer writer, String name, org.hibernate.type.Type type, Object value, String componentName)
Deprecated.protected void
renderEntityType(Writer writer, String name, Object value, String propertyName)
Deprecated.protected void
renderEnumType(Writer writer, String name, org.hibernate.type.Type type, Object value, String propertyName)
Deprecated.protected void
renderOtherType(Writer writer, String name, org.hibernate.type.Type type, Object value, String propertyName, boolean doType)
Deprecated.protected void
renderProperty(Writer writer, String name, org.hibernate.type.Type type, Object value, String componentName, String propertyName, String collectionName, boolean doType)
Deprecated.void
toGenericXML(Writer writer, ExportProgress progressMeter)
Deprecated.XMLDatabinder
unbind(Object object)
Deprecated.XMLDatabinder
unbindAll(Collection objects)
Deprecated.Register a set of objects as being ones that should *not* be exported.protected void
writeObject(Writer writer, ExportHibernateHandle handle, Object object, org.hibernate.persister.entity.EntityPersister persister)
Deprecated.protected void
writeObjects(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 tohandles
after 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.HibernateException
Deprecated.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.HibernateException
Deprecated.- Throws:
org.hibernate.HibernateException
-
toGenericXML
public void toGenericXML(Writer writer, ExportProgress progressMeter) throws org.hibernate.HibernateException, IOException
Deprecated.- Throws:
org.hibernate.HibernateException
IOException
-
writeObjects
protected void writeObjects(Writer writer, Iterable<ExportHibernateHandle> iter) throws org.hibernate.HibernateException, IOException
Deprecated.- Throws:
org.hibernate.HibernateException
IOException
-
writeObject
protected final void writeObject(Writer writer, ExportHibernateHandle handle, Object object, org.hibernate.persister.entity.EntityPersister persister) throws IOException, org.hibernate.HibernateException
Deprecated.- Throws:
IOException
org.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.HibernateException
IOException
-
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.HibernateException
IOException
-
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.HibernateException
IOException
-
renderEntityType
protected final void renderEntityType(Writer writer, String name, Object value, String propertyName) throws org.hibernate.HibernateException, IOException
Deprecated.- Throws:
org.hibernate.HibernateException
IOException
-
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.HibernateException
IOException
-
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.
-
-