Search in sources :

Example 1 with DatasourceTable

use of com.qlangtech.tis.workflow.pojo.DatasourceTable in project tis by qlangtech.

the class DatasourceTableDAOImpl method selectByPrimaryKey.

public DatasourceTable selectByPrimaryKey(Integer id) {
    DatasourceTable key = new DatasourceTable();
    key.setId(id);
    DatasourceTable record = (DatasourceTable) this.load("datasource_table.ibatorgenerated_selectByPrimaryKey", key);
    return record;
}
Also used : DatasourceTable(com.qlangtech.tis.workflow.pojo.DatasourceTable)

Example 2 with DatasourceTable

use of com.qlangtech.tis.workflow.pojo.DatasourceTable in project tis by qlangtech.

the class DatasourceTableDAOImpl method deleteByPrimaryKey.

public int deleteByPrimaryKey(Integer id) {
    DatasourceTable key = new DatasourceTable();
    key.setId(id);
    return this.deleteRecords("datasource_table.ibatorgenerated_deleteByPrimaryKey", key);
}
Also used : DatasourceTable(com.qlangtech.tis.workflow.pojo.DatasourceTable)

Example 3 with DatasourceTable

use of com.qlangtech.tis.workflow.pojo.DatasourceTable in project tis by qlangtech.

the class OfflineDatasourceAction method getDatabase.

public static Tab getDatabase(IWorkflowDAOFacade wfDaoFacade, Map<Integer, com.qlangtech.tis.workflow.pojo.DatasourceDb> dbMap, int tableid) {
    Tab dtab = null;
    DatasourceTable tab = wfDaoFacade.getDatasourceTableDAO().selectByPrimaryKey(tableid);
    if (tab == null) {
        throw new IllegalStateException("tabid:" + tableid + " relevant 'TableDump' object can not be null");
    }
    dtab = new Tab(tab);
    com.qlangtech.tis.workflow.pojo.DatasourceDb db = null;
    if ((db = dbMap.get(tab.getDbId())) == null) {
        db = wfDaoFacade.getDatasourceDbDAO().selectByPrimaryKey(tab.getDbId());
        if (db == null) {
            throw new IllegalStateException("tabid:" + tableid + " relevant 'TableDump' object can not be null");
        }
        dbMap.put(tab.getDbId(), db);
    }
    dtab.setDb(db);
    return dtab;
}
Also used : DatasourceTable(com.qlangtech.tis.workflow.pojo.DatasourceTable)

Example 4 with DatasourceTable

use of com.qlangtech.tis.workflow.pojo.DatasourceTable in project tis by qlangtech.

the class OfflineDatasourceAction method doSyncTableRecord.

/**
 * 线上控制台使用,用来添加table记录
 *
 * @param context
 */
public void doSyncTableRecord(Context context) {
    Integer id = this.getInt("id");
    if (id == null) {
        this.addErrorMessage(context, "id不能为空");
        this.setBizResult(context, false);
        return;
    }
    String name = this.getString("name");
    String tableLogicName = this.getString("tableLogicName");
    Integer dbId = this.getInt("db_id");
    if (dbId == null) {
        this.addErrorMessage(context, "db_id不能为空");
        this.setBizResult(context, false);
        return;
    }
    DatasourceTable datasourceTable = new DatasourceTable();
    datasourceTable.setId(id);
    datasourceTable.setName(name);
    datasourceTable.setDbId(dbId);
    Date now = new Date();
    datasourceTable.setCreateTime(now);
    this.offlineManager.syncTableRecord(datasourceTable, this, context);
}
Also used : DatasourceTable(com.qlangtech.tis.workflow.pojo.DatasourceTable)

Example 5 with DatasourceTable

use of com.qlangtech.tis.workflow.pojo.DatasourceTable in project tis by qlangtech.

the class DatasourceTableDAOImpl method loadFromWriteDB.

public DatasourceTable loadFromWriteDB(Integer id) {
    DatasourceTable key = new DatasourceTable();
    key.setId(id);
    DatasourceTable record = (DatasourceTable) this.loadFromWriterDB("datasource_table.ibatorgenerated_selectByPrimaryKey", key);
    return record;
}
Also used : DatasourceTable(com.qlangtech.tis.workflow.pojo.DatasourceTable)

Aggregations

DatasourceTable (com.qlangtech.tis.workflow.pojo.DatasourceTable)5