Packagecom.ericfeminella.net
Interfacepublic interface IManagedPersistence
ImplementorsLocalPersistence

Defines the contract required for managing persisted data locally, remotely or sharing persisted data in real time across a network, typically via SharedObject



Public Methods
 MethodDefined by
  
Deletes all properties from the persisted object, but not the persisted object itself
IManagedPersistence
  
deletePersistedProperty(propertyName:String):Boolean
Deletes a specified property from the persisted object
IManagedPersistence
  
destroy():void
Destroys the current persisted object
IManagedPersistence
  
getData():Object
Returns the data object of the persisted object.
IManagedPersistence
  
getIdentifier():String
Returns the name of the persisted object.
IManagedPersistence
  
Returns an array of all properties in the persisted object
IManagedPersistence
  
getPersistedProperty(propertyName:String):*
Returns the value of a user defined persisted property
IManagedPersistence
  
getSize():int
Returns the size of the persisted object.
IManagedPersistence
  
setPersistedProperty(propertyName:String, value:* = null):void
Sets the value of a user defined persisted property
IManagedPersistence
  
write(minDiskSpace:int = 1000):Boolean
Explicitly writes the persisted object to disk
IManagedPersistence
Method detail
deletePersistedProperties()method
public function deletePersistedProperties():Boolean

Deletes all properties from the persisted object, but not the persisted object itself

Returns
Boolean — true if the properties have successfully been deleted
deletePersistedProperty()method 
public function deletePersistedProperty(propertyName:String):Boolean

Deletes a specified property from the persisted object

Parameters
propertyName:String — name of the property to delete

Returns
Boolean
destroy()method 
public function destroy():void

Destroys the current persisted object

getData()method 
public function getData():Object

Returns the data object of the persisted object. The data object is typically a property of SharedObject and is used to maintain persisted data either locally or remotely

Returns
Object — the persisted object as a generic object
getIdentifier()method 
public function getIdentifier():String

Returns the name of the persisted object.

Returns
String — the name of the persisted object
getPersistedProperties()method 
public function getPersistedProperties():Array

Returns an array of all properties in the persisted object

Returns
Array — an array of all persisted properties
getPersistedProperty()method 
public function getPersistedProperty(propertyName:String):*

Returns the value of a user defined persisted property

Parameters
propertyName:String

Returns
* — the value of the property
getSize()method 
public function getSize():int

Returns the size of the persisted object.

Returns
int — the persisted object size
setPersistedProperty()method 
public function setPersistedProperty(propertyName:String, value:* = null):void

Sets the value of a user defined persisted property

Parameters
propertyName:String — name of the property to be persisted
 
value:* (default = null) — value of the property to be persisted
write()method 
public function write(minDiskSpace:int = 1000):Boolean

Explicitly writes the persisted object to disk

Parameters
minDiskSpace:int (default = 1000) — the minimum amount of disc space allocated to the persisted object

Returns
Boolean — true if the write operation was successful, false if not