You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
1.5 KiB
Java
81 lines
1.5 KiB
Java
package cokr.xit.base.syslog;
|
|
|
|
import cokr.xit.foundation.component.QueryRequest;
|
|
|
|
public class LogQuery extends QueryRequest {
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String[]
|
|
logTypes,
|
|
userIDs,
|
|
userAccounts;
|
|
private String
|
|
userName,
|
|
fromDate,
|
|
toDate;
|
|
|
|
public String[] getLogTypes() {
|
|
return ifEmpty(logTypes, null);
|
|
}
|
|
|
|
public void setLogTypes(String... logTypes) {
|
|
this.logTypes = logTypes;
|
|
}
|
|
|
|
public String[] getUserIDs() {
|
|
return ifEmpty(userIDs, null);
|
|
}
|
|
|
|
public void setUserIDs(String... userIDs) {
|
|
this.userIDs = userIDs;
|
|
}
|
|
|
|
public String[] getUserAccounts() {
|
|
return ifEmpty(userAccounts, null);
|
|
}
|
|
|
|
public void setUserAccounts(String[] userAccounts) {
|
|
this.userAccounts = userAccounts;
|
|
}
|
|
|
|
public String getUserName() {
|
|
return userName;
|
|
}
|
|
|
|
public void setUserName(String userName) {
|
|
this.userName = userName;
|
|
}
|
|
|
|
public String getFromDate() {
|
|
return fromDate;
|
|
}
|
|
|
|
public void setFromDate(String fromDate) {
|
|
this.fromDate = fromDate;
|
|
}
|
|
|
|
public String getToDate() {
|
|
return toDate;
|
|
}
|
|
|
|
public void setToDate(String toDate) {
|
|
this.toDate = toDate;
|
|
}
|
|
|
|
@Override
|
|
public String getOrderBy() {
|
|
String orderBy = blankIfEmpty(super.getOrderBy());
|
|
if (isEmpty(orderBy)) {
|
|
if (!isEmpty(logTypes))
|
|
orderBy += "LOG_TYPE, ";
|
|
if (!isEmpty(userIDs))
|
|
orderBy += "USER_ID, ";
|
|
if (!isEmpty(userAccounts))
|
|
orderBy += "USER_ACNT, ";
|
|
if (!isEmpty(userName))
|
|
orderBy += "USER_NM, ";
|
|
orderBy += "LOG_ID DESC";
|
|
}
|
|
return orderBy;
|
|
}
|
|
} |