java.sql.SQLXML.free()方法的使用及代码示例

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

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

SQLXML.free介绍

[英]Frees any resources held by this object. After free is called, calling method other than free will throw SQLException (calling freerepeatedly will do nothing).
[中]释放此对象持有的所有资源。在调用free之后,调用free以外的方法将抛出SQLException(反复调用free将什么都不会做)。

代码示例

代码示例来源:origin: spring-projects/spring-framework

@Override
public void cleanup() {
  if (this.xmlObject != null) {
    try {
      this.xmlObject.free();
    }
    catch (SQLException ex) {
      throw new DataAccessResourceFailureException("Could not free SQLXML object", ex);
    }
  }
}

代码示例来源:origin: org.mybatis/mybatis

protected String sqlxmlToString(SQLXML sqlxml) throws SQLException {
 if (sqlxml == null) {
  return null;
 }
 try {
  return sqlxml.getString();
 } finally {
  sqlxml.free();
 }
}

代码示例来源:origin: org.mybatis/mybatis

@Override
public void setNonNullParameter(PreparedStatement ps, int i, String parameter, JdbcType jdbcType)
  throws SQLException {
 SQLXML sqlxml = ps.getConnection().createSQLXML();
 try {
  sqlxml.setString(parameter);
  ps.setSQLXML(i, sqlxml);
 } finally {
  sqlxml.free();
 }
}

代码示例来源:origin: ha-jdbc/ha-jdbc

@Override
public void close(D database, SQLXML xml) throws SQLException
{
  xml.free();
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public void cleanup() {
  if (this.xmlObject != null) {
    try {
      this.xmlObject.free();
    }
    catch (SQLException ex) {
      throw new DataAccessResourceFailureException("Could not free SQLXML object", ex);
    }
  }
}

代码示例来源:origin: co.paralleluniverse/comsat-jdbc

@Override
  public Void call() throws SQLException {
    sqlXML.free();
    return null;
  }
});

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

public void free() throws SQLException {
  this.reference.free();
}

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

public void free() throws SQLException {
  this.reference.free();
}

代码示例来源:origin: org.springframework/org.springframework.jdbc

public void cleanup() {
  try {
    this.xmlObject.free();
  }
  catch (SQLException ex) {
    throw new DataAccessResourceFailureException("Could not free SQLXML object", ex);
  }
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
   * Casts the passed object to SQLXML and calls getString and free methods
   */
  public String getStringAndFreeSQLXML(Object sqlXml) throws SQLException { 
    String str = ((SQLXML)sqlXml).getString();
    ((SQLXML)sqlXml).free();
    return str;
  }
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Casts the passed object to SQLXML and calls getString and free methods
 */
public static String getStringAndFreeSQLXML(Object sqlXml) throws SQLException {
  String str = ((SQLXML)sqlXml).getString();
  ((SQLXML)sqlXml).free();
  return str;
}

代码示例来源:origin: org.jooq/jooq

/**
 * Safely free an XML object.
 * <p>
 * This method will silently ignore if <code>xml</code> is
 * <code>null</code>, or if {@link SQLXML#free()} throws an exception.
 */
public static final void safeFree(SQLXML xml) {
  if (xml != null) {
    try {
      xml.free();
    }
    catch (Exception ignore) {
      log.warn("Error while freeing resource", ignore);
    }
    // [#3069] The free() method was added only in JDBC 4.0 / Java 1.6
    catch (AbstractMethodError ignore) {}
  }
}

代码示例来源:origin: com.sqlapp/sqlapp-core

sqlxml.free();
} catch (SQLException e) {

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.oracle

if (sqlXml != null) {
  str = sqlXml.getString();
  sqlXml.free();

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.dbws

try {
  String str = sqlXml.getString();
  sqlXml.free();

代码示例来源:origin: ngs-doo/dsl-json

else {
  StringConverter.serialize(xml.getString(), buffer);
  xml.free();

相关文章