LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.data
Class LyOperation

java.lang.Object
  extended by leon.data.LyOperation
All Implemented Interfaces:
java.lang.Comparable<LyOperation>

public class LyOperation
extends java.lang.Object
implements java.lang.Comparable<LyOperation>

This class represents an operation in a context.

See Also:
LyContext, LyObject

Nested Class Summary
static class LyOperation.Type
          Operation types.
 
Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LyOperation(LyContext context, java.util.ArrayList<LyOperation> operations)
          Construct a new operation.
LyOperation(LyContext context, LyOperation.Type type, LyObject object)
          Constructs a new operation.
LyOperation(LyContext context, LyOperation.Type type, LyObject object, LyValueSet values)
          Constructs a new operation.
 
Method Summary
 int compareTo(LyOperation operation)
          Implementation of the Comparable interface.
 void free()
          Free this operation.
 java.util.Vector<LyError> getErrors(short level)
          Gets the list of errors on locked objects with the specified level.
 LyObject getObject()
          Gets the object impacted by this operation.
 LyOperation.Type getOperation()
          Deprecated. Use getType().
 LyOperation.Type getType()
          To get the type of the current operation.
 java.lang.String toString()
          Gets this object as a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LyOperation

public LyOperation(LyContext context,
                   LyOperation.Type type,
                   LyObject object)
Constructs a new operation.

Parameters:
context - the context of the operation
type - the type of the operation
object - the object impacted by the operation

LyOperation

public LyOperation(LyContext context,
                   LyOperation.Type type,
                   LyObject object,
                   LyValueSet values)
Constructs a new operation.

Parameters:
context - the context of the operation
type - the type of the operation
object - the object impacted by the operation
values - the set of values for modifying the given object.

LyOperation

public LyOperation(LyContext context,
                   java.util.ArrayList<LyOperation> operations)
Construct a new operation.

Parameters:
context - the context of the operation.
operations - List of sub operations to add in this operation.
Method Detail

getObject

public LyObject getObject()
Gets the object impacted by this operation.

Returns:
The object impacted by this operation (may be null).

free

public void free()
Free this operation.


compareTo

public int compareTo(LyOperation operation)
Implementation of the Comparable interface. This method is used to order operations by date.

Specified by:
compareTo in interface java.lang.Comparable<LyOperation>
Parameters:
o - The operation to compare
Returns:
0 if the two objects are equals, 1 if this operation is greater, -1 otherwise.

getType

public LyOperation.Type getType()
To get the type of the current operation.

Returns:
The type of the current operation.

getOperation

public LyOperation.Type getOperation()
Deprecated. Use getType().

To get the type of the current operation.

Returns:
The type of the current operation.

toString

public java.lang.String toString()
Gets this object as a string.

Overrides:
toString in class java.lang.Object
Returns:
A string represention of this operation.

getErrors

public java.util.Vector<LyError> getErrors(short level)
Gets the list of errors on locked objects with the specified level.

Parameters:
level - Level of the errors
Returns:
The list of errors with the specified level for locked objects or null if there is no errors.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com