code: public static List<Condition> extractConditions(String alias, final Entity<?> entity) {
      if (null == entity) { return Collections.emptyList(); }
      final List<Condition> conditions = new ArrayList<Condition>();
  
      StringBuilder aliasBuilder = new StringBuilder(alias == null ? "" : alias);
      if (aliasBuilder.length() > 0 && !alias.endsWith(".")) aliasBuilder.append(".");
      alias = aliasBuilder.toString();
      String attr = "";
      try {
        final Set<String> props = PropertyUtils.getWritableProperties(entity.getClass());
        for (final Iterator<String> iter = props.iterator(); iter.hasNext();) {
          attr = iter.next();
          final Object value = PropertyUtils.getProperty(entity, attr);
          if (null == value) continue;
          if (!(value instanceof Collection<?>)) addAttrCondition(conditions, alias + attr, value);
        }
      } catch (Exception e) {
        logger.debug("error occur in extractConditions for  bean {} with attr named {}", entity, attr);
      }
      return conditions;
    }
docs: 提取对象中的条件<br>
  提取的属性仅限"平面"属性(允许包括component)<br>
  过滤掉属性:null,或者空Collection
  
  @param alias
  @param entity