public boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFDbTestValueByScopeIdxKey) {
     CFDbTestValueByScopeIdxKey rhs = (CFDbTestValueByScopeIdxKey) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredScopeId() != rhs.getRequiredScopeId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFDbTestValueBuff) {
     CFDbTestValueBuff rhs = (CFDbTestValueBuff) obj;
     if (getRequiredTenantId() != rhs.getRequiredTenantId()) {
       return (false);
     }
     if (getRequiredScopeId() != rhs.getRequiredScopeId()) {
       return (false);
     }
     return (true);
   } else {
     return (false);
   }
 }
 public void deleteNumberDefByScopeIdx(
     CFSecurityAuthorization Authorization, long argTenantId, long argScopeId) {
   CFDbTestValueByScopeIdxKey key = schema.getFactoryValue().newScopeIdxKey();
   key.setRequiredTenantId(argTenantId);
   key.setRequiredScopeId(argScopeId);
   deleteNumberDefByScopeIdx(Authorization, key);
 }
 public int compareTo(Object obj) {
   if (obj == null) {
     return (1);
   } else if (obj instanceof CFDbTestValueByScopeIdxKey) {
     CFDbTestValueByScopeIdxKey rhs = (CFDbTestValueByScopeIdxKey) obj;
     if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
       return (-1);
     } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
       return (1);
     }
     if (getRequiredScopeId() < rhs.getRequiredScopeId()) {
       return (-1);
     } else if (getRequiredScopeId() > rhs.getRequiredScopeId()) {
       return (1);
     }
     return (0);
   } else if (obj instanceof CFDbTestValueBuff) {
     CFDbTestValueBuff rhs = (CFDbTestValueBuff) obj;
     if (getRequiredTenantId() < rhs.getRequiredTenantId()) {
       return (-1);
     } else if (getRequiredTenantId() > rhs.getRequiredTenantId()) {
       return (1);
     }
     if (getRequiredScopeId() < rhs.getRequiredScopeId()) {
       return (-1);
     } else if (getRequiredScopeId() > rhs.getRequiredScopeId()) {
       return (1);
     }
     return (0);
   } else {
     throw CFLib.getDefaultExceptionFactory()
         .newUnsupportedClassException(getClass(), "compareTo", "obj", obj, null);
   }
 }
 public void deleteNumberDefByScopeIdx(
     CFSecurityAuthorization Authorization, CFDbTestValueByScopeIdxKey argKey) {
   final String S_ProcName = "deleteNumberDefByScopeIdx";
   CFDbTestNumberDefBuff cur;
   LinkedList<CFDbTestNumberDefBuff> matchSet = new LinkedList<CFDbTestNumberDefBuff>();
   Iterator<CFDbTestNumberDefBuff> values = dictByPKey.values().iterator();
   while (values.hasNext()) {
     cur = values.next();
     if (argKey.equals(cur)) {
       matchSet.add(cur);
     }
   }
   Iterator<CFDbTestNumberDefBuff> iterMatch = matchSet.iterator();
   while (iterMatch.hasNext()) {
     cur = iterMatch.next();
     String subClassCode = cur.getClassCode();
     if ("NUMD".equals(subClassCode)) {
       schema.getTableNumberDef().deleteNumberDef(Authorization, cur);
     } else if ("NUMC".equals(subClassCode)) {
       schema.getTableNumberCol().deleteNumberCol(Authorization, (CFDbTestNumberColBuff) cur);
     } else if ("NUMT".equals(subClassCode)) {
       schema.getTableNumberType().deleteNumberType(Authorization, (CFDbTestNumberTypeBuff) cur);
     } else {
       throw CFLib.getDefaultExceptionFactory()
           .newUnsupportedClassException(
               getClass(),
               S_ProcName,
               "subClassCode",
               cur,
               "Instance of or subclass of NumberDef must not be \"" + subClassCode + "\"");
     }
   }
 }