_userDAO = userDAO;
}
@Override
public InsertMongoDBObject toDBObject(A action) {
return new InsertMongoDBObject().setID(action.getID()).
append(_fields.getTypeField(), getActionType(action)).
append(_fields.getUserField(), action.getUser() != null ? action.getUser().getID() : null).
append(_fields.getUsernameField(), action.getUser() != null ? action.getUser().getUsername() : null).
append(_fields.getDateField(), action.getDate()).
append(_fields.getCommentField(), action.getComment()).