org.geotools.data.Transaction.getProperty()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(91)

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

Transaction.getProperty介绍

[英]Retrive a Transaction property held by this transaction.

This may be used to provide hints to DataStore implementations, it operates as a blackboard for client, SimpleFeatureSource communication.
[中]检索此交易持有的交易财产。
这可以用来为数据存储实现提供提示,它可以作为客户端SimpleFeatureSource通信的黑板。

代码示例

代码示例来源:origin: locationtech/geogig

private Optional<String> getTransactionProperty(final String propName) {
  Object property = this.tx.getProperty(propName);
  if (property instanceof String) {
    return Optional.of((String) property);
  }
  return Optional.absent();
}

代码示例来源:origin: org.geotools/gt-wfs

if(transaction != null && transaction.getProperty("handle") instanceof String){
  String commitMessageHandle = (String) transaction.getProperty("handle");
  if(commitMessageHandle != null){
    hints.put("handle", commitMessageHandle);

代码示例来源:origin: org.geotools/gt2-postgis-versioned

Feature f = null;
FeatureWriter writer = null;
String author = (String) t.getProperty(VersionedPostgisDataStore.AUTHOR);
String message = (String) t.getProperty(VersionedPostgisDataStore.MESSAGE);
try {
  writer = wrapped.getFeatureWriterAppend(VersionedPostgisDataStore.TBL_CHANGESETS, t);

相关文章