public ERD2WExtendedRule cloneRule() { EOKeyValueArchiver archiver = new EOKeyValueArchiver(); encodeWithKeyValueArchiver(archiver); EOKeyValueUnarchiver unarchiver = new EOKeyValueUnarchiver(archiver.dictionary()); return new ERD2WExtendedRule(unarchiver); }
public void encodeWithKeyValueArchiver(EOKeyValueArchiver eokeyvaluearchiver) { super.encodeWithKeyValueArchiver(eokeyvaluearchiver); if (mutableUserInfo != null && mutableUserInfo.allKeys().count() > 0) eokeyvaluearchiver.encodeObject(mutableUserInfo, "userInfo"); ((NSMutableDictionary) eokeyvaluearchiver.dictionary()) .setObjectForKey("com.webobjects.directtoweb.Rule", "class"); }
protected static String encode(NSArray rules) { if (rules != null) { EOKeyValueArchiver archiver = new EOKeyValueArchiver(); archiver.encodeObject(rules, RuleModel.RULES_KEY); return NSPropertyListSerialization.stringFromPropertyList( transformDictionary(archiver.dictionary(), RuleModelUtilities.compressionLookup())); } else { return null; } }
public String objectAsString(Rule o) { EOKeyValueArchiver eokeyvaluearchiver = new EOKeyValueArchiver(); o.encodeWithKeyValueArchiver(eokeyvaluearchiver); return NSPropertyListSerialization.stringFromPropertyList(eokeyvaluearchiver.dictionary()); }