+ int postId = 0;
+ do {
+ String postPrefix = sonePrefix + "/Post." + postId++;
+ id = configuration.getStringValue(postPrefix + "/ID").getValue(null);
+ if (id == null) {
+ break;
+ }
+ long time = configuration.getLongValue(postPrefix + "/Time").getValue(null);
+ String text = configuration.getStringValue(postPrefix + "/Text").getValue(null);
+ Post post = new Post(UUID.fromString(id), sone, time, text);
+ postCache.put(id, post);
+ sone.addPost(post);
+ } while (true);
+ int replyCounter = 0;
+ do {
+ String replyPrefix = sonePrefix + "/Reply." + replyCounter++;
+ String replyId = configuration.getStringValue(replyPrefix + "/ID").getValue(null);
+ if (replyId == null) {
+ break;
+ }
+ Sone replySone = soneCache.get(configuration.getStringValue(replyPrefix + "/Sone").getValue(null));
+ Post replyPost = postCache.get(configuration.getStringValue(replyPrefix + "/Post").getValue(null));
+ long replyTime = configuration.getLongValue(replyPrefix + "/Time").getValue(null);
+ String replyText = configuration.getStringValue(replyPrefix + "/Text").getValue(null);
+ Reply reply = new ReplyShell().setSone(replySone).setPost(replyPost).setTime(replyTime).setText(replyText).getShelled();
+ replyCache.put(replyId, reply);
+ } while (true);