當前位置: 首頁>>代碼示例>>Java>>正文


Java XMLType類代碼示例

本文整理匯總了Java中oracle.xdb.XMLType的典型用法代碼示例。如果您正苦於以下問題:Java XMLType類的具體用法?Java XMLType怎麽用?Java XMLType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


XMLType類屬於oracle.xdb包,在下文中一共展示了XMLType類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: nullSafeGet

import oracle.xdb.XMLType; //導入依賴的package包/類
@Override
public Object nullSafeGet(final ResultSet resultSet,
        final String[] names,
        final SessionImplementor session,
        final Object owner) throws SQLException {
    XMLType xmlType = (XMLType) resultSet.getObject(names[0]);

    Order document = null;
    if (xmlType != null) {
        try {
            final Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
            document = unmarshaller.unmarshal(xmlType.getDocument(), Order.class).getValue();
        } catch (JAXBException e) {
            throw new SQLException("Could not unmarshal Order", e);
        }
    }

    return document;
}
 
開發者ID:switchbitio,項目名稱:xmltype-jpa,代碼行數:20,代碼來源:OrderUserType.java

示例2: getDOM

import oracle.xdb.XMLType; //導入依賴的package包/類
public Node getDOM(ResultSet resultSet, String columnName) throws SQLException {
        final OracleResultSet oracleResultSet = getOracleResultSet(resultSet);

//        XMLType xmlType = (XMLType) oracleResultSet.getObject(columnName);
        final OPAQUE opaque = oracleResultSet.getOPAQUE(columnName);
        final XMLType xmlType = XMLType.createXML(opaque);
        final Node doc;
        if(false && xmlType.isFragment()) {
            //  TODO: Handle XML fragment correctly
            //   doc = XMLUtils.parseDocumentFragment(xmlType.getStringVal());
            doc = null;
        } else {
            // FIXME: Xerces throws when walking the tree if we return the DOM directly!!!
//                doc = xmlType.getDOM();
            doc = XMLUtils.stringToDOM(xmlType.getStringVal());
        }

        return doc;
    }
 
開發者ID:evlist,項目名稱:orbeon-forms,代碼行數:20,代碼來源:SQLProcessorOracleDelegateBase.java

示例3: convertClobToSQLXML

import oracle.xdb.XMLType; //導入依賴的package包/類
public SQLXML convertClobToSQLXML(Clob pClob) {
  //TODO make database agnostic
  try {
    return XMLType.createXML(mDatabaseConnection.unwrap(OracleConnection.class), (CLOB) pClob);
  }
  catch(SQLException e) {
    throw new ExInternal("XMLType can not be created",e);
  }
}
 
開發者ID:Fivium,項目名稱:FOXopen,代碼行數:10,代碼來源:UCon.java

示例4: createXmlType

import oracle.xdb.XMLType; //導入依賴的package包/類
/**
   * @deprecated New binding allows DOMs to be bound directly into statements, do that instead.
   */
  @Deprecated
  public XMLType createXmlType(DOM pDOM) throws ExInternal {
    throw new UnsupportedOperationException();
//    try {
//      return XMLType.createXML(mDatabaseConnection.unwrap(OracleConnection.class), pDOM.outputNodeToString("  ",false, false, false, false, false, true));
//    }
//    catch(SQLException e) {
//      throw new ExInternal("XMLType can not be created",e);
//    }
  }
 
開發者ID:Fivium,項目名稱:FOXopen,代碼行數:14,代碼來源:UCon.java

示例5: setDOM

import oracle.xdb.XMLType; //導入依賴的package包/類
public void setDOM(PreparedStatement stmt, int index, String document) throws SQLException {
    // Get an OraclePreparedStatement
    final OraclePreparedStatement oracleStmt = getOraclePreparedStatement(stmt);

    final XMLType xmlType = XMLType.createXML(oracleStmt.getConnection(), document);
    oracleStmt.setObject(index, xmlType);
}
 
開發者ID:evlist,項目名稱:orbeon-forms,代碼行數:8,代碼來源:SQLProcessorOracleDelegateBase.java

示例6: sqlTypes

import oracle.xdb.XMLType; //導入依賴的package包/類
@Override
public int[] sqlTypes() {
    return new int[]{XMLType._SQL_TYPECODE};
}
 
開發者ID:switchbitio,項目名稱:xmltype-jpa,代碼行數:5,代碼來源:OrderUserType.java

示例7: OracleXmlDialect

import oracle.xdb.XMLType; //導入依賴的package包/類
public OracleXmlDialect() {
    registerColumnType(XMLType._SQL_TYPECODE, "XMLTYPE");
}
 
開發者ID:switchbitio,項目名稱:xmltype-jpa,代碼行數:4,代碼來源:OracleXmlDialect.java

示例8: H2OracleXmlDialect

import oracle.xdb.XMLType; //導入依賴的package包/類
public H2OracleXmlDialect() {
    registerColumnType(XMLType._SQL_TYPECODE, "VARCHAR2");
}
 
開發者ID:switchbitio,項目名稱:xmltype-jpa,代碼行數:4,代碼來源:H2OracleXmlDialect.java

示例9: executeTask

import oracle.xdb.XMLType; //導入依賴的package包/類
@Override
public TaskCompletionMessage executeTask() {
  XMLType.cleanupCache(true);
  return new TaskCompletionMessage(this, "XMLType cache cleanup successful");
}
 
開發者ID:Fivium,項目名稱:FOXopen,代碼行數:6,代碼來源:ConnectionAgent.java


注:本文中的oracle.xdb.XMLType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。