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

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

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

origin: ww20081120/framework

/**
 * Description: <br>
 * 
 * @author 王伟<br>
 * @taskId <br>
 * @param entityClass
 * @param propertyName
 * @param value
 * @return
 * @throws DaoException <br>
 */
@SuppressWarnings("unchecked")
@Override
public <T> List<T> findByProperty(Class<T> entityClass, String propertyName, Object value) throws DaoException {
  Assert.notEmpty(propertyName, ErrorCodeDef.DAO_PROPERTY_IS_EMPTY);
  return (List<T>) createCriteria(entityClass, Restrictions.eq(propertyName, value)).list();
}
origin: ww20081120/framework

/**
 * Description: <br>
 * 
 * @author 王伟<br>
 * @taskId <br>
 * @param entityClass
 * @param propertyName
 * @param value
 * @return
 * @throws DaoException <br>
 */
@SuppressWarnings("unchecked")
@Override
public <T> T findUniqueByProperty(Class<T> entityClass, String propertyName, Object value) throws DaoException {
  Assert.notEmpty(propertyName, ErrorCodeDef.DAO_PROPERTY_IS_EMPTY);
  return (T) createCriteria(entityClass, Restrictions.eq(propertyName, value)).uniqueResult();
}
origin: ww20081120/framework

private static Address[] getAddresses() {
  String address = PropertyHolder.getProperty(REDIS_ADDRESS);
  Assert.notEmpty(address, ErrorCodeDef.REDIS_ADDRESS_NOT_SET, REDIS_ADDRESS);
  return ProtocolUtil.parseAddress(address);
}
origin: ww20081120/framework

protected Address[] getAddresses() {
  String address = PropertyHolder.getProperty(REDIS_ADDRESS);
  Assert.notEmpty(address, ErrorCodeDef.REDIS_ADDRESS_NOT_SET, REDIS_ADDRESS);
  return ProtocolUtil.parseAddress(address);
}
origin: ww20081120/framework

/**
 * Description: <br>
 * 
 * @author 王伟<br>
 * @taskId <br>
 * @param ids
 * @throws DaoException <br>
 */
@Override
public <T> void deleteAllEntitiesByIds(Class<T> entityName, Collection<String> ids) throws DaoException {
  Assert.notEmpty(ids, ErrorCodeDef.ID_IS_NULL);
  for (String id : ids) {
    getSession().delete(get(entityName, id));
  }
  getSession().flush();
}
origin: ww20081120/framework

public static MessagePublisher createMessagePublisher() {
  if (messagePublisher == null) {
    String messageModel = PropertyHolder.getProperty("message.model");
    Assert.notEmpty(messageModel, ErrorCodeDef.MESSAGE_MODEL_NOT_SET);
    ServiceLoader<MessagePublisher> serviceLoader = ServiceLoader.load(MessagePublisher.class);
    for (MessagePublisher c : serviceLoader) {
      if (messageModel.equals(c.getName())) {
        messagePublisher = c;
        break;
      }
    }
    if (messagePublisher == null) {
      throw new InitializationException(ErrorCodeDef.MESSAGE_MIDDLE_NOT_FOUND);
    }
  }
  return messagePublisher;
}
origin: ww20081120/framework

public static ICache getCache() {
  if (cache == null) {
    String cacheModel = PropertyHolder.getProperty("cache.model");
    Assert.notEmpty(cacheModel, ErrorCodeDef.CACHE_MODEL_NOT_SET);
    ServiceLoader<ICache> serviceLoader = ServiceLoader.load(ICache.class);
    for (ICache c : serviceLoader) {
      if (cacheModel.equals(c.getName())) {
        cache = c;
        break;
      }
    }
    if (cache == null) {
      throw new InitializationException(ErrorCodeDef.CACHE_NOT_FOUND);
    }
  }
  return cache;
}
origin: ww20081120/framework

  public static MessageSubcriberFactory createMessageSubcriberFactory() {
    if (messageSubcriberFactory == null) {
      String messageModel = PropertyHolder.getProperty("message.model");
      Assert.notEmpty(messageModel, ErrorCodeDef.MESSAGE_MODEL_NOT_SET);

      ServiceLoader<MessageSubcriberFactory> serviceLoader = ServiceLoader.load(MessageSubcriberFactory.class);
      for (MessageSubcriberFactory c : serviceLoader) {
        if (messageModel.equals(c.getName())) {
          messageSubcriberFactory = c;
          break;
        }
      }

      if (messageSubcriberFactory == null) {
        throw new InitializationException(ErrorCodeDef.MESSAGE_MIDDLE_NOT_FOUND);
      }
    }
    return messageSubcriberFactory;
  }
}
origin: ww20081120/framework

public DbParam(String prefix) {
  this.url = PropertyHolder.getProperty(prefix + ".db.url");
  Assert.notEmpty(this.url, ErrorCodeDef.DB_URL_NOT_SET);
  this.username = PropertyHolder.getProperty(prefix + ".db.username");
  // Assert.notEmpty(this.username, ErrorCodeDef.DB_USERNAME_NOT_SET, prefix);
  String password = PropertyHolder.getProperty(prefix + ".db.password");
  // Assert.notEmpty(password, ErrorCodeDef.DB_PASSWORD_NOT_SET, prefix);
  setPassword(password);
  init(prefix);
}
com.hbasesoft.framework.common.utilsAssertnotEmpty

Javadoc

Description:

Popular methods of Assert

  • isTrue
  • notNull
    Description:
  • equals
  • isNull
    Description:
  • notEquals

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
  • findViewById (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Best IntelliJ plugins
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