Utility class
The utility class helps to retrieve information from model elements. Use these commands to get particular information:
$oracleHelper.hasStereotype($element, $stereotypeName)
Returns true if a given element has an applied given stereotype.
Name |
Type |
Description |
|
Parameters |
$element |
com.nomagic.uml2.ext.magicdraw. |
An element to check. |
$stereotypeName |
java.lang.String |
A stereotype name to be checked. |
|
Return |
- |
boolean |
true if elements have an applied stereotype with a given name. |
$oracleHelper.getBooleanValueFromDefaultProfile($element, $stereotypeName, $propertyName)
From the given element, stereotype name, and tag name returns a tag value as Boolean from the Oracle profile.
Name |
Type |
Description |
|
Parameters |
$element |
com.nomagic.uml2.ext.magicdraw. |
An element to check. |
$stereotypeName |
java.lang.String |
A stereotype name (from the default profile) that should be applied. |
|
$propertyName |
java.lang.String |
A property name which value will be retrieved. |
|
Return |
- |
boolean |
A boolean value of property (tag). |
$oracleHelper.getPropertiesListFromDefaultProfile($element, $stereotypeName, $propertyName)
Returns a list of given property values, that exist on the given element with the applied stereotype from the Oracle profile.
Name |
Type |
Description |
|
Parameters |
$element |
com.nomagic.uml2.ext.magicdraw. |
An element to be tested. |
$stereotypeName |
java.lang.String |
A stereotype name which should be applied. |
|
$propertyName |
java.lang.String |
A property (tag) name to get values from. |
|
Return |
- |
java.util.List |
A list of property values. |
$oracleHelper.getFirstPropertyValueFromProfile($element, $stereotypeName, $propertyName)
Returns teh first given tag property value from the given element, which has the applied given stereotype.
Name |
Type |
Description |
|
Parameters |
$element |
com.nomagic.uml2.ext.magicdraw. |
An element to be tested. |
$stereotypeName |
java.lang.String |
A stereotype name that should be applied to the element. |
|
$propertyName |
java.lang.String |
A property name where to check for values. |
|
Return |
- |
java.lang.String |
The first property value in a string representation. |
$oracleHelper.getDefaultValueAsBoolean($property)
From the given property returns the default value as boolean.
Name |
Type |
Description |
|
Parameter |
$property |
com.nomagic.uml2.ext.magicdraw. |
A boolean property to be check for the default value. |
Return |
- |
boolean |
The default boolean value of a property (tag). |
$oracleHelper.getFirstPropertyValueFromGivenProfile($element, $profileName, $stereotypeName, $propertyName)
Returns first given tag property value from given element, which has applied given stereotype from profile.
Name |
Type |
Description |
|
Parameters |
$element |
com.nomagic.uml2.ext.magicdraw. |
An element to be tested. |
$profileName |
java.lang.String |
A profile name where the stereotype exists. |
|
$stereotypeName |
java.lang.String |
A stereotype name. |
|
$propertyName |
java.lang.String |
A property (tag) name, which value will be checked. |
|
Return |
- |
java.lang.String |
The first value in a property list in String. |
$oracleHelper.getPropertiesListFromProfile($element, $profileName, $stereotypeName, $propertyName)
Returns a list of given property values, that exist on a given element with an applied stereotype from the given profile.
Name |
Type |
Description |
|
Parameters |
$element |
com.nomagic.uml2.ext.magicdraw. |
An element to be tested. |
$profileName |
java.lang.String |
A profile name where the stereotype exists. |
|
$stereotypeName |
java.lang.String |
A stereotype name. |
|
$propertyName |
java.lang.String |
A property (tag) name, which value will be checked. |
|
Return |
- |
java.lang.List |
A list of property values. |
$oracleHelper.getStringValue($object)
From the given tag value returns the String representation.
Name |
Type |
Description |
|
Parameter |
$object |
java.lang.Object |
An objectto be tested. |
Return |
- |
java.lang.String |
A string representation of the object. |
$oracleHelper.isDataType($element)
Returns true if element is data type.
Name |
Type |
Description |
|
Parameter |
$element |
com.nomagic.uml2.ext.magicdraw. |
An element to be tested. |
Return |
- |
boolean |
true if the element is the datatype. |
$oracleHelper.getType($type, $modifier)
From the given type and modifier returns it's description.
Name |
Type |
Description |
|
Parameters |
$type |
com.nomagic.uml2.ext.magicdraw. |
A type of an element. |
$modifier |
java.lang.String |
A modifier of the type. |
|
Return |
- |
java.lang.String |
A type definition for Oracle DDL. |
$oracleHelper.getTypeModifier($element)
Returns the Type modifier for the given element.
Name |
Type |
Description |
|
Parameters |
$element |
com.nomagic.uml2.ext.magicdraw. |
An element to be tested. |
Return |
- |
java.lang.String |
The Type modifier description. |
$oracleHelper.getParameters($operation)
Returns the list of operation parameters.
Name |
Type |
Description |
|
Parameter |
$element |
com.nomagic.uml2.ext.magicdraw. |
An operation to be tested. |
Return |
- |
java.util.List |
A list of operation parameters. |
$oracleHelper.getColumnConstraint($column)
Returns the given property constraint.
Name |
Type |
Description |
|
Parameter |
$column |
com.nomagic.uml2.ext.magicdraw. |
A column to check for the constraint. |
Return |
- |
java.util.List |
A constraint definition. |
$oracleHelper.getCreate($element)
Returns the CREATE statement for the given element.
Name |
Type |
Description |
|
Parameter |
$element |
com.nomagic.uml2.ext.magicdraw. |
An element to be tested. |
Return |
- |
Java.lang.String |
A description - CREATE or CREATE OR REPLACE. |
$oracleHelper.getReturnParameter($operation, $createIfNeeded)
Returns the Return type parameter of a given Operation.
Name |
Type |
Description |
|
Parameters |
$operation |
com.nomagic.uml2.ext.magicdraw. |
An operation to check. |
$createIfNeeded |
boolean |
A flag to create a return parameter if it does not exist. |
|
Return |
- |
com.nomagic.uml2.ext.magicdraw. |
Return the parameter of a given Operation. |
$oracleHelper.getIndexNameDefinition($index)
Returns a name of a given index.
Name |
Type |
Description |
|
Parameter |
$index |
com.nomagic.uml2.ext.magicdraw. |
BehavioralFeature as an Oracle index to be checked for a name. |
Return |
- |
java.lang.String |
A name of an index. |
$oracleHelper.getTableConstraintDefinition($dependency)
From the given dependency, returns a table constraint definition.
Name |
Type |
Description |
|
Parameter |
$dependency |
com.nomagic.uml2.ext.magicdraw. |
A dependency to be tested. |
Return |
- |
java.lang.String |
A definition of the table constraint. |
$oracleHelper.isObjectPackage($element)
Checks if a given element is a package.
Name |
Type |
Description |
|
Parameter |
$element |
com.nomagic.uml2.ext.magicdraw. |
An element to be tested. |
Return |
- |
boolean |
true if the element is a package. |
$oracleHelper.isPackageDatabase($package)
Returns true, if a given package is a database.
Name |
Type |
Description |
|
Parameter |
$package |
com.nomagic.uml2.ext.magicdraw. |
A package to be tested. |
Return |
- |
boolean |
true if a package is a database. |
$oracleHelper.isPublic($element)
Returns true, if a given element has the public visibility.
Name |
Type |
Description |
|
Parameter |
$element |
com.nomagic.uml2.ext.magicdraw. |
An element to be tested. |
Return |
- |
boolean |
true if an element has the public visibility. |
$oracleHelper.reverseList($list)
Reverses a given list.
Name |
Type |
Description |
|
Parameter |
$list |
Java.util.List |
A list to be reversed. |
Return |
- |
Java.util.List |
A reversed list. |
$oracleHelper.getRefName($element)
Returns a reference name description for the element with the "Ref:Element" tag.
Name |
Type |
Description |
|
Parameter |
$element |
com.nomagic.uml2.ext.magicdraw. |
An element to be tested. |
Return |
- |
java.lang.String |
A reference element name. |