public class EntitySerializer
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
protected Marshaller |
createMarshaller(java.io.StringWriter wr) |
static EntitySerializer |
getEntitySerializer(java.util.logging.Logger logger)
Singleton accessor.
|
XmlEntityStruct |
serializeEntity(java.lang.Object entityObject)
Marshals an entity object to the CORBA struct used for transport.
|
XmlEntityStruct |
serializeEntity(java.lang.Object entityObject,
EntityT entityMeta)
Marshals an entity object to the CORBA struct used for transport.
|
java.lang.String |
serializeEntityPart(java.lang.Object entityPart)
Serializes a binding class object which is a part (child node) of some other full Entity object.
|
void |
setVerbose(boolean verbose) |
void |
setXmlEntityFactory(XmlEntityStructFactory esf)
Makes this
EntitySerializer use a client-supplied factory
for XmlEntityStruct objects. |
public static EntitySerializer getEntitySerializer(java.util.logging.Logger logger)
logger - Logger to be used
(may be null in subsequent invocations since only one instance of
EntitySerializer is constructed and then reused)public void setXmlEntityFactory(XmlEntityStructFactory esf)
EntitySerializer use a client-supplied factory
for XmlEntityStruct objects.
You should use this method if you wish to get a subclass of
alma.xmlentity.XmlEntityStruct returned from the
serializeEntity methods.
esf - the factory to be usedpublic XmlEntityStruct serializeEntity(java.lang.Object entityObject,
EntityT entityMeta)
throws EntityException
entityObject - the entity object as a binding class, currently generated by castor.entityMeta - usually subtype of EntityT.entityObject is null.EntityExceptionpublic XmlEntityStruct serializeEntity(java.lang.Object entityObject)
throws EntityException
serializeEntity(Object, EntityT), the child of type
EntityT that has the administrational information about the
entity object, is not given as a parameter.
It will be accessed dynamically using EntityTFinder, which makes this
method slightly slower than its 2-parameter companion.
It's meant to be used rather by generic code that doesn't know about particular entity classes.entityObject - the entity object as a binding classentityObject is null.EntityExceptionpublic java.lang.String serializeEntityPart(java.lang.Object entityPart)
throws EntityException
entityPart - the binding object, e.g. of type alma.entity.xmlbinding.schedblock.CorrelatorConfigT.entityPart.EntityException - if the operation could not be performedserializeEntity(Object),
serializeEntity(Object, EntityT)protected Marshaller createMarshaller(java.io.StringWriter wr)
throws java.io.IOException
java.io.IOExceptionpublic void setVerbose(boolean verbose)