public String getPropertyIn(Collection<?> collection, String property) throws Exception {
    StringBuilder sb = new StringBuilder();
    if (null != collection) {
      for (Iterator<?> iter = collection.iterator(); iter.hasNext();) {
        Object one = iter.next();
        sb.append(extract(one, property)).append(",");
      }
    }
    // 删除逗号
    if (sb.length() > 0) {
      sb.deleteCharAt(sb.length() - 1);
    }
    return sb.toString();
  }
public String getPropertyIn ( Collection < ? > collection , String property ) throws Exception { StringBuilder sb = new StringBuilder ( ) ; if ( null != collection ) { for ( Iterator < ? > iter = collection . iterator ( ) ; iter . hasNext ( ) ; ) { Object one = iter . next ( ) ; sb . append ( extract ( one , property ) ) . append ( "," ) ; } } if ( sb . length ( ) > 0 ) { sb . deleteCharAt ( sb . length ( ) - 1 ) ; } return sb . toString ( ) ; }
<p>
getPropertyIn.
</p>

@param collection a {@link java.util.Collection} object.
@param property a {@link java.lang.String} object.
@return a {@link java.lang.String} object.
@throws java.lang.Exception if any.