本文整理了Java中org.teiid.metadata.Table.setLastDataModification()
方法的一些代码示例,展示了Table.setLastDataModification()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setLastDataModification()
方法的具体详情如下:
包路径:org.teiid.metadata.Table
类名称:Table
方法名:setLastDataModification
暂无
代码示例来源:origin: org.teiid/teiid-runtime
private void updateModified(boolean data, String vdbName, String vdbVersion, String schema,
String... objectNames) {
Schema s = getSchema(vdbName, vdbVersion, schema);
if (s == null) {
return;
}
long ts = System.currentTimeMillis();
for (String name:objectNames) {
Table table = s.getTables().get(name);
if (table == null) {
continue;
}
if (data) {
table.setLastDataModification(ts);
} else {
table.setLastModified(ts);
}
}
}
代码示例来源:origin: org.jboss.teiid/teiid-engine
private void checkForUpdates(AtomicResultsMessage results, Command command,
EventDistributor distributor, int commandIndex, long ts) {
if (!RelationalNodeUtil.isUpdate(command) || !(command instanceof ProcedureContainer)) {
return;
}
ProcedureContainer pc = (ProcedureContainer)command;
GroupSymbol gs = pc.getGroup();
Integer zero = Integer.valueOf(0);
if (results.getResults().length <= commandIndex || zero.equals(results.getResults()[commandIndex].get(0))) {
return;
}
Object metadataId = gs.getMetadataID();
if (metadataId == null) {
return;
}
if (!(metadataId instanceof Table)) {
if (metadataId instanceof TempMetadataID) {
TempMetadataID tid = (TempMetadataID)metadataId;
if (tid.getTableData().getModel() != null) {
tid.getTableData().dataModified((Integer)results.getResults()[commandIndex].get(0));
}
}
return;
}
Table t = (Table)metadataId;
t.setLastDataModification(ts);
if (distributor != null) {
distributor.dataModification(this.workItem.getDqpWorkContext().getVdbName(), this.workItem.getDqpWorkContext().getVdbVersion(), t.getParent().getName(), t.getName());
}
}
代码示例来源:origin: teiid/teiid
private void checkForUpdates(AtomicResultsMessage results, Command command,
EventDistributor distributor, int commandIndex, long ts) {
if (!RelationalNodeUtil.isUpdate(command) || !(command instanceof ProcedureContainer)) {
return;
}
ProcedureContainer pc = (ProcedureContainer)command;
GroupSymbol gs = pc.getGroup();
Integer zero = Integer.valueOf(0);
if (results.getResults().length <= commandIndex || zero.equals(results.getResults()[commandIndex].get(0))) {
return;
}
Object metadataId = gs.getMetadataID();
if (metadataId == null) {
return;
}
if (!(metadataId instanceof Table)) {
if (metadataId instanceof TempMetadataID) {
TempMetadataID tid = (TempMetadataID)metadataId;
if (tid.getTableData().getModel() != null) {
tid.getTableData().dataModified((Integer)results.getResults()[commandIndex].get(0));
}
}
return;
}
Table t = (Table)metadataId;
t.setLastDataModification(ts);
if (distributor != null) {
distributor.dataModification(this.workItem.getDqpWorkContext().getVdbName(), this.workItem.getDqpWorkContext().getVdbVersion(), t.getParent().getName(), t.getName());
}
}
代码示例来源:origin: org.teiid/teiid-engine
private void checkForUpdates(AtomicResultsMessage results, Command command,
EventDistributor distributor, int commandIndex, long ts) {
if (!RelationalNodeUtil.isUpdate(command) || !(command instanceof ProcedureContainer)) {
return;
}
ProcedureContainer pc = (ProcedureContainer)command;
GroupSymbol gs = pc.getGroup();
Integer zero = Integer.valueOf(0);
if (results.getResults().length <= commandIndex || zero.equals(results.getResults()[commandIndex].get(0))) {
return;
}
Object metadataId = gs.getMetadataID();
if (metadataId == null) {
return;
}
if (!(metadataId instanceof Table)) {
if (metadataId instanceof TempMetadataID) {
TempMetadataID tid = (TempMetadataID)metadataId;
if (tid.getTableData().getModel() != null) {
tid.getTableData().dataModified((Integer)results.getResults()[commandIndex].get(0));
}
}
return;
}
Table t = (Table)metadataId;
t.setLastDataModification(ts);
if (distributor != null) {
distributor.dataModification(this.workItem.getDqpWorkContext().getVdbName(), this.workItem.getDqpWorkContext().getVdbVersion(), t.getParent().getName(), t.getName());
}
}
内容来源于网络,如有侵权,请联系作者删除!