本文整理了Java中org.apache.jena.rdf.model.Model.supportsTransactions()
方法的一些代码示例,展示了Model.supportsTransactions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.supportsTransactions()
方法的具体详情如下:
包路径:org.apache.jena.rdf.model.Model
类名称:Model
方法名:supportsTransactions
[英]Determine whether this model supports transactions.
[中]确定此模型是否支持事务。
代码示例来源:origin: vivo-project/Vitro
@Override
public boolean supportsTransactions() {
return inner.supportsTransactions();
}
代码示例来源:origin: apache/jena
@Override
public boolean supportsTransactions() {
return holder.getBaseItem().supportsTransactions();
}
代码示例来源:origin: org.apache.jena/jena-core
/**
* Commit the transaction on the model if transactions are supported.
*
* @param m
*/
public static Model txnCommit(Model m) {
if (m.supportsTransactions()) {
return m.commit();
}
return m;
}
代码示例来源:origin: apache/jena
/**
* Commit the transaction on the model if transactions are supported.
*
* @param m
*/
public static Model txnCommit(Model m) {
if (m.supportsTransactions()) {
return m.commit();
}
return m;
}
代码示例来源:origin: apache/jena
public void testTransactions() {
if ( model.supportsTransactions() )
model.executeInTxn(() -> {}) ;
}
代码示例来源:origin: apache/jena
/**
* Begin a transaction on the model if transactions are supported.
*
* @param m
*/
public static Model txnBegin(Model m) {
if (m.supportsTransactions()) {
return m.begin();
}
return m;
}
代码示例来源:origin: apache/jena
/**
* Rollback (abort) the transaction on the model if transactions are
* supported.
*
* @param m
*/
public static Model txnRollback(Model m) {
if (m.supportsTransactions()) {
return m.abort();
}
return m;
}
}
代码示例来源:origin: org.apache.jena/jena-core
/**
* Rollback (abort) the transaction on the model if transactions are
* supported.
*
* @param m
*/
public static Model txnRollback(Model m) {
if (m.supportsTransactions()) {
return m.abort();
}
return m;
}
}
代码示例来源:origin: org.apache.jena/jena-core
/**
* Begin a transaction on the model if transactions are supported.
*
* @param m
*/
public static Model txnBegin(Model m) {
if (m.supportsTransactions()) {
return m.begin();
}
return m;
}
代码示例来源:origin: apache/jena
public void testTransactions() {
if ( model.supportsTransactions() )
model.executeInTxn(() -> {}) ;
}
代码示例来源:origin: org.apache.jena/jena-core
public void testTransactions() {
if ( model.supportsTransactions() )
model.executeInTxn(() -> {}) ;
}
代码示例来源:origin: org.apache.jena/jena-core
public void testTransactions() {
if ( model.supportsTransactions() )
model.executeInTxn(() -> {}) ;
}
代码示例来源:origin: org.apache.jena/jena-core
protected void addContent( Resource root, Model m, Content c )
{
if (m.supportsTransactions())
{
m.begin();
try { c.fill( m ); m.commit(); }
catch (Throwable t) { m.abort(); throw new TransactionAbortedException( root, t ); }
}
else
c.fill( m );
}
代码示例来源:origin: apache/jena
protected void addContent( Resource root, Model m, Content c )
{
if (m.supportsTransactions())
{
m.begin();
try { c.fill( m ); m.commit(); }
catch (Throwable t) { m.abort(); throw new TransactionAbortedException( root, t ); }
}
else
c.fill( m );
}
代码示例来源:origin: apache/jena
return new SPARQLResult(model);
};
if ( model.supportsTransactions() )
return model.calculateInTxn(r);
else
内容来源于网络,如有侵权,请联系作者删除!