org.teiid.metadata.Table.setLastDataModification()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(251)

本文整理了Java中org.teiid.metadata.Table.setLastDataModification()方法的一些代码示例,展示了Table.setLastDataModification()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setLastDataModification()方法的具体详情如下:
包路径:org.teiid.metadata.Table
类名称:Table
方法名:setLastDataModification

Table.setLastDataModification介绍

暂无

代码示例

代码示例来源:origin: org.teiid/teiid-runtime

  1. private void updateModified(boolean data, String vdbName, String vdbVersion, String schema,
  2. String... objectNames) {
  3. Schema s = getSchema(vdbName, vdbVersion, schema);
  4. if (s == null) {
  5. return;
  6. }
  7. long ts = System.currentTimeMillis();
  8. for (String name:objectNames) {
  9. Table table = s.getTables().get(name);
  10. if (table == null) {
  11. continue;
  12. }
  13. if (data) {
  14. table.setLastDataModification(ts);
  15. } else {
  16. table.setLastModified(ts);
  17. }
  18. }
  19. }

代码示例来源:origin: org.jboss.teiid/teiid-engine

  1. private void checkForUpdates(AtomicResultsMessage results, Command command,
  2. EventDistributor distributor, int commandIndex, long ts) {
  3. if (!RelationalNodeUtil.isUpdate(command) || !(command instanceof ProcedureContainer)) {
  4. return;
  5. }
  6. ProcedureContainer pc = (ProcedureContainer)command;
  7. GroupSymbol gs = pc.getGroup();
  8. Integer zero = Integer.valueOf(0);
  9. if (results.getResults().length <= commandIndex || zero.equals(results.getResults()[commandIndex].get(0))) {
  10. return;
  11. }
  12. Object metadataId = gs.getMetadataID();
  13. if (metadataId == null) {
  14. return;
  15. }
  16. if (!(metadataId instanceof Table)) {
  17. if (metadataId instanceof TempMetadataID) {
  18. TempMetadataID tid = (TempMetadataID)metadataId;
  19. if (tid.getTableData().getModel() != null) {
  20. tid.getTableData().dataModified((Integer)results.getResults()[commandIndex].get(0));
  21. }
  22. }
  23. return;
  24. }
  25. Table t = (Table)metadataId;
  26. t.setLastDataModification(ts);
  27. if (distributor != null) {
  28. distributor.dataModification(this.workItem.getDqpWorkContext().getVdbName(), this.workItem.getDqpWorkContext().getVdbVersion(), t.getParent().getName(), t.getName());
  29. }
  30. }

代码示例来源:origin: teiid/teiid

  1. private void checkForUpdates(AtomicResultsMessage results, Command command,
  2. EventDistributor distributor, int commandIndex, long ts) {
  3. if (!RelationalNodeUtil.isUpdate(command) || !(command instanceof ProcedureContainer)) {
  4. return;
  5. }
  6. ProcedureContainer pc = (ProcedureContainer)command;
  7. GroupSymbol gs = pc.getGroup();
  8. Integer zero = Integer.valueOf(0);
  9. if (results.getResults().length <= commandIndex || zero.equals(results.getResults()[commandIndex].get(0))) {
  10. return;
  11. }
  12. Object metadataId = gs.getMetadataID();
  13. if (metadataId == null) {
  14. return;
  15. }
  16. if (!(metadataId instanceof Table)) {
  17. if (metadataId instanceof TempMetadataID) {
  18. TempMetadataID tid = (TempMetadataID)metadataId;
  19. if (tid.getTableData().getModel() != null) {
  20. tid.getTableData().dataModified((Integer)results.getResults()[commandIndex].get(0));
  21. }
  22. }
  23. return;
  24. }
  25. Table t = (Table)metadataId;
  26. t.setLastDataModification(ts);
  27. if (distributor != null) {
  28. distributor.dataModification(this.workItem.getDqpWorkContext().getVdbName(), this.workItem.getDqpWorkContext().getVdbVersion(), t.getParent().getName(), t.getName());
  29. }
  30. }

代码示例来源:origin: org.teiid/teiid-engine

  1. private void checkForUpdates(AtomicResultsMessage results, Command command,
  2. EventDistributor distributor, int commandIndex, long ts) {
  3. if (!RelationalNodeUtil.isUpdate(command) || !(command instanceof ProcedureContainer)) {
  4. return;
  5. }
  6. ProcedureContainer pc = (ProcedureContainer)command;
  7. GroupSymbol gs = pc.getGroup();
  8. Integer zero = Integer.valueOf(0);
  9. if (results.getResults().length <= commandIndex || zero.equals(results.getResults()[commandIndex].get(0))) {
  10. return;
  11. }
  12. Object metadataId = gs.getMetadataID();
  13. if (metadataId == null) {
  14. return;
  15. }
  16. if (!(metadataId instanceof Table)) {
  17. if (metadataId instanceof TempMetadataID) {
  18. TempMetadataID tid = (TempMetadataID)metadataId;
  19. if (tid.getTableData().getModel() != null) {
  20. tid.getTableData().dataModified((Integer)results.getResults()[commandIndex].get(0));
  21. }
  22. }
  23. return;
  24. }
  25. Table t = (Table)metadataId;
  26. t.setLastDataModification(ts);
  27. if (distributor != null) {
  28. distributor.dataModification(this.workItem.getDqpWorkContext().getVdbName(), this.workItem.getDqpWorkContext().getVdbVersion(), t.getParent().getName(), t.getName());
  29. }
  30. }

相关文章