Examples of unwrap()


Examples of com.zaxxer.hikari.hibernate.HikariConnectionProvider.unwrap()

      provider.configure(props);
      Connection connection = provider.getConnection();
      provider.closeConnection(connection);

      Assert.assertNotNull(provider.unwrap(HikariConnectionProvider.class));
      Assert.assertFalse(provider.supportsAggressiveRelease());
      provider.stop();
   }
}
View Full Code Here

Examples of foodev.jsondiff.jsonwrap.JzonObject.unwrap()

    JzonElement fromEl = factory.wrap(from);
    JzonElement toEl = factory.wrap(to);

    JzonObject diff = diff(fromEl, toEl);

    return diff.unwrap();
  }

  /**
   * Runs a diff on the two given JSON objects given as string to produce another JSON object with instructions of how to transform the first argument to the second. Both from/to
   * are expected to be objects {}.
View Full Code Here

Examples of freemarker.ext.beans.BeansWrapper.unwrap()

      if (value != null) {
        Method m = ComponentHelper.getWriteMethod(bean, key);
        if (null != m) {
          if (value instanceof TemplateModel) {
            try {
              value = objectWrapper.unwrap((TemplateModel) value);
            } catch (TemplateModelException e) {
              logger.error("failed to unwrap [" + value + "] it will be ignored", e);
            }
          }
          try {
View Full Code Here

Examples of freemarker.template.DefaultObjectWrapper.unwrap()

            if (value != null) {
                // the value should ALWAYS be a decendant of TemplateModel
                if (value instanceof TemplateModel) {
                    try {
                        map.put(entry.getKey(), objectWrapper
                            .unwrap((TemplateModel) value));
                    } catch (TemplateModelException e) {
                        LOG.error("failed to unwrap [" + value
                            + "] it will be ignored", e);
                    }
View Full Code Here

Examples of gnu.javax.crypto.kwa.IKeyWrappingAlgorithm.unwrap()

          }

        msg = "Input length for unwrapping MUST be 40 bytes";
        try
          {
            kwa.unwrap(km, 0, 24);
            harness.fail(msg);
          }
        catch (IllegalArgumentException e)
          {
            harness.check(true, msg);
View Full Code Here

Examples of io.netty.util.concurrent.EventExecutor.unwrap()

        EventExecutor executor2 = channel.pipeline().context(TestChannelHandler1.class).executor();

        // same wrapped executor
        assertSame(executor1, executor2);
        // different executor under the wrapper
        assertNotSame(unwrapped1, executor2.unwrap());
        // executor3 must remain unchanged
        assertSame(executor3.unwrap(), future.channel().pipeline()
                .context(TestChannelHandler2.class)
                .executor()
                .unwrap());
View Full Code Here

Examples of java.sql.CallableStatement.unwrap()

        {
            Connection conn = dataSource.getConnection();

            CallableStatement stmt = conn.prepareCall("select 1");
            stmt.execute();
            rawStmt = stmt.unwrap(MockCallableStatement.class);

            ResultSet rs = (ResultSet) stmt.getObject(0);
           
            rawRs = rs.unwrap(MockResultSet.class);
           
View Full Code Here

Examples of java.sql.Connection.unwrap()

    Connection con = new TestConnectionImpl();
    Connection proxy = ProxyFactory.createProxy(con, new GenericInvocationHandler<Connection>(con));

    // if the underlying object extends the class (or matches the class) then the underlying object should be returned.
    {
      AbstractTestConnection unwrapped = proxy.unwrap(AbstractTestConnection.class);
      assertFalse(ProxyFactory.isProxy(unwrapped));
    }

    {
      TestConnectionImpl unwrapped = proxy.unwrap(TestConnectionImpl.class);
View Full Code Here

Examples of java.sql.PreparedStatement.unwrap()

         stmt.executeQuery("some sql");
         Assert.assertFalse(stmt.isClosed());
         Assert.assertNotNull(stmt.getGeneratedKeys());
         Assert.assertNotNull(stmt.getResultSet());
         Assert.assertNotNull(stmt.getConnection());
         Assert.assertTrue(stmt.unwrap(StubStatement.class) instanceof StubStatement);
         try {
            stmt.unwrap(TestProxies.class);
            Assert.fail();
         }
         catch (SQLException e) {
View Full Code Here

Examples of java.sql.ResultSet.unwrap()

            Assert.assertTrue(stmt.isWrapperFor(java.sql.PreparedStatement.class));
            Assert.assertNotNull(stmt.unwrap(java.sql.PreparedStatement.class));

            ResultSet rs = stmt.executeQuery();

            Assert.assertNotNull(rs.unwrap(oracle.jdbc.OracleResultSet.class));
            Assert.assertTrue(rs.isWrapperFor(oracle.jdbc.OracleResultSet.class));
           
            Assert.assertTrue(rs.isWrapperFor(DruidPooledResultSet.class));
            Assert.assertNotNull(rs.unwrap(DruidPooledResultSet.class));
           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.