org.languagetool.server.DatabaseCheckLogEntry Maven / Gradle / Ivy
/*
* LanguageTool, a natural language style checker
* * Copyright (C) 2018 Fabian Richter
* *
* * This library is free software; you can redistribute it and/or
* * modify it under the terms of the GNU Lesser General Public
* * License as published by the Free Software Foundation; either
* * version 2.1 of the License, or (at your option) any later version.
* *
* * This library is distributed in the hope that it will be useful,
* * but WITHOUT ANY WARRANTY; without even the implied warranty of
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* * Lesser General Public License for more details.
* *
* * You should have received a copy of the GNU Lesser General Public
* * License along with this library; if not, write to the Free Software
* * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* * USA
*
*/
package org.languagetool.server;
import org.apache.commons.lang3.StringUtils;
import org.languagetool.Language;
import java.text.SimpleDateFormat;
import java.util.*;
class DatabaseCheckLogEntry extends DatabaseLogEntry {
private final Long userId;
private final Long client;
private final Long server;
private final int textSize;
private final int matches;
private final Language lang;
private final Language langDetected;
private final int computationTime;
private final Long textSessionId;
private final Calendar date;
private final String checkMode;
public DatabaseCheckLogEntry(Long userId, Long client, Long server, int textSize, int matches,
Language lang, Language langDetected, int computationTime,
Long textSessionId, String checkMode) {
this.userId = userId;
this.client = client;
this.server = server;
this.textSize = textSize;
this.matches = matches;
this.lang = lang;
this.langDetected = langDetected;
this.computationTime = computationTime;
this.textSessionId = textSessionId;
this.checkMode = checkMode;
this.date = Calendar.getInstance();
}
@Override
public Map