public abstract class AbstractMarshallingSession extends Object implements MarshallingSession
Modifier | Constructor and Description |
---|---|
protected |
AbstractMarshallingSession(MappingContext context) |
Modifier and Type | Method and Description |
---|---|
String |
getAssumedElementType() |
String |
getAssumedMapKeyType() |
String |
getAssumedMapValueType() |
MappingContext |
getMappingContext() |
Marshaller<Object> |
getMarshallerInstance(String fqcn)
Returns a marshaller for the provided type.
|
<T> T |
getObject(Class<T> type,
String hashCode)
Looks up the object based on the specified hashCode identifier.
|
String |
getObject(Object reference)
Returns a unique identifier for the specified object reference.
|
boolean |
hasObject(Object reference)
Checks if the object is already in the context based on the object reference.
|
boolean |
hasObject(String hashCode)
Checks if the object is already in the context based on the hash code.
|
<T> T |
recordObject(String hashCode,
T instance)
Records a new object to the session with the specified hashCode identifier.
|
void |
resetAssumedTypes() |
void |
setAssumedElementType(String assumendElementType) |
void |
setAssumedMapKeyType(String assumedMapKeyType) |
void |
setAssumedMapValueType(String assumedMapValueType) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
determineTypeFor
protected AbstractMarshallingSession(MappingContext context)
public Marshaller<Object> getMarshallerInstance(String fqcn)
MarshallingSession
getMarshallerInstance
in interface MarshallingSession
fqcn
- fully qualified class name of the type to be marshalled, in the
format returned by Class.getName()
and
MetaClass.getFullyQualifiedName()
.
Null is permitted, and yields a marshaller that can only marshal
and demarshal null references.public MappingContext getMappingContext()
getMappingContext
in interface MarshallingSession
public boolean hasObject(String hashCode)
MarshallingSession
hasObject
in interface MarshallingSession
hashCode
- the hash codepublic boolean hasObject(Object reference)
MarshallingSession
hasObject
in interface MarshallingSession
reference
- the entity referencepublic <T> T getObject(Class<T> type, String hashCode)
MarshallingSession
getObject
in interface MarshallingSession
T
- the type of entity being looked uptype
- the type of entity being looked uphashCode
- the identifier of the entity within the sessionpublic <T> T recordObject(String hashCode, T instance)
MarshallingSession
recordObject
in interface MarshallingSession
hashCode
- a unique identifierinstance
- the instance of the entity.public String getObject(Object reference)
MarshallingSession
getObject
in interface MarshallingSession
reference
- the entity referencepublic String getAssumedElementType()
getAssumedElementType
in interface MarshallingSession
public void setAssumedElementType(String assumendElementType)
setAssumedElementType
in interface MarshallingSession
public String getAssumedMapKeyType()
getAssumedMapKeyType
in interface MarshallingSession
public void setAssumedMapKeyType(String assumedMapKeyType)
setAssumedMapKeyType
in interface MarshallingSession
public String getAssumedMapValueType()
getAssumedMapValueType
in interface MarshallingSession
public void setAssumedMapValueType(String assumedMapValueType)
setAssumedMapValueType
in interface MarshallingSession
public void resetAssumedTypes()
resetAssumedTypes
in interface MarshallingSession
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.