패키지 | mx.data |
클래스 | public class MessageBatch |
상속 | MessageBatch EventDispatcher Object |
구현 | IExternalizable |
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
DataStore.currentBatch
property. Changes you make such as property changes detected automatically through
data binding, createItem()
, updateItem()
, or deleteItem()
operations are stored in this
batch. The current list of uncommitted batches is stored in the uncommittedBatches
property.
You call createBatch create a new batch which is added to the end of the list. This batch
is automatically made the currentBatch.
You can commit or revert the set of a changes a batch at a time - in both cases, the batch is
automatically removed from the uncommittedBatches list.
When there are dependencies between changes, you should commit and revert changes in order - i.e. commit the oldest batch in the list (uncommittedBatches[0]) and revert the most recent batch - uncommittedBatches[uncommittedBatches.length - 1].
The commitRequired
property is set to true when there are any changes in the batch
(i.e. items.length > 0). The items property stores the set of DataMessages in this batch.
You can store custom information in a MessageBatch via the properties
property. Batches are saved/restored each time you use the saveCache method
or automatically when autoSaveCache
is true when using the offline feature.
Each batch also has a DataMessage associated with it in the batchMessage
property.
If you need to communicate information with the server (and you are sending the batch
message to the server) you can store info in the headers of this message.
속성 | 정의 주체 | ||
---|---|---|---|
batchMessage : DataMessage
This is the data message used to represent the batch being sent to the server. | MessageBatch | ||
commitRequired : Boolean [읽기 전용]
True if any changes are in this batch. | MessageBatch | ||
constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | ||
properties : Object = null
An optional set of user defined properties you can set for this batch. | MessageBatch |
메서드 | 정의 주체 | ||
---|---|---|---|
Constructor. | MessageBatch | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다. | EventDispatcher | ||
Commits the changes in the batch. | MessageBatch | ||
Indicates if there are pending changes for this particular item. | MessageBatch | ||
이벤트를 이벤트 흐름으로 전달합니다. | EventDispatcher | ||
Returns the message with the given id. | MessageBatch | ||
EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
This method deserializes the message batch. | MessageBatch | ||
EventDispatcher 객체에서 리스너를 제거합니다. | EventDispatcher | ||
Removes the specified message from this batch. | MessageBatch | ||
Reverts the changes for this batch, either all changes if no item is supplied,
or just the changes for the specified item if it is supplied. | MessageBatch | ||
Reverts the changes for all items in the specified managed collection. | MessageBatch | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
[재정의]
Returns a String representation of this object. | MessageBatch | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object | ||
이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher | ||
This method serializes the batch with the following stucture:
numberOfElements:int - this is the total number of elements serialized
[repeated element (once for every message in the batch)]
destination:String - the destination of the associated DataService
uid:String - the UID of the associated item
message:DataMessage - the message for the associated change
Because the message currently contains a copy of the item we don't have
to serialize the message in a special way. | MessageBatch |
상수 | 정의 주체 | ||
---|---|---|---|
items : ArrayCollection
This stores the list of MessageCacheItem instances which represent the
changes in the batch. | MessageBatch |
batchMessage | 속성 |
public var batchMessage:DataMessage
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
This is the data message used to represent the batch being sent to the server. If you need to pass additional per-transaction information you might use the headers of this message to communicate with your server code (assuming it actually sends the message instead of converting it on the client).
commitRequired | 속성 |
commitRequired:Boolean
[읽기 전용] 언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
True if any changes are in this batch. This is a bindable property.
이 속성은 데이터 바인딩에 대한 소스로 사용할 수 있습니다. 이 속성을 수정하면 propertyChange
이벤트를 전달합니다.
구현
public function get commitRequired():Boolean
properties | 속성 |
public var properties:Object = null
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
An optional set of user defined properties you can set for this batch.
MessageBatch | () | 생성자 |
public function MessageBatch()
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Constructor.
commit | () | 메서드 |
public function commit(itemsOrCollections:Array = null, cascadeCommit:Boolean = false):mx.rpc:AsyncToken
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Commits the changes in the batch. Typically called with no arguments.
매개 변수
itemsOrCollections:Array (default = null ) — If you want to commit only some of the changes in the batch,
you can commit changes for an item at a time or a collection of items at a time
by setting the itemsOrCollections parameter.
| |
cascadeCommit:Boolean (default = false ) — Set to true to ensure that changes to associated items
are also included in the commit.
|
mx.rpc:AsyncToken — AsyncToken reference to the token that will identify this
operation in a result or fault event dispatched from this service.
|
commitRequiredOn | () | 메서드 |
public function commitRequiredOn(item:Object):Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3.1 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Indicates if there are pending changes for this particular item.
매개 변수
item:Object — The object that might have changes.
|
Boolean — true if the item has pending changes.
|
getMessage | () | 메서드 |
public function getMessage(messageId:String):DataMessage
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Returns the message with the given id. Returns null of no message with the given id exists in this batch.
매개 변수
messageId:String — id of desired message.
|
DataMessage — the message with the given id. Returns null of no message
with the given id exists in this batch.
|
readExternal | () | 메서드 |
public function readExternal(input:IDataInput):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
This method deserializes the message batch. It expects the input byte stream to have the following structure:
- numberOfElements:int - this is the total number of elements serialized [repeated element (once for every message in the batch)] t]
- destination:String - the destination of the associated DataService
- uid:String - the UID of the associated item
- message:DataMessage - the message for the associated change
매개 변수
input:IDataInput — input stream
|
removeMessage | () | 메서드 |
public function removeMessage(msg:DataMessage):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Removes the specified message from this batch.
매개 변수
msg:DataMessage — message to be removed.
|
revertChanges | () | 메서드 |
public function revertChanges(item:IManaged = null):Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Reverts the changes for this batch, either all changes if no item is supplied, or just the changes for the specified item if it is supplied. You should typically only revert changes in the most recent batch as the system does not resolve or fix dependencies if you revert an older change which was depended upon by a later change.
매개 변수
item:IManaged (default = null ) — The item to revert.
|
Boolean — true if the revert completed successfully.
|
revertChangesForCollection | () | 메서드 |
public function revertChangesForCollection(collection:ListCollectionView):Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Reverts the changes for all items in the specified managed collection.
매개 변수
collection:ListCollectionView — The collection to revert.
|
Boolean — true if the revert completed successfully.
|
toString | () | 메서드 |
writeExternal | () | 메서드 |
public function writeExternal(output:IDataOutput):void
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
This method serializes the batch with the following stucture:
- numberOfElements:int - this is the total number of elements serialized [repeated element (once for every message in the batch)]
- destination:String - the destination of the associated DataService
- uid:String - the UID of the associated item
- message:DataMessage - the message for the associated change
Because the message currently contains a copy of the item we don't have to serialize the message in a special way.
매개 변수
output:IDataOutput — object to write serialized bytes to.
|
items | 상수 |
public const items:ArrayCollection
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3 |
런타임 버전: | Flash Player 9, AIR 1.1 |
This stores the list of MessageCacheItem instances which represent the changes in the batch. It is bindable so you can listen for change events on this collection to be notified of new changes.
Tue Jun 12 2018, 03:17 PM Z