public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "CFBamMssCFBindValueGenerateId.expandBody() ";

    if (genContext == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "expandBody", 1, "genContext");
    }

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "expandBody", 1, "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof ICFBamValueObj) {
      Boolean generateId = ((ICFBamValueObj) genDef).getOptionalGenerateId();
      if (generateId == null) {
        ret = null;
      } else if (generateId.booleanValue()) {
        ret = "yes";
      } else {
        ret = "no";
      }
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newUnsupportedClassException(
              getClass(), "expandBody", "genContext.getGenDef()", genDef, "ICFBamValueObj");
    }

    return (ret);
  }
Beispiel #2
0
 public static String PrintState(ArrayList state) {
   StringBuffer sb = new StringBuffer();
   Iterator i = state.iterator();
   while (i.hasNext()) {
     Object o = i.next();
     if (o instanceof Boolean) {
       Boolean val = (Boolean) o;
       sb.append((val.booleanValue() ? "." : "X"));
     }
   }
   return sb.toString();
 }
Beispiel #3
0
 public static int compare(Boolean o1, Object o2) {
   if (o2 == null) {
     return 1;
   } else if (o2 instanceof Boolean) {
     Boolean b2 = (Boolean) o2;
     return o1.compareTo(b2);
   } else {
     return -1;
   }
 }