entity.put(Dictionary.FIELD_PID, element.getId());
entity.put(Dictionary.FIELD_TYPE, element.getType());
entity.put(Dictionary.FIELD_TIMESTAMP, System.currentTimeMillis());
entity.put(Dictionary.FIELD_DELAY, this.format.format(new Date()));
entity.put(Dictionary.FIELD_CLASS, element.getClass().getSimpleName());
JID to = this.jidBuilder.build(element.getTo());
JID from = this.jidBuilder.build(element.getFrom());
entity.put(Dictionary.FIELD_TO, this.bare ? to.asStringWithBare() : to.asString());
entity.put(Dictionary.FIELD_FROM, this.bare ? from.asStringWithBare() : from.asString());
return entity;
}