public static Object decodeWithKeyValueUnarchiver(
      Class assignmentClass, EOKeyValueUnarchiver keyValueUnarchiver) {
    try {
      Constructor constructor =
          assignmentClass.getConstructor(new Class[] {String.class, String.class});

      SelfAssignment clone =
          (SelfAssignment)
              constructor.newInstance(
                  (Object[])
                      new String[] {
                        (String) keyValueUnarchiver.decodeObjectForKey(KEYPATH_KEY),
                        (String) keyValueUnarchiver.decodeObjectForKey(VALUE_KEY)
                      });

      return clone;
    } catch (NoSuchMethodException nsme) {
      throw new ForwardException(nsme);
    } catch (InvocationTargetException ite) {
      throw new ForwardException(ite);
    } catch (InstantiationException ie) {
      throw new ForwardException(ie);
    } catch (IllegalAccessException iae) {
      throw new ForwardException(iae);
    }
  }
 public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver keyValueUnarchiver) {
   return new AttributeCondition(
       (String) keyValueUnarchiver.decodeObjectForKey(ERROR_MESSAGE_KEY),
       (String) keyValueUnarchiver.decodeObjectForKey(CONDITION_KEY_KEY),
       keyValueUnarchiver.decodeBoolForKey(AS_LESS_THAN_KEY),
       keyValueUnarchiver.decodeBoolForKey(AS_EQUALS_KEY),
       keyValueUnarchiver.decodeBoolForKey(AS_NOT_EQUALS_KEY),
       keyValueUnarchiver.decodeBoolForKey(AS_GREATER_THAN_KEY));
 }
  protected static NSArray decode(String string) {
    if (string != null) {
      NSDictionary dictionary = NSPropertyListSerialization.dictionaryForString(string);
      EOKeyValueUnarchiver unarchiver =
          new EOKeyValueUnarchiver(
              transformDictionary(dictionary, RuleModelUtilities.expansionLookup()));
      NSArray rules = (NSArray) unarchiver.decodeObjectForKey(RuleModel.RULES_KEY);

      unarchiver.finishInitializationOfObjects();

      return rules;
    } else {
      return null;
    }
  }
 public ERD2WExtendedRule(EOKeyValueUnarchiver eokeyvalueunarchiver) {
   super(
       eokeyvalueunarchiver.decodeIntForKey("author"),
       ((EOQualifier) eokeyvalueunarchiver.decodeObjectForKey("lhs")),
       ((Assignment) eokeyvalueunarchiver.decodeObjectForKey("rhs")));
   NSDictionary dict = (NSDictionary) eokeyvalueunarchiver.decodeObjectForKey("userInfo");
   setAuthor(eokeyvalueunarchiver.decodeIntForKey("author"));
   assignmentClassName = (String) eokeyvalueunarchiver.decodeObjectForKey("assignmentClassName");
   if (dict != null) setMutableUserInfo(dict.mutableClone());
 }
 public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver unarchiver) {
   return new ERXExistsQualifier(
       (EOQualifier) unarchiver.decodeObjectForKey("subqualifier"),
       (String) unarchiver.decodeObjectForKey("baseKeyPath"));
 }