All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fastchar.systemtool.entity.QRTZTRIGGERSEntity Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy