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;
}
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);
}
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;
}
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);
}
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;
}
Aggregations