/** * Compares this type definition with the <code>_other</code> type definition. First the {@link * #orderNo order number} is compared. If the {@link #orderNo order number} is equal, the {@link * #getName() name} is compared. * * @param _other other type definition to compare * @return negative integer, zero, or positive integer as this object is less than, equal to, or * greater than the specified object */ @Override() public int compareTo(final TypeDef_mxJPO _other) { int ret = Integer.valueOf(this.orderNo).compareTo(_other.orderNo); if (ret == 0) { ret = this.getName().compareTo(_other.getName()); } return ret; }
/** * Defines the values of the type definition. * * @param _paramCache parameter cache * @param _mapping cache for all mapping * @param _key key of the type definition (including the name of type definition and the kind of * the type definition separated by a point) * @param _value value of the related value * @throws Exception if the values could not be defined or the JPO names could not be extracted * @see Mapping_mxJPO#getTypeDefMap() * @see #defineJPOClass(ParameterCache_mxJPO, Mapping_mxJPO, String) */ protected static void defineValue( final ParameterCache_mxJPO _paramCache, final Mapping_mxJPO _mapping, final String _key, final String _value) throws Exception { final String enumName = _key.replaceAll("\\..*", ""); final String key = _key.substring(enumName.length() + 1); TypeDef_mxJPO typeDef = _mapping.getTypeDefMap().get(enumName); if (typeDef == null) { typeDef = new TypeDef_mxJPO(enumName); _mapping.getTypeDefMap().put(enumName, typeDef); } if (key.equals(TypeDef_mxJPO.PREFIX_ADMIN_SUFFIX)) { typeDef.adminSuffix = _value; } else if (key.equals(TypeDef_mxJPO.PREFIX_ADMIN_TYPE)) { typeDef.adminType = _value; } else if (key.equals(TypeDef_mxJPO.PREFIX_BUS_CHECKEXISTS)) { typeDef.busCheckExists = _value.equalsIgnoreCase("true"); } else if (key.equals(TypeDef_mxJPO.PREFIX_BUS_IGNOREATTRIBUTES)) { typeDef.busIgnoredAttributes = Arrays.asList(_value.split(",")); } else if (key.equals(TypeDef_mxJPO.PREFIX_BUS_RELSBOTH)) { typeDef.busRelsBoth = Arrays.asList(_value.split(",")); } else if (key.equals(TypeDef_mxJPO.PREFIX_BUS_RELSFROM)) { typeDef.busRelsFrom = Arrays.asList(_value.split(",")); } else if (key.equals(TypeDef_mxJPO.PREFIX_BUS_RELSTO)) { typeDef.busRelsTo = Arrays.asList(_value.split(",")); } else if (key.equals(TypeDef_mxJPO.PREFIX_BUS_POLICY)) { typeDef.busPolicy = _value; } else if (key.equals(TypeDef_mxJPO.PREFIX_BUS_TYPE)) { typeDef.busType = _value; } else if (key.equals(TypeDef_mxJPO.PREFIX_BUS_TYPE_DERIVED)) { typeDef.busTypeDerived = Boolean.valueOf(_value); } else if (key.equals(TypeDef_mxJPO.PREFIX_BUS_VAULT)) { typeDef.busVault = _value; } else if (key.equals(TypeDef_mxJPO.PREFIX_FILE_MATCHLAST)) { typeDef.fileMatchLast = _value.equalsIgnoreCase("true"); } else if (key.equals(TypeDef_mxJPO.PREFIX_FILE_PATH)) { typeDef.filePath = _value; } else if (key.equals(TypeDef_mxJPO.PREFIX_FILE_PREFIX)) { typeDef.filePrefix = _value; } else if (key.equals(TypeDef_mxJPO.PREFIX_FILE_SUFFIX)) { typeDef.fileSuffix = _value; } else if (key.equals(TypeDef_mxJPO.PREFIX_ICONPATH)) { typeDef.iconPath = _value; } else if (key.equals(TypeDef_mxJPO.PREFIX_JPO)) { typeDef.defineJPOClass(_paramCache, _mapping, _value); } else if (key.equals(TypeDef_mxJPO.PREFIX_ORDERNO)) { typeDef.orderNo = Integer.parseInt(_value); } else if (key.equals(TypeDef_mxJPO.PREFIX_TEXT_LOGGING)) { typeDef.textLogging = _value; } else if (key.equals(TypeDef_mxJPO.PREFIX_TEXT_TITLE)) { typeDef.textTitle = _value; } else { typeDef.defineValues(key, _value); } }