org.infolayer.model
Class UmlOperation

java.lang.Object
  extended byorg.infolayer.model.UmlModelElement
      extended byorg.infolayer.model.Feature
          extended byorg.infolayer.model.UmlOperation
All Implemented Interfaces:
java.lang.Cloneable, org.ksoap2.serialization.KvmSerializable, ToSql

public class UmlOperation
extends Feature
implements org.ksoap2.serialization.KvmSerializable, java.lang.Cloneable, ToSql


Field Summary
static java.lang.Object[] NO_PARAM
           
 
Fields inherited from class org.infolayer.model.UmlModelElement
PRIVATE, PROTECTED, PUBLIC
 
Constructor Summary
UmlOperation()
           
 
Method Summary
 java.lang.Object eval(java.lang.Object self, java.lang.Object[] param)
          Returns the evaluation result of the method for the given parameters.
 java.lang.Object get(java.lang.Object self)
          returns eval(self, new Object[0])
 UmlClassifier[] getActualParameterTypes(UmlClassifier source)
           
 java.lang.String getComment(java.lang.String lang)
           
 boolean getExecPermission(java.lang.Object self)
          Returns an unique integer for the signature of this method, (id <= total number of methods)
 OperationImpl getImplementation()
          Returns the implementation for of the given operation *NOT* performing a dynamic lookup (in contrast to getExecPermission and eval (Otherwise, invocation of super methods would be difficult)
 java.util.List getParameter()
          Returns the parameter list.
 java.lang.Object getProperty(int index)
           
 int getPropertyCount()
           
 void getPropertyInfo(int index, java.util.Hashtable props, org.ksoap2.serialization.PropertyInfo info)
           
 java.lang.String getSignature()
          Returns the signature of the method as String in the format: name(type,type,type)
 UmlClassifier getType()
          Returns the type of this method, perhaps depending on the owning classifier
 boolean isDeterministic()
           
 boolean isExtension()
          Returns true if the operation is an Infolayer extension and not part of the OCL specification.
 boolean isQuery()
          Returns true if (read) access to this part does not have any side effects.
 void setProperty(int index, java.lang.Object value)
           
 UmlOperation setSyntax(java.lang.String syntax)
          Shortcut for setTaggedValue("il-syntax", syntax) The syntax must be consistent with the OCL parser. it is used for converting expressions to strings and when generating the documentation
 UmlOperation setSyntaxAndSql(java.lang.String value)
           
 UmlOperation setToSql(java.lang.String def)
           
 UmlOperation setToSql(ToSql toSql)
           
 java.lang.String toSql(int match, java.util.Map fieldMap, OclExpression[] par)
           
 
Methods inherited from class org.infolayer.model.Feature
checkConstraints, getClassifier, getId, getLabel, toString
 
Methods inherited from class org.infolayer.model.UmlModelElement
getLabel, getName, getTaggedValue, getTaggedValue, getVisibility, init, setName, setTaggedValue, setVisibility, setVisibility
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_PARAM

public static final java.lang.Object[] NO_PARAM
Constructor Detail

UmlOperation

public UmlOperation()
Method Detail

getSignature

public java.lang.String getSignature()
Returns the signature of the method as String in the format: name(type,type,type)


getExecPermission

public boolean getExecPermission(java.lang.Object self)
Returns an unique integer for the signature of this method, (id <= total number of methods)


eval

public java.lang.Object eval(java.lang.Object self,
                             java.lang.Object[] param)
Returns the evaluation result of the method for the given parameters. Please note that the self parameter is the type for static methods. This method performs the dynamic lookup.


get

public java.lang.Object get(java.lang.Object self)
returns eval(self, new Object[0])

Specified by:
get in class Feature

getProperty

public java.lang.Object getProperty(int index)
Specified by:
getProperty in interface org.ksoap2.serialization.KvmSerializable
Overrides:
getProperty in class UmlModelElement
See Also:
org.ksoap2.marshal.KvmSerializable#getProperty(int)

getImplementation

public OperationImpl getImplementation()
Returns the implementation for of the given operation *NOT* performing a dynamic lookup (in contrast to getExecPermission and eval (Otherwise, invocation of super methods would be difficult)


getPropertyCount

public int getPropertyCount()
Specified by:
getPropertyCount in interface org.ksoap2.serialization.KvmSerializable
Overrides:
getPropertyCount in class UmlModelElement
See Also:
org.ksoap2.marshal.KvmSerializable#getPropertyCount()

getPropertyInfo

public void getPropertyInfo(int index,
                            java.util.Hashtable props,
                            org.ksoap2.serialization.PropertyInfo info)
Specified by:
getPropertyInfo in interface org.ksoap2.serialization.KvmSerializable
Overrides:
getPropertyInfo in class UmlModelElement
See Also:
org.ksoap2.marshal.KvmSerializable#getPropertyInfo(int, PropertyInfo)

setProperty

public void setProperty(int index,
                        java.lang.Object value)
Specified by:
setProperty in interface org.ksoap2.serialization.KvmSerializable
Overrides:
setProperty in class UmlModelElement
See Also:
org.ksoap2.marshal.KvmSerializable#setProperty(int, Object)

getType

public UmlClassifier getType()
Returns the type of this method, perhaps depending on the owning classifier

Specified by:
getType in class Feature

getActualParameterTypes

public UmlClassifier[] getActualParameterTypes(UmlClassifier source)

getParameter

public java.util.List getParameter()
Returns the parameter list. The last element is the result parameter.


isDeterministic

public boolean isDeterministic()

isExtension

public boolean isExtension()
Returns true if the operation is an Infolayer extension and not part of the OCL specification.


isQuery

public boolean isQuery()
Returns true if (read) access to this part does not have any side effects.


toSql

public java.lang.String toSql(int match,
                              java.util.Map fieldMap,
                              OclExpression[] par)
Specified by:
toSql in interface ToSql

setSyntax

public UmlOperation setSyntax(java.lang.String syntax)
Shortcut for setTaggedValue("il-syntax", syntax) The syntax must be consistent with the OCL parser. it is used for converting expressions to strings and when generating the documentation. %0 is the placeholder for self, %1 for the first parameter etc.

Parameters:
syntax - The syntax of the operation.
Returns:
returns "this".

getComment

public java.lang.String getComment(java.lang.String lang)
Overrides:
getComment in class UmlModelElement

setToSql

public UmlOperation setToSql(ToSql toSql)

setSyntaxAndSql

public UmlOperation setSyntaxAndSql(java.lang.String value)

setToSql

public UmlOperation setToSql(java.lang.String def)