Tabnine Logo
Assert.notNull
Code IndexAdd Tabnine to your IDE (free)

How to use
notNull
method
in
com.hbasesoft.framework.common.utils.Assert

Best Java code snippets using com.hbasesoft.framework.common.utils.Assert.notNull (Showing top 7 results out of 315)

origin: ww20081120/framework

/**
 * Description: <br>
 * 
 * @author 王伟<br>
 * @taskId <br>
 * @param class1
 * @param id
 * @return
 * @throws DaoException <br>
 */
@Override
public <T> T get(Class<T> entityClass, Serializable id) throws DaoException {
  Assert.notNull(id, ErrorCodeDef.ID_IS_NULL);
  return (T) getSession().get(entityClass, id);
}
origin: ww20081120/framework

/**
 * Description: <br>
 * 
 * @author 王伟<br>
 * @taskId <br>
 * @param entityName
 * @param id
 * @throws DaoException <br>
 */
@Override
public <T> void deleteEntityById(Class<T> entityName, Serializable id) throws DaoException {
  Assert.notNull(id, ErrorCodeDef.ID_IS_NULL);
  delete(get(entityName, id));
}
origin: ww20081120/framework

public static <T> T proxy(Class<T> clazz, CacheProxy cacheProxy) {
  if (Modifier.isAbstract(clazz.getModifiers())) {
    T target = null;
    if (StringUtils.isNotEmpty(cacheProxy.name())) {
      target = ContextHolder.getContext().getBean(cacheProxy.name(), clazz);
    }
    else {
      target = ContextHolder.getContext().getBean(clazz);
    }
    Assert.notNull(target, ErrorCodeDef.PROXY_TARGET_NOT_FOUND, clazz);
    CachePorxyInvocationHandler invocationHandler = new CachePorxyInvocationHandler(target, cacheProxy, clazz);
    @SuppressWarnings("unchecked")
    T proxyObj = (T) Proxy.newProxyInstance(clazz.getClassLoader(), clazz.isInterface() ? new Class[] {
      clazz
    } : clazz.getInterfaces(), invocationHandler);
    LoggerUtil.info("Success cache proxy clazz[{0}].", clazz);
    return proxyObj;
  }
  return null;
}
origin: ww20081120/framework

public static <T extends Serializable> int flowStart(T bean, String flowName, boolean throwable) {
  Assert.notNull(bean, ErrorCodeDef.NOT_NULL, "FlowBean");
  int result = ErrorCodeDef.SUCCESS;
  // match flow config
  FlowConfig config = match(flowName);
  Assert.notNull(config, ErrorCodeDef.FLOW_NOT_MATCH, bean);
  try {
    execute(bean, new FlowContext(config));
  }
  catch (Exception e) {
    LoggerUtil.error("flow process error.", e);
    FrameworkException fe = e instanceof FrameworkException ? (FrameworkException) e
      : new FrameworkException(e);
    if (throwable) {
      throw fe;
    }
    result = fe.getCode();
  }
  return result;
}
origin: ww20081120/framework

Assert.notNull(dataSource, ErrorCodeDef.DB_DATASOURCE_NOT_SET, dbCode);
origin: ww20081120/framework

if (StringUtils.isNotEmpty(component)) {
  FlowComponent flowComponent = ContextHolder.getContext().getBean(component, FlowComponent.class);
  Assert.notNull(flowComponent, ErrorCodeDef.FLOW_COMPONENT_NOT_FOUND, component);
  config.setComponent(flowComponent);
origin: ww20081120/framework

@SuppressWarnings("unchecked")
public static <T extends Serializable> void execute(T flowBean, FlowContext flowContext) throws Exception {
  FlowConfig flowConfig = flowContext.getFlowConfig();
  Assert.notNull(flowConfig, ErrorCodeDef.FLOW_COMPONENT_NOT_FOUND);
com.hbasesoft.framework.common.utilsAssertnotNull

Javadoc

Description:

Popular methods of Assert

  • notEmpty
    Description:
  • isTrue
  • equals
  • isNull
    Description:
  • notEquals

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • JLabel (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now