| Package | org.granite.tide.data |
| Class | public class EntityManager |
| Property | Defined by | ||
|---|---|---|---|
| dirty : Boolean [read-only]
Entity manager is dirty when any entity/collection/map has been modified
| EntityManager | ||
| dirtyCheckEnabled : Boolean [write-only]
Enables or disabled dirty checking in this context
| EntityManager | ||
| mergeConflicts : Conflicts
[read-only]
List of conflicts detected during last merge operation
| EntityManager | ||
| savedProperties : Dictionary [read-only]
Current map of saved properties
| EntityManager | ||
| Method | Defined by | ||
|---|---|---|---|
|
EntityManager(context:BaseContext)
| EntityManager | ||
|
clearDirtyState(dispatch:Boolean = true):void
Clear the current dirty state context
| EntityManager | ||
|
defaultMerge(em:IEntityManager, obj:Object, dest:Object, mergeUpdate:Boolean = true, expr:IExpression = null, parent:Object = null, propertyName:String = null):void
[static]
Default implementation of entity merge for simple ActionScript beans with public properties
Can be used to implement Tide managed entities with simple objects
| EntityManager | ||
|
getRefs(object:Object):Array
| EntityManager | ||
|
handleMergeConflicts():void
Dispatch an event when last merge generated conflicts
| EntityManager | ||
|
handleRemovalsAndPersists(removals:Array, persists:Array = null):void
Remove elements from cache and managed collections
| EntityManager | ||
|
isEntityChanged(entity:IEntity, propName:String = null, value:* = null):Boolean
Check if entity has changed since last save point
| EntityManager | ||
|
isEntityDeepChanged(entity:IEntity):Boolean
| EntityManager | ||
|
isEntityPropertyChanged(entity:IEntity, propertyName:String, value:Object):Boolean
Check if entity property has been changed since last remote call
| EntityManager | ||
|
isSimple(object:Object):Boolean
[static]
| EntityManager | ||
|
mergeExternal(obj:Object, previous:Object = null, expr:IExpression = null, parent:Object = null, propertyName:String = null, setter:Function = null, forceUpdate:Boolean = false):Object
Merge an object coming from the server in the context
| EntityManager | ||
|
mergeInContext(context:BaseContext):void
Merge conversation context variables in global context
Only applicable to conversation contexts
| EntityManager | ||
|
objectEquals(obj1:Object, obj2:Object):Boolean
Equality for objects, using uid property when possible
| EntityManager | ||
|
resetAllEntities(cache:Dictionary):void
Discard changes of all cached entities from last version received from the server
| EntityManager | ||
|
resetEntity(entity:IEntity, cache:Dictionary):void
Discard changes of entity from last version received from the server
| EntityManager | ||
|
resolveMergeConflicts(modifiedEntity:Object, localEntity:Object, resolving:Boolean):void
| EntityManager | ||
| Constant | Defined by | ||
|---|---|---|---|
| INITIALIZE : String = "initialize" [static]
| EntityManager | ||
| LOAD_STATE_CHANGE : String = "loadStateChange" [static]
| EntityManager | ||
| UNINITIALIZE : String = "uninitialize" [static]
| EntityManager | ||
| dirty | property |
dirty:Boolean [read-only]Entity manager is dirty when any entity/collection/map has been modified
Implementation public function get dirty():Boolean
| dirtyCheckEnabled | property |
dirtyCheckEnabled:Boolean [write-only]Enables or disabled dirty checking in this context
Implementation public function set dirtyCheckEnabled(value:Boolean):void
| mergeConflicts | property |
mergeConflicts:Conflicts [read-only]List of conflicts detected during last merge operation
Implementation public function get mergeConflicts():Conflicts
| savedProperties | property |
savedProperties:Dictionary [read-only]Current map of saved properties
Implementation public function get savedProperties():Dictionary
| EntityManager | () | constructor |
| clearDirtyState | () | method |
public function clearDirtyState(dispatch:Boolean = true):voidClear the current dirty state context
Parametersdispatch:Boolean (default = true) — dispatch a PropertyChangeEvent on meta_dirty if the context was dirty before clearing
|
| defaultMerge | () | method |
public static function defaultMerge(em:IEntityManager, obj:Object, dest:Object, mergeUpdate:Boolean = true, expr:IExpression = null, parent:Object = null, propertyName:String = null):voidDefault implementation of entity merge for simple ActionScript beans with public properties Can be used to implement Tide managed entities with simple objects
Parametersem:IEntityManager — the context
|
|
obj:Object — source object
|
|
dest:Object — destination object
|
|
mergeUpdate:Boolean (default = true) — current path of the entity in the context (mostly for internal use)
|
|
expr:IExpression (default = null) — owning object
|
|
parent:Object (default = null) — property name of the owning object
|
|
propertyName:String (default = null) |
| getRefs | () | method |
public function getRefs(object:Object):ArrayParameters
object:Object |
Array |
| handleMergeConflicts | () | method |
public function handleMergeConflicts():voidDispatch an event when last merge generated conflicts
| handleRemovalsAndPersists | () | method |
public function handleRemovalsAndPersists(removals:Array, persists:Array = null):voidRemove elements from cache and managed collections
Parametersremovals:Array — array of entity instances to remove from the cache
|
|
persists:Array (default = null) |
| isEntityChanged | () | method |
public function isEntityChanged(entity:IEntity, propName:String = null, value:* = null):BooleanCheck if entity has changed since last save point
Parametersentity:IEntity — entity to restore
|
|
propName:String (default = null) — property name
|
|
value:* (default = null) |
Boolean — entity is dirty
|
| isEntityDeepChanged | () | method |
public function isEntityDeepChanged(entity:IEntity):BooleanParameters
entity:IEntity |
Boolean |
| isEntityPropertyChanged | () | method |
public function isEntityPropertyChanged(entity:IEntity, propertyName:String, value:Object):BooleanCheck if entity property has been changed since last remote call
Parametersentity:IEntity — entity to check
|
|
propertyName:String — property to check
|
|
value:Object — current value to compare with saved value
|
Boolean — true is value has been changed
|
| isSimple | () | method |
public static function isSimple(object:Object):BooleanParameters
object:Object |
Boolean |
| mergeExternal | () | method |
public function mergeExternal(obj:Object, previous:Object = null, expr:IExpression = null, parent:Object = null, propertyName:String = null, setter:Function = null, forceUpdate:Boolean = false):ObjectMerge an object coming from the server in the context
Parametersobj:Object — external object
|
|
previous:Object (default = null) — previously existing object in the context (null if no existing object)
|
|
expr:IExpression (default = null) — current path from the context
|
|
parent:Object (default = null) — parent object for collections
|
|
propertyName:String (default = null) — property name of the current object in the parent object
|
|
setter:Function (default = null) — setter function to update the private property
|
|
forceUpdate:Boolean (default = false) — force update of property (used for externalized properties)
|
Object — merged object (should === previous when previous not null)
|
| mergeInContext | () | method |
public function mergeInContext(context:BaseContext):voidMerge conversation context variables in global context Only applicable to conversation contexts
Parameterscontext:BaseContext |
| objectEquals | () | method |
public function objectEquals(obj1:Object, obj2:Object):BooleanEquality for objects, using uid property when possible
Parametersobj1:Object — object
|
|
obj2:Object — object
|
Boolean — true when objects are instances of the same entity
|
| resetAllEntities | () | method |
public function resetAllEntities(cache:Dictionary):voidDiscard changes of all cached entities from last version received from the server
Parameterscache:Dictionary |
| resetEntity | () | method |
public function resetEntity(entity:IEntity, cache:Dictionary):voidDiscard changes of entity from last version received from the server
Parametersentity:IEntity — entity to restore
|
|
cache:Dictionary |
| resolveMergeConflicts | () | method |
public function resolveMergeConflicts(modifiedEntity:Object, localEntity:Object, resolving:Boolean):voidParameters
modifiedEntity:Object |
|
localEntity:Object |
|
resolving:Boolean |
| INITIALIZE | constant |
public static const INITIALIZE:String = "initialize"
| LOAD_STATE_CHANGE | constant |
public static const LOAD_STATE_CHANGE:String = "loadStateChange"
| UNINITIALIZE | constant |
public static const UNINITIALIZE:String = "uninitialize"