Adobe® Flex® 4 Language Reference
Show Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
mx.data 
ManagedAssociation 
Packagemx.data
Classpublic class ManagedAssociation
InheritanceManagedAssociation Inheritance Object
Implements IExternalizable

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

This class is used to represent an association as part of the data management metadata. An association is used to represent a property of one object which refers to an instance or collection of instance of another managed type. These instances may be created automatically from server side configuration or automatically in the code generated wrappers. It is also possible to create these in those cases where the configuration is defined entirely in the runtime ActionScript code.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  destination : String
Destination this association references.
ManagedAssociation
  hierarchicalEvents : Boolean
Indicates whether or not the parent of this association receives events from properties of the objects referenced by the association.
ManagedAssociation
  lazy : Boolean
[read-only] If true, the value of the association property is loaded on the client the first time it is accessed instead of when the referencing object is loaded.
ManagedAssociation
  loadOnDemand : Boolean
Indicates whether or not this association's value is retrieved from the server when the original item state is retrieved.
ManagedAssociation
  pagedUpdates : Boolean = false
When true, updates to the set of associated instances for this association are made in increments of pageSize.
ManagedAssociation
  pageSize : int = 0
Size of page to use for communication of changes to the set of associated instances for this association.
ManagedAssociation
  property : String
Name of the property that this association is established on.
ManagedAssociation
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
  readOnly : Boolean
Contains true if this association is read-only from the perspective of the assembler.
ManagedAssociation
  type : String
Indicates what type of association this is.
ManagedAssociation
  typeCode : uint
[read-only] Indicates what type of association this is.
ManagedAssociation
Public Methods
 MethodDefined By
  
ManagedAssociation(info:XML = null)
Constructs an instance of metadata with the specified XML snippet that contains the relationship and service reference information.
ManagedAssociation
  
Bit mask representing the attributes of this managed association.
ManagedAssociation
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
A class implements this method to decode itself from a data stream by calling the methods of the IDataInput interface.
ManagedAssociation
  
Sets the attributes of this association based on the passed in bit mask.
ManagedAssociation
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
 Inherited
Returns the primitive value of the specified object.
Object
  
This method will serialize this cache to the specified output stream.
ManagedAssociation
Public Constants
 ConstantDefined By
  MANY : uint = 0
[static] Indicates that this is a many-to-many or one-to-many relationship.
ManagedAssociation
  ONE : uint = 1
[static] Indicates that this is a one-to-one relationship.
ManagedAssociation
Property Detail

destination

property
destination:String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Destination this association references. Any property configured as an association must reference another data service destination.



Implementation
    public function get destination():String
    public function set destination(value:String):void

hierarchicalEvents

property 
hierarchicalEvents:Boolean

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Indicates whether or not the parent of this association receives events from properties of the objects referenced by the association.



Implementation
    public function get hierarchicalEvents():Boolean
    public function set hierarchicalEvents(value:Boolean):void

lazy

property 
lazy:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

If true, the value of the association property is loaded on the client the first time it is accessed instead of when the referencing object is loaded.



Implementation
    public function get lazy():Boolean

loadOnDemand

property 
loadOnDemand:Boolean

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Indicates whether or not this association's value is retrieved from the server when the original item state is retrieved.



Implementation
    public function get loadOnDemand():Boolean
    public function set loadOnDemand(value:Boolean):void

pagedUpdates

property 
public var pagedUpdates:Boolean = false

When true, updates to the set of associated instances for this association are made in increments of pageSize. When false, the entire set is updated at once.

pageSize

property 
public var pageSize:int = 0

Size of page to use for communication of changes to the set of associated instances for this association. Only relevant when pagedUpdates is true.

property

property 
property:String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Name of the property that this association is established on.



Implementation
    public function get property():String
    public function set property(value:String):void

readOnly

property 
readOnly:Boolean

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Contains true if this association is read-only from the perspective of the assembler. Usually this is set to true on the inverse side of an association. The assembler does not have to persist a value change from a read-only association so they are not passed to the change handler. You should typically still update the read-only association property in your code as FDMS does not update the inverse side of the relationship automatically.



Implementation
    public function get readOnly():Boolean
    public function set readOnly(value:Boolean):void

type

property 
type:String

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Indicates what type of association this is. Values are: Association.MANY or Association.ONE.



Implementation
    public function get type():String
    public function set type(value:String):void

typeCode

property 
typeCode:uint  [read-only]

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Indicates what type of association this is. Values are: Association.MANY or Association.ONE.



Implementation
    public function get typeCode():uint
Constructor Detail

ManagedAssociation

()Constructor
public function ManagedAssociation(info:XML = null)

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Constructs an instance of metadata with the specified XML snippet that contains the relationship and service reference information.

Parameters
info:XML (default = null) — XML containing the association information.

Throws
ArgumentError — If required information is missing.
Method Detail

getAttributeMask

()method
public function getAttributeMask():uint

Bit mask representing the attributes of this managed association. Starting with the smallest order bit: First bit - on when this association is lazy. Second bit - on when the association is loaded on demand. Third bit - on when the association is read only. Foruth bit - on when hierarchical events are enabled. Fifth bit - on when hierarchical events have been set. Sixth bit - on when updates are paged.

Returns
uint — bit mask representing the attributes of this managed association.

readExternal

()method 
public function readExternal(input:IDataInput):void

A class implements this method to decode itself from a data stream by calling the methods of the IDataInput interface. This method must read the values in the same sequence and with the same types as were written by the writeExternal() method.

Parameters

input:IDataInput — The name of the class that implements the IDataInput interface.

setAttributeMask

()method 
public function setAttributeMask(mask:uint):void

Sets the attributes of this association based on the passed in bit mask. Starting with the smallest order bit: First bit - on when this association is lazy. Second bit - on when the association is loaded on demand. Third bit - on when the association is read only. Foruth bit - on when hierarchical events are enabled. Fifth bit - on when hierarchical events have been set. Sixth bit - on when updates are paged.

Parameters

mask:uint — bit mask representing the attributes of this managed association.

writeExternal

()method 
public function writeExternal(output:IDataOutput):void

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

This method will serialize this cache to the specified output stream. Currently this is being used for offline data caching.

Parameters

output:IDataOutput

Constant Detail

MANY

Constant
public static const MANY:uint = 0

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Indicates that this is a many-to-many or one-to-many relationship.

ONE

Constant 
public static const ONE:uint = 1

Language Version: ActionScript 3.0
Product Version: LiveCycle Data Services 3
Runtime Versions: Flash Player 9, AIR 1.1

Indicates that this is a one-to-one relationship.