Exemple #1
0
 /**
  * Checks if the business type defining this type definition exists.
  *
  * @param _paramCache parameter cache with MX context
  * @return <i>true</i> if the business type exists; otherwise <i>false</i>
  * @throws MatrixException if the check failed
  */
 public boolean existsBusType(final ParameterCache_mxJPO _paramCache) throws MatrixException {
   final String tmp =
       MqlUtil_mxJPO.execMql(
           _paramCache,
           new StringBuilder().append("list type '").append(this.busType).append("'"));
   return (tmp.length() > 0);
 }
Exemple #2
0
 /**
  * Defines the class for given JPO name.
  *
  * @param _paramCache parameter cache
  * @param _mapping cache mapping
  * @param _jpoName name of searched JPO
  * @throws Exception if the list of MxUdpate JPOs could not evaluated or if the related class
  *     could not be found
  * @see #MQL_LISTPROG
  * @see #jpoClass
  */
 @SuppressWarnings("unchecked")
 private void defineJPOClass(
     final ParameterCache_mxJPO _paramCache, final Mapping_mxJPO _mapping, final String _jpoName)
     throws Exception {
   if (_mapping.getTypeDefJPOsMap().isEmpty()) {
     final String tmp = MqlUtil_mxJPO.execMql(_paramCache, TypeDef_mxJPO.MQL_LISTPROG);
     for (final String line : tmp.split("\n")) {
       final String[] arr = line.split("\t");
       if (arr.length > 1) {
         _mapping.getTypeDefJPOsMap().put(arr[0], arr[1]);
       }
     }
   }
   final String jpoClassName = _mapping.getTypeDefJPOsMap().get(_jpoName);
   if (jpoClassName == null) {
     throw new Exception("unknown jpo class definition for " + _jpoName);
   }
   try {
     // directly in MX
     this.jpoClass = (Class<? extends AbstractObject_mxJPO>) Class.forName(jpoClassName);
   } catch (final ClassNotFoundException e) {
     // run separately
     this.jpoClass = (Class<? extends AbstractObject_mxJPO>) Class.forName(_jpoName + "_mxJPO");
   }
 }
Exemple #3
0
 /**
  * Executes given MQL command statement <code>_cmd</code> and returns the result.
  *
  * @param _cmd MQL command statement to execute
  * @return returned string value from the called MQL command <code>_cmd</code>
  * @throws MatrixException if MQL execution failed
  */
 public String mql(final CharSequence _cmd) throws MatrixException {
   return MqlUtil_mxJPO.execMql(this.context, _cmd, true);
 }