org.teiid.core.util.Assertion.isNull()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(140)

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

Assertion.isNull介绍

暂无

代码示例

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

/**
 * This method transforms a value of the source type into a value
 * of the target type.
 * @param value Incoming value - Integer
 * @return Outgoing value - String
 * @throws TransformationException if value is an incorrect input type or
 * the transformation fails
 */
public Object transformDirect(Object value) throws TransformationException {
  Assertion.isNull(value);
  return null;
}

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

/**
 * This method transforms a value of the source type into a value
 * of the target type.
 * @param value Incoming value - Integer
 * @return Outgoing value - String
 * @throws TransformationException if value is an incorrect input type or
 * the transformation fails
 */
public Object transformDirect(Object value) throws TransformationException {
  Assertion.isNull(value);
  return null;
}

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

synchronized void setResultsReceiver(ResultsReceiver<LobChunk> resultsReceiver) {
  Assertion.isNull(this.resultsReceiver, "Cannot request results with a pending request"); //$NON-NLS-1$
  this.resultsReceiver = resultsReceiver;
}

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

public static final void isNull(Object value) {
  isNull(value,null);
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

synchronized void setResultsReceiver(ResultsReceiver<LobChunk> resultsReceiver) {
  Assertion.isNull(this.resultsReceiver, "Cannot request results with a pending request"); //$NON-NLS-1$
  this.resultsReceiver = resultsReceiver;
}

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

synchronized void setResultsReceiver(ResultsReceiver<LobChunk> resultsReceiver) {
  Assertion.isNull(this.resultsReceiver, "Cannot request results with a pending request"); //$NON-NLS-1$
  this.resultsReceiver = resultsReceiver;
}

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

public static final void isNull(Object value) {
  isNull(value,null);
}

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

public void testIsNullObjectString() {
  Assertion.isNull(null,TEST_MESSAGE);
  try {
    Assertion.isNull("",TEST_MESSAGE); //$NON-NLS-1$
    fail();
  } catch ( AssertionError e ) {
    // expected, but check the message
    assertEquals(TEST_MESSAGE, e.getMessage());
  }
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

public ConnectorWork registerRequest(AtomicRequestMessage message) throws TeiidComponentException {
  checkStatus();
  AtomicRequestID atomicRequestId = message.getAtomicRequestID();
  LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {atomicRequestId, "Create State"}); //$NON-NLS-1$
  final ConnectorWorkItem item = new ConnectorWorkItem(message, this);
  ConnectorWork proxy = (ConnectorWork) Proxy.newProxyInstance(ConnectorWork.class.getClassLoader(),
      new Class[] { ConnectorWork.class }, new InvocationHandler() {
        @Override
        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
          ClassLoader originalCL = Thread.currentThread().getContextClassLoader();
          try {
            Thread.currentThread().setContextClassLoader(getExecutionFactory().getClass().getClassLoader());
            return method.invoke(item, args);
          } catch (InvocationTargetException e) {
            throw e.getTargetException();
          } finally {
            Thread.currentThread().setContextClassLoader(originalCL);
          }
        }
      });
  
  Assertion.isNull(requestStates.put(atomicRequestId, proxy), "State already existed"); //$NON-NLS-1$
  return proxy;
}

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

public ConnectorWork registerRequest(AtomicRequestMessage message) throws TeiidComponentException {
  checkStatus();
  AtomicRequestID atomicRequestId = message.getAtomicRequestID();
  LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {atomicRequestId, "Create State"}); //$NON-NLS-1$
  final ConnectorWorkItem item = new ConnectorWorkItem(message, this);
  ConnectorWork proxy = (ConnectorWork) Proxy.newProxyInstance(ConnectorWork.class.getClassLoader(),
      new Class[] { ConnectorWork.class }, new InvocationHandler() {
        @Override
        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
          ClassLoader originalCL = Thread.currentThread().getContextClassLoader();
          try {
            Thread.currentThread().setContextClassLoader(getExecutionFactory().getClass().getClassLoader());
            return method.invoke(item, args);
          } catch (InvocationTargetException e) {
            throw e.getTargetException();
          } finally {
            Thread.currentThread().setContextClassLoader(originalCL);
          }
        }
      });
  
  Assertion.isNull(requestStates.put(atomicRequestId, proxy), "State already existed"); //$NON-NLS-1$
  return proxy;
}

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

public ConnectorWork registerRequest(AtomicRequestMessage message) throws TeiidComponentException {
  checkStatus();
  AtomicRequestID atomicRequestId = message.getAtomicRequestID();
  LogManager.logDetail(LogConstants.CTX_CONNECTOR, new Object[] {atomicRequestId, "Create State"}); //$NON-NLS-1$
  final ConnectorWorkItem item = new ConnectorWorkItem(message, this);
  ConnectorWork proxy = (ConnectorWork) Proxy.newProxyInstance(ConnectorWork.class.getClassLoader(),
      new Class[] { ConnectorWork.class }, new InvocationHandler() {
        @Override
        public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
          ClassLoader originalCL = Thread.currentThread().getContextClassLoader();
          try {
            Thread.currentThread().setContextClassLoader(getExecutionFactory().getClass().getClassLoader());
            return method.invoke(item, args);
          } catch (InvocationTargetException e) {
            throw e.getTargetException();
          } finally {
            Thread.currentThread().setContextClassLoader(originalCL);
          }
        }
      });
  
  Assertion.isNull(requestStates.put(atomicRequestId, proxy), "State already existed"); //$NON-NLS-1$
  return proxy;
}

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

public DataTierTupleSource(AtomicRequestMessage aqr, RequestWorkItem workItem, ConnectorWork cwi, DataTierManagerImpl dtm, int limit) {
  this.aqr = aqr;
  this.workItem = workItem;
  this.cwi = cwi;
  this.dtm = dtm;
  this.limit = limit;
  Assertion.isNull(workItem.getConnectorRequest(aqr.getAtomicRequestID()));
  workItem.addConnectorRequest(aqr.getAtomicRequestID(), this);
}

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

public DataTierTupleSource(AtomicRequestMessage aqr, RequestWorkItem workItem, ConnectorWork cwi, DataTierManagerImpl dtm, int limit) {
  this.aqr = aqr;
  this.workItem = workItem;
  this.cwi = cwi;
  this.dtm = dtm;
  this.limit = limit;
  Assertion.isNull(workItem.getConnectorRequest(aqr.getAtomicRequestID()));
  workItem.addConnectorRequest(aqr.getAtomicRequestID(), this);
}

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

public void testIsNullObject() {
  Assertion.isNull(null);
  try {
    Assertion.isNull(""); //$NON-NLS-1$
    fail();
  } catch ( AssertionError e ) {
    // expected, but check the message
    final String msg = CorePlugin.Util.getString("Assertion.isNull"); //$NON-NLS-1$
    assertEquals(msg, e.getMessage());
  }
}

代码示例来源:origin: org.jboss.teiid/teiid-engine

public DataTierTupleSource(AtomicRequestMessage aqr, RequestWorkItem workItem, ConnectorWork cwi, DataTierManagerImpl dtm, int limit) {
  this.aqr = aqr;
  this.workItem = workItem;
  this.cwi = cwi;
  this.dtm = dtm;
  this.limit = limit;
  Assertion.isNull(workItem.getConnectorRequest(aqr.getAtomicRequestID()));
  workItem.addConnectorRequest(aqr.getAtomicRequestID(), this);
}

相关文章