com.fastchar.systemtool.entity.QRTZTRIGGERSEntity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fastchar-systemtool Show documentation
Show all versions of fastchar-systemtool Show documentation
FastChar-SystemTool is a FastChar-ExtJs plugin.
package com.fastchar.systemtool.entity;
import com.fastchar.core.FastChar;
import com.fastchar.database.FastPage;
import com.fastchar.database.info.FastSqlInfo;
import com.fastchar.extjs.core.FastExtEntity;
import com.fastchar.job.FastJob;
public class QRTZTRIGGERSEntity extends FastExtEntity {
private static final long serialVersionUID = 1L;
public static QRTZTRIGGERSEntity dao() {
return FastChar.getOverrides().singleInstance(QRTZTRIGGERSEntity.class);
}
public static QRTZTRIGGERSEntity newInstance() {
return FastChar.getOverrides().newInstance(QRTZTRIGGERSEntity.class);
}
protected QRTZTRIGGERSEntity() {
}
@Override
public boolean logNotFoundTable() {
return false;
}
@Override
public String getTableName() {
return "QRTZ_TRIGGERS";
}
@Override
public String getTableDetails() {
return "";
}
@Override
public String getEntityCode() {
return this.getClass().getSimpleName();
}
@Override
public FastPage showList(int page, int pageSize) {
String sqlStr = "select t.* " +
" from QRTZ_TRIGGERS as t" +
" ";
FastSqlInfo sqlInfo = toSelectSql(sqlStr);
return selectBySql(page, pageSize, sqlInfo.getSql(), sqlInfo.toParams());
}
@Override
public void setDefaultValue() {
set("PRIORITY", 0);
}
@Override
public void convertValue() {
super.convertValue();
}
@Override
public boolean delete() {
QRTZTRIGGERSEntity entity = selectById(getIds().toArray(new Object[]{}));
if (entity != null) {
FastJob.removeJob(entity.getString("JOB_NAME"));
return true;
}
return super.delete();
}
}