Packageorg.restfulx.serializers
Classpublic class GenericSerializer
ImplementsISerializer
SubclassesVOSerializer, XMLSerializer

GenericSerializer groups together a few handy functions that are common, useful to all serializers. As such it is not meant to be initialized by itself but rather should be subclasses/extended.



Protected Properties
 PropertyDefined by
  state : ModelsMetadata
GenericSerializer
  types : Object
[static]
GenericSerializer
Public Methods
 MethodDefined by
  
GenericSerializer
  
marshall(object:Object, recursive:Boolean = false):Object
Serializes the object to required form.
GenericSerializer
  
unmarshall(object:Object, disconnected:Boolean = false, defaultType:String = null):Object
Unmarshalls the serialized form to object graph.
GenericSerializer
Protected Methods
 MethodDefined by
  
checkConditions(source:Object, conditions:Object):Boolean
GenericSerializer
  
getPolymorphicRef(source:Object, name:String):String
GenericSerializer
  
getRefId(id:Object):String
GenericSerializer
  
getType(node:XML):String
GenericSerializer
  
initializeModel(id:String, fqn:String, disconnected:Boolean = false):Object
GenericSerializer
  
processHasManyThroughRelationships(object:Object, fqn:String):void
GenericSerializer
  
processNestedArray(array:Object, type:String, disconnected:Boolean = false):ModelsCollection
GenericSerializer
  
unmarshallAttribute(source:Object, object:Object, attribute:Object, fqn:String, targetName:String, defaultValue:Boolean, updatingExistingReference:Boolean, disconnected:* = false):void
GenericSerializer
  
unmarshallObject(source:Object, disconnected:Boolean = false, type:String = null):Object
GenericSerializer
Property detail
stateproperty
protected var state:ModelsMetadata
typesproperty 
protected static var types:Object
Constructor detail
GenericSerializer()constructor
public function GenericSerializer()
Method detail
checkConditions()method
protected function checkConditions(source:Object, conditions:Object):BooleanParameters
source:Object
 
conditions:Object

Returns
Boolean
getPolymorphicRef()method 
protected function getPolymorphicRef(source:Object, name:String):StringParameters
source:Object
 
name:String

Returns
String
getRefId()method 
protected function getRefId(id:Object):StringParameters
id:Object

Returns
String
getType()method 
protected function getType(node:XML):StringParameters
node:XML

Returns
String
initializeModel()method 
protected function initializeModel(id:String, fqn:String, disconnected:Boolean = false):ObjectParameters
id:String
 
fqn:String
 
disconnected:Boolean (default = false)

Returns
Object
marshall()method 
public function marshall(object:Object, recursive:Boolean = false):Object

Serializes the object to required form.

Parameters
object:Object
 
recursive:Boolean (default = false)

Returns
Object

See also

processHasManyThroughRelationships()method 
protected function processHasManyThroughRelationships(object:Object, fqn:String):voidParameters
object:Object
 
fqn:String
processNestedArray()method 
protected function processNestedArray(array:Object, type:String, disconnected:Boolean = false):ModelsCollectionParameters
array:Object
 
type:String
 
disconnected:Boolean (default = false)

Returns
ModelsCollection
unmarshall()method 
public function unmarshall(object:Object, disconnected:Boolean = false, defaultType:String = null):Object

Unmarshalls the serialized form to object graph.

Parameters
object:Object
 
disconnected:Boolean (default = false)
 
defaultType:String (default = null)

Returns
Object

See also

unmarshallAttribute()method 
protected function unmarshallAttribute(source:Object, object:Object, attribute:Object, fqn:String, targetName:String, defaultValue:Boolean, updatingExistingReference:Boolean, disconnected:* = false):voidParameters
source:Object
 
object:Object
 
attribute:Object
 
fqn:String
 
targetName:String
 
defaultValue:Boolean
 
updatingExistingReference:Boolean
 
disconnected:* (default = false)
unmarshallObject()method 
protected function unmarshallObject(source:Object, disconnected:Boolean = false, type:String = null):ObjectParameters
source:Object
 
disconnected:Boolean (default = false)
 
type:String (default = null)

Returns
Object