package journal.reader; public class DeleteJournalEntry extends JournalEntry { String name; String rev; int type; String command; String filespec; public DeleteJournalEntry(Token startToken, Token nameToken, Token revToken, Token typeToken, Token cmdToken, Token filespecToken) { super(startToken); name = nameToken.getValue(); rev = startToken.getValue(); type = Integer.parseInt(typeToken.getValue()); command = cmdToken.getValue(); filespec = filespecToken.getValue(); } @Override public String toString() { StringBuffer buf = new StringBuffer(actionType.toString()); buf.append(" "); buf.append(name); buf.append(" "); buf.append(rev); buf.append(" "); buf.append(type); buf.append(" "); buf.append(command); buf.append(" "); buf.append(filespec); return buf.toString(); } public boolean equals(Object to) { if (!to.getClass().equals(getClass())) { return false; } DeleteJournalEntry toEntry = (DeleteJournalEntry) to; return (actionType.equals(toEntry.actionType)); } @Override public String toJournalString() { StringBuffer buf = new StringBuffer(super.toJournalString()); buf.append(" @"); buf.append(name); buf.append("@"); buf.append(" @"); buf.append(rev); buf.append("@"); buf.append(" "); buf.append(type); buf.append(" @"); buf.append(command); buf.append("@"); buf.append(" @"); buf.append(filespec); buf.append("@"); return buf.toString(); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 8200 | Sven Erik Knop |
JournalReader can now process delete records (@dl@). Also fixed processing of type 12 note records = journaldbchecksum |