org.eclipse.persistence.oxm
Class JSONWithPadding<T>
java.lang.Object
org.eclipse.persistence.oxm.JSONWithPadding<T>
public class JSONWithPadding<T>
- extends java.lang.Object
JSONWithPadding is used to hold an Object along with the corresponding callback name
to marshal.
Sample Usage:
JSONWithPadding jsonWithPaddingObject = new JSONWithPadding(person, "theCallBackName");
Marshal this jsonWithPaddingObject object would result in JSON like this:
theCallBackName({"person":{"id":10,"name":"Bob"}});
Method Summary |
java.lang.String |
getCallbackName()
The callback name that should me marshalled with the object |
T |
getObject()
The Object that will be marshalled |
void |
setCallbackName(java.lang.String callbackName)
The callback name that should me marshalled with the object |
void |
setObject(T rootObject)
The Object to be marshalled |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_CALLBACK_NAME
public static final java.lang.String DEFAULT_CALLBACK_NAME
- See Also:
- Constant Field Values
JSONWithPadding
public JSONWithPadding()
JSONWithPadding
public JSONWithPadding(T rootObject)
JSONWithPadding
public JSONWithPadding(T rootObject,
java.lang.String callbackName)
getObject
public T getObject()
- The Object that will be marshalled
- Returns:
setObject
public void setObject(T rootObject)
- The Object to be marshalled
- Parameters:
rootObject
-
getCallbackName
public java.lang.String getCallbackName()
- The callback name that should me marshalled with the object
- Returns:
setCallbackName
public void setCallbackName(java.lang.String callbackName)
- The callback name that should me marshalled with the object