public int compare(ICFBamEnumTypeObj lhs, ICFBamEnumTypeObj rhs) {
   if (lhs == null) {
     if (rhs == null) {
       return (0);
     } else {
       return (-1);
     }
   } else if (rhs == null) {
     return (1);
   } else {
     String lhsValue = lhs.getObjQualifiedName();
     String rhsValue = rhs.getObjQualifiedName();
     if (lhsValue == null) {
       if (rhsValue == null) {
         return (0);
       } else {
         return (-1);
       }
     } else if (rhsValue == null) {
       return (1);
     } else {
       return (lhsValue.compareTo(rhsValue));
     }
   }
 }
 public CFBamSwingEnumTypeViewEditJInternalFrame(
     ICFBamSwingSchema argSchema, ICFBamEnumTypeObj argFocus) {
   super();
   final String S_ProcName = "construct-schema-focus";
   if (argSchema == null) {
     throw CFLib.getDefaultExceptionFactory()
         .newNullArgumentException(getClass(), S_ProcName, 1, "argSchema");
   }
   setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
   // argFocus is optional; focus may be set later during execution as
   // conditions of the runtime change.
   swingSchema = argSchema;
   swingFocus = argFocus;
   if ((argFocus != null) && (!argFocus.getIsNew())) {
     argFocus = (ICFBamEnumTypeObj) argFocus.read(true);
     swingFocus = argFocus;
   }
   swingViewEditJPanel = argSchema.getEnumTypeFactory().newViewEditJPanel(argFocus);
   setContentPane(swingViewEditJPanel);
   Dimension dim = new Dimension(1024, 480);
   setSize(dim);
   dim = new Dimension(320, 240);
   setMinimumSize(dim);
   setTitle("View/Edit EnumType");
   setJMenuBar(getFrameMenuBar());
   setIconifiable(true);
   setMaximizable(true);
   setResizable(true);
   setClosable(false);
 }
 public void setSwingFocus(ICFLibAnyObj value) {
   final String S_ProcName = "setSwingFocus";
   if ((value == null) || (value instanceof ICFBamEnumTypeObj)) {
     super.setSwingFocus(value);
   } else {
     throw CFLib.getDefaultExceptionFactory()
         .newUnsupportedClassException(
             getClass(), S_ProcName, "value", value, "ICFBamEnumTypeObj");
   }
   ((ICFBamSwingEnumTypeJPanelCommon) swingViewEditJPanel).setSwingFocus(value);
   ICFBamEnumTypeObj argFocus = (ICFBamEnumTypeObj) value;
   if ((argFocus != null) && (!argFocus.getIsNew())) {
     argFocus = (ICFBamEnumTypeObj) argFocus.read(true);
     super.setSwingFocus(argFocus);
   }
 }
 public void actionPerformed(ActionEvent e) {
   final String S_ProcName = "actionPerformed";
   ICFBamEnumTypeObj focus = getSwingFocusAsEnumType();
   if (focus != null) {
     ICFBamEnumTypeEditObj editObj = (ICFBamEnumTypeEditObj) (focus.getEdit());
     if (editObj != null) {
       setPanelMode(CFJPanel.PanelMode.Update);
     } else {
       throw CFLib.getDefaultExceptionFactory()
           .newUsageException(
               getClass(), S_ProcName, "Cannot save on object that isn't being edited");
     }
   }
   try {
     setClosed(true);
   } catch (Exception x) {
   }
 }
 public void actionPerformed(ActionEvent e) {
   ICFBamEnumTypeObj focus = getSwingFocusAsEnumType();
   if (focus != null) {
     ICFBamEnumTypeEditObj editObj = (ICFBamEnumTypeEditObj) focus.getEdit();
     if (editObj != null) {
       if (editObj.getIsNew()) {
         editObj.endEdit();
         setSwingFocus(null);
         setPanelMode(CFJPanel.PanelMode.Unknown);
       } else {
         editObj.endEdit();
         setPanelMode(CFJPanel.PanelMode.View);
       }
     }
   }
   try {
     setClosed(true);
   } catch (Exception x) {
   }
 }
 public Object getValueAt(int row, int column) {
   if ((row < 0) || (column < -1)) {
     return (null);
   }
   if (arrayOfEnumType == null) {
     return (null);
   }
   int len = arrayOfEnumType.length;
   if (row >= len) {
     return (null);
   }
   ICFBamEnumTypeObj obj = arrayOfEnumType[row];
   if (obj == null) {
     return (null);
   }
   Object retval;
   switch (column) {
     case COLID_ROW_HEADER:
       retval = obj;
       break;
     case COLID_OBJQUALIFIEDNAME:
       retval = obj.getObjQualifiedName();
       break;
     case COLID_ID:
       retval = new Long(obj.getRequiredId());
       break;
     case COLID_NAME:
       retval = obj.getRequiredName();
       if (retval == null) {
         retval = "";
       }
       break;
     case COLID_SHORTNAME:
       retval = obj.getOptionalShortName();
       if (retval == null) {
         retval = "";
       }
       break;
     case COLID_LABEL:
       retval = obj.getOptionalLabel();
       if (retval == null) {
         retval = "";
       }
       break;
     case COLID_SHORTDESCRIPTION:
       retval = obj.getOptionalShortDescription();
       if (retval == null) {
         retval = "";
       }
       break;
     case COLID_DESCRIPTION:
       retval = obj.getOptionalDescription();
       if (retval == null) {
         retval = "";
       }
       break;
     case COLID_ISNULLABLE:
       retval = new Boolean(obj.getRequiredIsNullable());
       break;
     case COLID_GENERATEID:
       retval = obj.getOptionalGenerateId();
       break;
     case COLID_DEFAULTVISIBILITY:
       retval = new Boolean(obj.getRequiredDefaultVisibility());
       break;
     case COLID_DBNAME:
       retval = obj.getOptionalDbName();
       if (retval == null) {
         retval = "";
       }
       break;
     case COLID_INITVALUE:
       retval = obj.getOptionalInitValue();
       break;
     case COLID_DEFAULTVALUE:
       retval = obj.getOptionalDefaultValue();
       break;
     case COLID_MINVALUE:
       retval = obj.getOptionalMinValue();
       break;
     case COLID_MAXVALUE:
       retval = obj.getOptionalMaxValue();
       break;
     case COLID_NULLVALUE:
       retval = obj.getOptionalNullValue();
       break;
     case COLID_UNKNOWNVALUE:
       retval = obj.getOptionalUnknownValue();
       break;
     case COLID_LOOKUP_DEFSCHEMA:
       retval = obj.getOptionalLookupDefSchema();
       break;
     case COLID_LOOKUP_DATASCOPE:
       retval = obj.getOptionalLookupDataScope();
       break;
     case COLID_LOOKUP_VACCSEC:
       retval = obj.getOptionalLookupVAccSec();
       break;
     case COLID_LOOKUP_EACCSEC:
       retval = obj.getOptionalLookupEAccSec();
       break;
     case COLID_LOOKUP_VACCFREQ:
       retval = obj.getOptionalLookupVAccFreq();
       break;
     case COLID_LOOKUP_EACCFREQ:
       retval = obj.getOptionalLookupEAccFreq();
       break;
     case COLID_LOOKUP_PREV:
       retval = obj.getOptionalLookupPrev();
       break;
     case COLID_LOOKUP_NEXT:
       retval = obj.getOptionalLookupNext();
       break;
     default:
       retval = null;
       break;
   }
   return (retval);
 }