jsdai.lang
Interface SdaiOperationIterator


public interface SdaiOperationIterator

Implicit supertype for all classes aiding to run through entity instances for which some changes (due to their modification, creation, deletion or substitution) were recorded in the log file for subsequent undo/redo operations. The records are divided into segments called groups. The classes that implement this interface are designed to iterate over instances described by records of one group.

The interface is not intended to be implemented by the user.

Since:
4.1.0

Field Summary
static int CREATE_EXTERNAL_DATA_OPERATION
           
static int CREATE_OPERATION
           
static int DELETE_OPERATION
           
static int MODIFY_OPERATION
           
static int REMOVE_EXTERNAL_DATA_OPERATION
           
static int SUBSTITUTE_OPERATION
           
 
Method Summary
 long getOperationInstanceId()
          Returns the identifier of the entity instance on which an operation was performed.
 java.lang.String getOperationInstanceLabel()
          Returns persistent label of the entity instance on which an operation was performed.
 jsdai.dictionary.EEntity_definition getOperationInstanceType()
          Returns entity data type of the instance on which an operation was performed.
 SdaiModel getOperationModel()
          Returns SdaiModel that is the owner of the entity instance on which an operation was performed.
 long getOperationPrevInstanceId()
          Returns the identifier of the entity instance for which substitute instance operation was performed (that is, this instance was substituted with another one, possibly having different entity definition).
 java.lang.String getOperationPrevInstanceLabel()
          Returns persistent label of the entity instance for which substitute instance operation was performed (that is, this instance was substituted with another one, possibly having different entity definition).
 jsdai.dictionary.EEntity_definition getOperationPrevInstanceType()
          Returns entity data type of the entity instance for which substitute instance operation was performed (that is, this instance was substituted with another one).
 SdaiModel getOperationPrevModel()
          Returns SdaiModel that is the owner of the entity instance for which substitute instance operation was performed (that is, this instance was substituted with another one).
 SdaiRepository getOperationRepository()
          Returns SdaiRepository that contains the entity instance on which an operation was performed.
 int getOperationType()
          Returns an indicator specifying the type of changes performed on the entity instance at hand.
 boolean next()
          Positions this iterator to reference the next entity instance in the sequence of instances for which records in undo/redo log file were created and combined to form a separate group.
 

Field Detail

CREATE_OPERATION

public static final int CREATE_OPERATION
See Also:
Constant Field Values

DELETE_OPERATION

public static final int DELETE_OPERATION
See Also:
Constant Field Values

MODIFY_OPERATION

public static final int MODIFY_OPERATION
See Also:
Constant Field Values

SUBSTITUTE_OPERATION

public static final int SUBSTITUTE_OPERATION
See Also:
Constant Field Values

CREATE_EXTERNAL_DATA_OPERATION

public static final int CREATE_EXTERNAL_DATA_OPERATION
Since:
4.2.0
See Also:
Constant Field Values

REMOVE_EXTERNAL_DATA_OPERATION

public static final int REMOVE_EXTERNAL_DATA_OPERATION
Since:
4.2.0
See Also:
Constant Field Values
Method Detail

next

public boolean next()
             throws SdaiException
Positions this iterator to reference the next entity instance in the sequence of instances for which records in undo/redo log file were created and combined to form a separate group. If the iterator currently references the last instance in this sequence, or is at the end of it and thus has no current member, or this sequence is empty, then the iterator is positioned to the end of the sequence of affected instances without referencing any of them. There are the following two cases:

Returns:
true if iterator has a new current member (instance), false otherwise.
Throws:
SdaiException - SY_ERR, an underlying system error occurred.

getOperationType

public int getOperationType()
                     throws SdaiException
Returns an indicator specifying the type of changes performed on the entity instance at hand. The specific constants indicating the supported types are as follows:

Returns:
an integer constant specifying the type of operation.
Throws:
SdaiException

getOperationModel

public SdaiModel getOperationModel()
                            throws SdaiException
Returns SdaiModel that is the owner of the entity instance on which an operation was performed. In the case of the substitute instance operation, this SdaiModel owns the new entity instance (substitute), not the old one (which is deleted).

Returns:
the owner of the modified (or created, or deleted) entity instance.
Throws:
SdaiException

getOperationRepository

public SdaiRepository getOperationRepository()
                                      throws SdaiException
Returns SdaiRepository that contains the entity instance on which an operation was performed. The repository is available only for CREATE_EXTERNAL_DATA_OPERATION and REMOVE_EXTERNAL_DATA_OPERATION.

Returns:
the owning SdaiRepository of the entity instance or null if repository is not known.
Throws:
SdaiException
Since:
4.2.0

getOperationInstanceLabel

public java.lang.String getOperationInstanceLabel()
                                           throws SdaiException
Returns persistent label of the entity instance on which an operation was performed. In the case of the substitute instance operation, this label stands for the new instance (substitute), not for the old one (which is deleted). If iterator has no current member, then empty string is returned.

Returns:
persistent label of the modified (or created, or deleted) entity instance.
Throws:
SdaiException

getOperationInstanceId

public long getOperationInstanceId()
                            throws SdaiException
Returns the identifier of the entity instance on which an operation was performed. In the case of the substitute instance operation, this identifier stands for the new instance (substitute), not for the old one (which is deleted).

Returns:
ID of the modified (or created, or deleted) entity instance.
Throws:
SdaiException

getOperationInstanceType

public jsdai.dictionary.EEntity_definition getOperationInstanceType()
                                                             throws SdaiException
Returns entity data type of the instance on which an operation was performed. In the case of the substitute instance operation, this data type stands for the new instance (substitute), not for the old one (which is deleted).

Returns:
entity definition of the modified (or created, or deleted) application instance.
Throws:
SdaiException

getOperationPrevInstanceLabel

public java.lang.String getOperationPrevInstanceLabel()
                                               throws SdaiException
Returns persistent label of the entity instance for which substitute instance operation was performed (that is, this instance was substituted with another one, possibly having different entity definition). If iterator has no current member, then empty string is returned.

Returns:
persistent label of the substituted entity instance.
Throws:
SdaiException

getOperationPrevInstanceId

public long getOperationPrevInstanceId()
                                throws SdaiException
Returns the identifier of the entity instance for which substitute instance operation was performed (that is, this instance was substituted with another one, possibly having different entity definition).

Returns:
ID of the substituted entity instance.
Throws:
SdaiException

getOperationPrevInstanceType

public jsdai.dictionary.EEntity_definition getOperationPrevInstanceType()
                                                                 throws SdaiException
Returns entity data type of the entity instance for which substitute instance operation was performed (that is, this instance was substituted with another one).

Returns:
entity definition of the substituted application instance.
Throws:
SdaiException

getOperationPrevModel

public SdaiModel getOperationPrevModel()
                                throws SdaiException
Returns SdaiModel that is the owner of the entity instance for which substitute instance operation was performed (that is, this instance was substituted with another one).

Returns:
the owner of the substituted entity instance.
Throws:
SdaiException

Copyright © LKSoftWare GmbH, 1999-2008