| Package | org.servebox.commons.map |
| Class | public class MapUtils |
| Method | Defined by | ||
|---|---|---|---|
|
getDictionaryTableFromObjectAccessors(dt:DictionaryTable, obj:IBasicObject, keepObjects:Boolean = false):DictionaryTable
[static]
Copies the properties of the object inside the DictionaryTable.
| MapUtils | ||
|
[static]
Creates an object and fill it by mapping the DictionaryTable key/value pairs to the object accessors.
| MapUtils | ||
|
[static]
Unserializes an object from a DictionaryTable using
keyRoot as the root property path. | MapUtils | ||
|
recursiveAccessorsPut(dt:DictionaryTable, obj:IBasicObject, keyRoot:String = "", keepObjects:Boolean = false):void
[static]
Serializes an object to a DictionaryTable using
keyRoot as the root property path. | MapUtils | ||
|
registerSubTypeMapping(type:String, clazz:Class, ignoreRecursion:Boolean = false):void
[static]
Registers a type mapping used to instantiate sub-objects while using
getObjectFromDictionaryTable method. | MapUtils | ||
| Constant | Defined by | ||
|---|---|---|---|
| PROPERTY_SEPARATOR : String = "$" [static]
The separator used to when flattening an IBasicObject.
| MapUtils | ||
| getDictionaryTableFromObjectAccessors | () | method |
public static function getDictionaryTableFromObjectAccessors(dt:DictionaryTable, obj:IBasicObject, keepObjects:Boolean = false):DictionaryTableCopies the properties of the object inside the DictionaryTable. IBasicObject instances will be recursively flattened. if keepObjects = true IBasicObject will also be stored not flattened.
Parametersdt:DictionaryTable |
|
obj:IBasicObject |
|
keepObjects:Boolean (default = false) |
DictionaryTable |
| getObjectFromDictionaryTable | () | method |
public static function getObjectFromDictionaryTable(dt:DictionaryTable, obj:Class):IBasicObjectCreates an object and fill it by mapping the DictionaryTable key/value pairs to the object accessors.
Parametersdt:DictionaryTable |
|
obj:Class |
IBasicObject |
| recursiveAccessorsGet | () | method |
public static function recursiveAccessorsGet(dt:DictionaryTable, obj:IBasicObject, key:String = ""):IBasicObject
Unserializes an object from a DictionaryTable using keyRoot as the root property path.
dt:DictionaryTable |
|
obj:IBasicObject |
|
key:String (default = "") |
IBasicObject |
| recursiveAccessorsPut | () | method |
public static function recursiveAccessorsPut(dt:DictionaryTable, obj:IBasicObject, keyRoot:String = "", keepObjects:Boolean = false):void
Serializes an object to a DictionaryTable using keyRoot as the root property path.
dt:DictionaryTable |
|
obj:IBasicObject |
|
keyRoot:String (default = "") |
|
keepObjects:Boolean (default = false) |
| registerSubTypeMapping | () | method |
public static function registerSubTypeMapping(type:String, clazz:Class, ignoreRecursion:Boolean = false):void
Registers a type mapping used to instantiate sub-objects while using getObjectFromDictionaryTable method.
Useful only while serializing objects to DictionaryTable instances, and the subobjects are interfaces.
e.g :
type:String |
|
clazz:Class |
|
ignoreRecursion:Boolean (default = false) |
See also
| PROPERTY_SEPARATOR | constant |
public static const PROPERTY_SEPARATOR:String = "$"The separator used to when flattening an IBasicObject.