Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.udo.cs.miningmart.m4.core
Class OpParam

    java.lang.Object
      edu.udo.cs.miningmart.m4.core.M4Object
          edu.udo.cs.miningmart.m4.core.M4Data
              edu.udo.cs.miningmart.m4.core.OpParam

All Implemented Interfaces:
  M4Data, M4Object, OpParam, M4Table, XmlInfo, java.io.Serializable, java.lang.Comparable

    public class OpParam

extends M4Data
implements XmlInfo, OpParam

Objects of this class reflect static properties of an operator found in the OP_PARAMS_T table.

Version:
  $Id: OpParam.java,v 1.5 2006/09/27 15:00:00 euler Exp $
Author:
  Martin Scholz
See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `ATTRIB_IO_TYPE` db level: name of the OpParam input/output type attribute
`static java.lang.String` | `ATTRIB_MAX_ARG` db level: name of the OpParam maximum number of parameters attribute
`static java.lang.String` | `ATTRIB_MIN_ARG` db level: name of the OpParam minimum number of parameters attribute
`static java.lang.String` | `ATTRIB_OP_PARAM_ID` db level: name of the OpParam id attribute
`static java.lang.String` | `ATTRIB_OP_PARAM_NAME` db level: name of the OpParam name attribute
`static java.lang.String` | `ATTRIB_OP_PARAM_OPID` db level: name of the OpParam id attribute
`static java.lang.String` | `ATTRIB_PAR_TYPE` db level: name of the OpParam parameter type attribute
`static java.lang.String` | `M4_TABLE_NAME` The name of the corresponding M4 table.
`static M4Info` | `m4Info` Cache for getM4Info()

Fields inherited from class edu.udo.cs.miningmart.m4.core.M4Data
`myDocumentation`

Fields inherited from class edu.udo.cs.miningmart.m4.core.M4Object
`myId, myName`

Fields inherited from interface edu.udo.cs.miningmart.m4.utils.XmlInfo
`M4_XML_VERSION, TAG_COLLECTION, TAG_DOUBLE, TAG_INTEGER, TAG_LONG, TAG_M4_ID, TAG_SHORT, TAG_STRING, TAG_XML_ID`

Fields inherited from interface edu.udo.cs.miningmart.m4.utils.M4Table
`NOT_NULL`

Constructor Summary
`OpParam(DB m4Db)`

Method Summary
`Value` | `createValueObject()` Convenience method to create a Value object of the right datatype for this parameter.
`java.util.Collection` | `getApplicableConstraints()` Returns all Constraint objects that constrain this operator parameter.
`java.lang.String` | `getConceptualDatatypeForValue()` Returns a conceptual data type that can be used for a Value Parameter Object of this OpParam, or null if this OpParam does not represent a Value Parameter.
`java.lang.String` | `getIdAttributeName()`
`java.lang.String` | `getInput()` Similar to `isInput()`: Gets the input/output property, but returns a `String`.
`M4Info` | `getM4Info()`
`java.lang.String` | `getM4TableName()`
`int` | `getMaxArg()` Gets the maxArg.
`java.lang.Integer` | `getMaximumNumberOfArrayFields()` This method makes sense only if `isArray()` returns TRUE.
`int` | `getMinArg()` Gets the minArg.
`protected java.util.Collection` | `getObjectsInNamespace(java.lang.Class typeOfObjects)` This method returns the objects of the specified type that form a namespace in the scope of this M4Data object.
`java.util.Collection` | `getOneOfList()` This method makes sense only if `isOneOf()` returns TRUE.
`Operator` | `getTheOperator()` Gets the Operator.
`short` | `getType()` Gets the type.
`java.lang.String` | `getTypeS()`
`M4Info` | `getXmlInfo()`
`boolean` | `isArray()`
`boolean` | `isBaseAttribParameter()` Convenience method to `getType()` and `getTypeS()`.
`boolean` | `isConceptParameter()` Convenience method to `getType()` and `getTypeS()`.
`boolean` | `isCoordinated()`
`boolean` | `isDependentValueParameter()`
`boolean` | `isFeatureParameter()` Convenience method to `getType()` and `getTypeS()`.
`boolean` | `isInput()` Gets the input/output property.
`boolean` | `isLoopable()`
`boolean` | `isMcfParameter()` Convenience method to `getType()` and `getTypeS()`.
`boolean` | `isOneOf()`
`boolean` | `isOptional()`
`boolean` | `isRelationParameter()` Convenience method to `getType()` and `getTypeS()`.
`boolean` | `isValueParameter()` Convenience method to `getType()` and `getTypeS()`.
`void` | `primitiveSetOperator(Operator operator)` Primitive setter for the Operator.
`void` | `print()` Print this M4 object's parameters.
`protected void` | `removeAllM4References()` This method needs to be implemented by all `M4Data` objects.
`void` | `setInput(java.lang.String ioType)` Sets the input/output property.
`void` | `setMaxArg(int maxArg)` Sets the maxArg.
`void` | `setMinArg(int minArg)` Sets the minArg.
`void` | `setTheOperator(Operator operator)` Sets the Operator.
`void` | `setType(java.lang.String typeString)` Sets the type.

Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Data
`deleteLocal, deleteSoon, exportLocal, genericGetter, genericSetter, getDependentObjects, getDocumentation, getObjectsReferencingMe, getObjectsReferencingMe, getObjectTag, getUniqueName, getValidName, getValidName, getXmlIdTag, getXmlVersion, hasDeleteStatus, importLocal, isDirty, isWaitingForDelete, primitiveGetDocObject, primitiveSetDocObject, readFromDb, readFromDbLocal, removeDocObject, removeFromDb, removeSetFromDb, setDirty, setDocumentation, setId, setName, storeLocal, updateObjectsFromTable`

Methods inherited from class edu.udo.cs.miningmart.m4.core.M4Object
`compareTo, doPrint, doPrint, equals, executeBusinessSingleValueSqlRead, executeBusinessSingleValueSqlReadL, executeBusinessSqlRead, executeBusinessSqlWrite, executeM4SingleValueSqlRead, executeM4SingleValueSqlReadL, executeM4SqlRead, executeM4SqlWrite, getCasePrintObject, getId, getM4Db, getM4ObjectFromCache, getName, getNextM4SequenceValue, isNew, load, putM4ObjectToCache, replaceSpacesInName, setNotNew`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface edu.udo.cs.miningmart.m4.utils.XmlInfo
`doPrint, doPrint, exportLocal, genericGetter, genericSetter, getDependentObjects, getObjectTag, getXmlIdTag, getXmlVersion, importLocal`

Methods inherited from interface edu.udo.cs.miningmart.m4.M4Data
`deleteSoon, getDocumentation, getValidName, isDirty, isWaitingForDelete, setDocumentation`

Methods inherited from interface edu.udo.cs.miningmart.m4.M4Object
`doPrint, doPrint, equals, executeBusinessSingleValueSqlRead, executeBusinessSingleValueSqlReadL, executeBusinessSqlRead, executeBusinessSqlWrite, executeM4SingleValueSqlRead, executeM4SingleValueSqlReadL, executeM4SqlRead, executeM4SqlWrite, getCasePrintObject, getId, getM4Db, getM4ObjectFromCache, getName, getNextM4SequenceValue, isNew, load, putM4ObjectToCache, replaceSpacesInName, setId, setName, setNotNew`

Field Detail

### M4_TABLE_NAME

    public static final java.lang.String M4_TABLE_NAME

  The name of the corresponding M4 table.

  See Also:
    Constant Field Values

### ATTRIB_OP_PARAM_ID

    public static final java.lang.String ATTRIB_OP_PARAM_ID

  db level: name of the OpParam id attribute

  See Also:
    Constant Field Values

### ATTRIB_OP_PARAM_OPID

    public static final java.lang.String ATTRIB_OP_PARAM_OPID

  db level: name of the OpParam id attribute

  See Also:
    Constant Field Values

### ATTRIB_OP_PARAM_NAME

    public static final java.lang.String ATTRIB_OP_PARAM_NAME

  db level: name of the OpParam name attribute

  See Also:
    Constant Field Values

### ATTRIB_MIN_ARG

    public static final java.lang.String ATTRIB_MIN_ARG

  db level: name of the OpParam minimum number of parameters attribute

  See Also:
    Constant Field Values

### ATTRIB_MAX_ARG

    public static final java.lang.String ATTRIB_MAX_ARG

  db level: name of the OpParam maximum number of parameters attribute

  See Also:
    Constant Field Values

### ATTRIB_IO_TYPE

    public static final java.lang.String ATTRIB_IO_TYPE

  db level: name of the OpParam input/output type attribute

  See Also:
    Constant Field Values

### ATTRIB_PAR_TYPE

    public static final java.lang.String ATTRIB_PAR_TYPE

  db level: name of the OpParam parameter type attribute

  See Also:
    Constant Field Values

### m4Info

    public static M4Info m4Info

  Cache for getM4Info()

Constructor Detail

### OpParam

    public OpParam(DB m4Db)

Parameters:
  `m4Db` - the `DB` object to be used

Method Detail

### getM4TableName

    public java.lang.String getM4TableName()

  Specified by:
    `getM4TableName` in interface `M4Table`
  See Also:
    `M4Table.getM4TableName()`

### getIdAttributeName

    public java.lang.String getIdAttributeName()

  Specified by:
    `getIdAttributeName` in interface `M4Table`
  See Also:
    `M4Table.getIdAttributeName()`

### getM4Info

    public M4Info getM4Info()

  Specified by:
    `getM4Info` in interface `M4Table`
  See Also:
    `M4Table.getM4Info()`

### getXmlInfo

    public M4Info getXmlInfo()

  Specified by:
    `getXmlInfo` in interface `XmlInfo`
  Returns:
    a `M4Info` object with the information of all XML fields of `this` object.
  See Also:
    `M4Table.getM4Info()`

### print

    public void print()

  Description copied from class: `M4Object`
  Print this M4 object's parameters. Must be implemented by all subclasses.

  Specified by:
    `print` in interface `M4Object`
  Specified by:
    `print` in class `M4Object`
  See Also:
    `M4Object.print()`

### getObjectsInNamespace

    protected java.util.Collection getObjectsInNamespace(java.lang.Class typeOfObjects)
                                                  throws M4Exception

  Description copied from class: `M4Data`
  This method returns the objects of the specified type that form a namespace in the scope of this M4Data object. For example, a Concept's namespace for the type BaseAttribute is the Collection of all BaseAttributes for this Concept. Many M4Data objects never have a namespace, they return `null`. If a namespace could exist but doesn't, an empty Collection is returned.

  Specified by:
    `getObjectsInNamespace` in class `M4Data`
  Parameters:
    `typeOfObjects` - the type of objects that form the namespace
  Returns:
    a Collection of objects of type `typeOfObjects`, or `null`.
  Throws:
    `M4Exception`
  See Also:
    `M4Data.getObjectsInNamespace(Class)`

### isInput

    public boolean isInput()

  Gets the input/output property.

  Specified by:
    `isInput` in interface `OpParam`
  Returns:
    Returns true iff the parameter is an input.

### getInput

    public java.lang.String getInput()

  Similar to `isInput()`: Gets the input/output property, but returns a `String`.

  Specified by:
    `getInput` in interface `OpParam`
  Returns:
    Returns a `String` indicating if the parameter is an input or output.

### getMaxArg

    public int getMaxArg()

  Gets the maxArg.

  Specified by:
    `getMaxArg` in interface `OpParam`
  Returns:
    Returns an int. A return value of "-1" represents a NULL in the database, a return value of "0" is not possible.

### getMinArg

    public int getMinArg()

  Gets the minArg.

  Specified by:
    `getMinArg` in interface `OpParam`
  Returns:
    Returns a int

### getType

    public short getType()

  Gets the type.

  Specified by:
    `getType` in interface `OpParam`
  Returns:
    Returns a short

### getTypeS

    public java.lang.String getTypeS()
                              throws ParameterError

  Specified by:
    `getTypeS` in interface `OpParam`
  Returns:
    the type in its database `String` representation.
  Throws:
    `ParameterError`
  See Also:
    `getType()`

### setInput

    public void setInput(java.lang.String ioType)
                  throws M4Exception

  Sets the input/output property.

  Specified by:
    `setInput` in interface `OpParam`
  Parameters:
    `ioType` - Either "IN" for input parameters, or "OUT".
  Throws:
    `M4Exception`

### setMaxArg

    public void setMaxArg(int maxArg)

  Sets the maxArg.

  Specified by:
    `setMaxArg` in interface `OpParam`
  Parameters:
    `maxArg` - The maxArg to set

### setMinArg

    public void setMinArg(int minArg)

  Sets the minArg.

  Specified by:
    `setMinArg` in interface `OpParam`
  Parameters:
    `minArg` - The minArg to set

### setType

    public void setType(java.lang.String typeString)
                 throws M4Exception

  Sets the type.

  Specified by:
    `setType` in interface `OpParam`
  Parameters:
    `type` - The type String read from the database.
  Throws:
    `M4Exception`

### getTheOperator

    public Operator getTheOperator()

  Gets the Operator.

  Specified by:
    `getTheOperator` in interface `OpParam`
  Returns:
    Returns an Operator

### setTheOperator

    public void setTheOperator(Operator operator)
                        throws M4Exception

  Sets the Operator.

  Specified by:
    `setTheOperator` in interface `OpParam`
  Parameters:
    `operator` - The Operator to set
  Throws:
    `M4Exception`

### primitiveSetOperator

    public void primitiveSetOperator(Operator operator)

  Primitive setter for the Operator. Do not use it!

  Parameters:
    `operator` - The Operator to set

### removeAllM4References

    protected void removeAllM4References()
                                  throws M4Exception

  Description copied from class: `M4Data`
  This method needs to be implemented by all `M4Data` objects. It has to remove all references to other `M4Object`s.

  Specified by:
    `removeAllM4References` in class `M4Data`
  Throws:
    `M4Exception`
  See Also:
    `M4Data.removeAllM4References()`

### getApplicableConstraints

    public java.util.Collection getApplicableConstraints()
                                                  throws M4Exception

  Returns all Constraint objects that constrain this operator parameter.

  Specified by:
    `getApplicableConstraints` in interface `OpParam`
  Returns:
    a Collection of Constraint objects
  Throws:
    `M4Exception`

### isLoopable

    public boolean isLoopable()
                       throws M4Exception

  Specified by:
    `isLoopable` in interface `OpParam`
  Returns:
    TRUE iff this parameter can take different values for each loop. This can only occur if the operator is loopable.
  Throws:
    `M4Exception`

### isCoordinated

    public boolean isCoordinated()
                          throws M4Exception

  Specified by:
    `isCoordinated` in interface `OpParam`
  Returns:
    TRUE iff this parameter is an array whose values must be coordinated positionwise with the values of another parameter array. Compare the method `getCoordinatedParameterArrays()` in the class `Operator`.
  Throws:
    `M4Exception`
  See Also:
    `OpParam.isCoordinated()`

### isOneOf

    public boolean isOneOf()
                    throws M4Exception

  Specified by:
    `isOneOf` in interface `OpParam`
  Returns:
    TRUE iff this parameter can only take the values specified in a list. The list is given by calling `getOneOfList()`.
  Throws:
    `M4Exception`

### isDependentValueParameter

    public boolean isDependentValueParameter()
                                      throws M4Exception

  Specified by:
    `isDependentValueParameter` in interface `OpParam`
  Returns:
    TRUE iff this parameter should only take the values that occur in a certain BaseAttribute
  Throws:
    `M4Exception`

### isOptional

    public boolean isOptional()
                       throws M4Exception

  Specified by:
    `isOptional` in interface `OpParam`
  Returns:
    TRUE iff this parameter is optional.
  Throws:
    `M4Exception`

### isArray

    public boolean isArray()
                    throws M4Exception

  Specified by:
    `isArray` in interface `OpParam`
  Returns:
    TRUE iff this parameter takes the form of an array. FALSE iff it is a single parameter.
  Throws:
    `M4Exception`

### isConceptParameter

    public boolean isConceptParameter()
                               throws M4Exception

  Convenience method to `getType()` and `getTypeS()`.

  Specified by:
    `isConceptParameter` in interface `OpParam`
  Returns:
    TRUE iff this parameter is of type Concept.
  Throws:
    `M4Exception`

### isValueParameter

    public boolean isValueParameter()
                             throws M4Exception

  Convenience method to `getType()` and `getTypeS()`.

  Specified by:
    `isValueParameter` in interface `OpParam`
  Returns:
    TRUE iff this parameter is of type Value.
  Throws:
    `M4Exception`

### createValueObject

    public Value createValueObject()
                            throws M4Exception

  Description copied from interface: `OpParam`
  Convenience method to create a Value object of the right datatype for this parameter. This method throws an exception if `isValueParameter()` returns FALSE.

  Specified by:
    `createValueObject` in interface `OpParam`
  Returns:
    a Value object with matching conceptual datatype
  Throws:
    `M4Exception` - is thrown if this is no Value parameter
  See Also:
    `OpParam.createValueObject()`

### getConceptualDatatypeForValue

    public java.lang.String getConceptualDatatypeForValue()
                                                   throws M4Exception

  Description copied from interface: `OpParam`
  Returns a conceptual data type that can be used for a Value Parameter Object of this OpParam, or null if this OpParam does not represent a Value Parameter.

  Specified by:
    `getConceptualDatatypeForValue` in interface `OpParam`
  Returns:
    a conceptual data type String
  Throws:
    `M4Exception`
  See Also:
    `OpParam.getConceptualDatatypeForValue()`

### isRelationParameter

    public boolean isRelationParameter()
                                throws M4Exception

  Convenience method to `getType()` and `getTypeS()`.

  Specified by:
    `isRelationParameter` in interface `OpParam`
  Returns:
    TRUE iff this parameter is of type Relation.
  Throws:
    `M4Exception`

### isFeatureParameter

    public boolean isFeatureParameter()
                               throws M4Exception

  Convenience method to `getType()` and `getTypeS()`.

  Specified by:
    `isFeatureParameter` in interface `OpParam`
  Returns:
    TRUE iff this parameter is of type Feature.
  Throws:
    `M4Exception`

### isBaseAttribParameter

    public boolean isBaseAttribParameter()
                                  throws M4Exception

  Convenience method to `getType()` and `getTypeS()`.

  Specified by:
    `isBaseAttribParameter` in interface `OpParam`
  Returns:
    TRUE iff this parameter is of type BaseAttribute.
  Throws:
    `M4Exception`

### isMcfParameter

    public boolean isMcfParameter()
                           throws M4Exception

  Convenience method to `getType()` and `getTypeS()`.

  Specified by:
    `isMcfParameter` in interface `OpParam`
  Returns:
    TRUE iff this parameter is of type MultiColumnFeature.
  Throws:
    `M4Exception`

### getOneOfList

    public java.util.Collection getOneOfList()
                                      throws M4Exception

  This method makes sense only if `isOneOf()` returns TRUE. In that case this method returns the list of possible values that this parameter can take. A collection of Strings is returned. Otherwise an empty collection is returned.

  Specified by:
    `getOneOfList` in interface `OpParam`
  Returns:
    a collection of Strings
  Throws:
    `M4Exception`

### getMaximumNumberOfArrayFields

    public java.lang.Integer getMaximumNumberOfArrayFields()
                                                    throws M4Exception

  This method makes sense only if `isArray()` returns TRUE. In that case this method returns the maximum number of positions of the array, if such a maximum exists; otherwise this method returns NULL. The minimum number of array positions can be taken to be 1 if this parameter is not optional (see method `isArray()`).

  Specified by:
    `getMaximumNumberOfArrayFields` in interface `OpParam`
  Returns:
    The maximum number of array positions or NULL if the number is unconstrained.
  Throws:
    `M4Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005