Java Code Examples for org.apache.commons.lang.builder.ToStringBuilder

The following examples show how to use org.apache.commons.lang.builder.ToStringBuilder. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
public String toString() {
   ToStringBuilder builder = new ToStringBuilder(this);
   builder.append("Complete? : " + this.isComplete);
   if (this.listOfErrors != null) {
      Iterator it = this.listOfErrors.iterator();

      while(it.hasNext()) {
         TherapeuticLinkResponseError next = (TherapeuticLinkResponseError)it.next();
         builder.append("[");
         builder.append("Error code : " + next.getErrorCode());
         builder.append("ErrorDescription : " + next.getErrorDescription());
         builder.append("]");
         if (it.hasNext()) {
            builder.append(", ");
         }
      }
   }

   return builder.toString();
}
 
Example 2
Source Project: rice   Source File: MessageDelivery.java    License: Educational Community License v2.0 5 votes vote down vote up
/**
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
    return new ToStringBuilder(this)
                   .append("id", id)
                   .append("deliveryStatus", deliveryStatus)
                   .append("processCount", processCount)
                   .append("delivererTypename", delivererTypeName)
                   .append("delivererSystemId", delivererSystemId)
                   .append("message", message == null ? null : message.getId())
                   .toString();
}
 
Example 3
@Override
public String toString() {
    final ToStringBuilder builder = createToStringBuilder();
    builder.appendSuper(super.toString());
    builder.append("id", this.id);
    builder.append("version", this.version);
    builder.append("key", this.key);

    return builder.toString();
}
 
Example 4
@Override
public String toString() {
    return new ToStringBuilder(this)
        .append("previous", previous)
        .append("current", current)
        .toString();
}
 
Example 5
Source Project: Bats   Source File: LogicalPlan.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public String toString()
{
  return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
      .append("operators", this.operators)
      .append("streams", this.streams)
      .append("properties", this.attributes)
      .toString();
}
 
Example 6
@Override
public String toString() {
    return new ToStringBuilder(this)
            .append("user", user)
            .append("assignee", assignee)
            .append("project", project)
            .append("objectAttributes", objectAttributes)
            .append("labels", labels)
            .append("changes", changes)
            .toString();
}
 
Example 7
public String toString() {
   ToStringBuilder builder = new ToStringBuilder(this);
   Iterator it = this.hcParties.iterator();

   while(it.hasNext()) {
      HcParty next = (HcParty)it.next();
      builder.append("[");
      builder.append("Family name : " + next.getFamilyName());
      builder.append("First Name: " + next.getFirstName());
      builder.append("Name: " + next.getName());
      builder.append("Type: " + next.getType());
      builder.append("ids : [");
      Iterator i$ = next.getIds().iterator();

      while(i$.hasNext()) {
         IDHCPARTY idHcParty = (IDHCPARTY)i$.next();
         builder.append("idHcParty:scheme=").append(idHcParty.getS());
         builder.append(", value=").append(idHcParty.getValue());
      }

      builder.append("] ");
      builder.append("cds : [");
      i$ = next.getCds().iterator();

      while(i$.hasNext()) {
         CDHCPARTY cdHcParty = (CDHCPARTY)i$.next();
         builder.append("cdHcParty:scheme=").append(cdHcParty.getS());
         builder.append(", value=").append(cdHcParty.getValue());
      }

      builder.append("]");
      builder.append("]");
      if (it.hasNext()) {
         builder.append(", ");
      }
   }

   return builder.toString();
}
 
Example 8
@Override
public String toString() {
    final ToStringBuilder builder = createToStringBuilder();
    builder.appendSuper(super.toString());
    builder.append("country", this.country);
    builder.append("timezone", this.timezone);

    return builder.toString();
}
 
Example 9
Source Project: pxf   Source File: LoginSession.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
            .append("config", configDirectory)
            .append("principal", principalName)
            .append("keytab", keytabPath)
            .append("kerberosMinMillisBeforeRelogin", kerberosMinMillisBeforeRelogin)
            .toString();
}
 
Example 10
Source Project: pentaho-kettle   Source File: KeyValueSet.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * @return string representation.
 */
public String toMultiLineString() {
  final ToStringBuilder builder = new ToStringBuilder( this, ToStringStyle.MULTI_LINE_STYLE );
  for ( KeyValue<?> keyValue : this.entries.values() ) {
    builder.append( keyValue.getKey(), keyValue.getValue() );
  }
  return builder.toString();
}
 
Example 11
public String toString() {
   ToStringBuilder builder = new ToStringBuilder(this);
   Iterator it = this.hcParties.iterator();

   while(it.hasNext()) {
      HcParty next = (HcParty)it.next();
      builder.append("[");
      builder.append("Family name : " + next.getFamilyName());
      builder.append("First Name: " + next.getFirstName());
      builder.append("Name: " + next.getName());
      builder.append("Type: " + next.getType());
      builder.append("ids : [");
      Iterator i$ = next.getIds().iterator();

      while(i$.hasNext()) {
         IDHCPARTY idHcParty = (IDHCPARTY)i$.next();
         builder.append("idHcParty:scheme=").append(idHcParty.getS());
         builder.append(", value=").append(idHcParty.getValue());
      }

      builder.append("] ");
      builder.append("cds : [");
      i$ = next.getCds().iterator();

      while(i$.hasNext()) {
         CDHCPARTY cdHcParty = (CDHCPARTY)i$.next();
         builder.append("cdHcParty:scheme=").append(cdHcParty.getS());
         builder.append(", value=").append(cdHcParty.getValue());
      }

      builder.append("]");
      builder.append("]");
      if (it.hasNext()) {
         builder.append(", ");
      }
   }

   return builder.toString();
}
 
Example 12
Source Project: Nicobar   Source File: JBossScriptModule.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
        .append("moduleId", moduleId)
        .append("jbossModule", jbossModule)
        .append("createTime", createTime)
        .append("sourceArchive", sourceArchive)
        .toString();
}
 
Example 13
@Override
public String toString() {
    final ToStringBuilder builder = createToStringBuilder();
    builder.appendSuper(super.toString());
    builder.append("reg_locale", this.reg_locale);
    builder.append("reg_locale", this.reg_locale);

    return builder.toString();
}
 
Example 14
Source Project: Nicobar   Source File: ScriptModuleLoaderTest.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
        .append("scriptModuleSpec", scriptModuleSpec)
        .append("createTime", createTime)
        .toString();
}
 
Example 15
Source Project: lams   Source File: BranchCondition.java    License: GNU General Public License v2.0 5 votes vote down vote up
@Override
   public String toString() {
return new ToStringBuilder(this).append("conditionId", conditionId).append("conditionUIID", conditionUIID)
	.append("orderId", orderId).append("name", name).append("displayName", displayName).append("type", type)
	.append("startValue", startValue).append("endValue", endValue)
	.append("exactMatchValue", exactMatchValue).toString();
   }
 
Example 16
private Set<String> validateStaffToStudentContextThroughSharedEducationOrganization(Collection<String> ids) {
    LOG.trace(">>>StaffToStudentValidator.validateStaffToStudentContextThroughSharedEducationOrganization()");
    LOG.debug("  ids: {}", (ids==null) ? "null" : ToStringBuilder.reflectionToString(ids, ToStringStyle.DEFAULT_STYLE));

    // lookup current staff edOrg associations and get the Ed Org Ids
    Set<String> staffsEdOrgIds = getStaffCurrentAssociatedEdOrgs();

    // lookup students
    Iterable<Entity> students = getStudentEntitiesFromIds(ids);

    Set<String> validIds = new HashSet<String>();

    if (students != null && students.iterator().hasNext()) {

        LOG.debug("  Iterating on each student entity.");

        for (Entity entity : students) {
            LOG.debug("  student: " + ToStringBuilder.reflectionToString(entity, ToStringStyle.DEFAULT_STYLE));

            Set<String> studentsEdOrgs = getStudentsEdOrgs(entity);
            Set<String> validPrograms = programValidator.validate(EntityNames.PROGRAM, getValidPrograms(entity));
            Set<String> validCohorts = cohortValidator.validate(EntityNames.COHORT, getValidCohorts(entity));

            LOG.debug("  # studentsEdOrgs: {}", (studentsEdOrgs==null) ? "null" : studentsEdOrgs.size() );
            LOG.debug("  # validPrograms: {}", (validPrograms==null) ? "null" : validPrograms.size() );
            LOG.debug("  # validCohorts: {}", (validCohorts==null) ? "null" : validCohorts.size() );

            boolean hasStaffStudentIntersection = isIntersection(staffsEdOrgIds, studentsEdOrgs);
            LOG.debug("   hasStaffStudentIntersection = " + hasStaffStudentIntersection);

            if ((hasStaffStudentIntersection || !validPrograms.isEmpty() || !validCohorts.isEmpty())) {
                validIds.add(entity.getEntityId());
            }
        }
    }

    return validIds;
}
 
Example 17
Source Project: DataLink   Source File: DdlUtils.java    License: Apache License 2.0 5 votes vote down vote up
private static Table generateTable(DatabaseMetaDataWrapper metaData, Map<String, Object> values) throws SQLException {
    String tableName = (String) values.get("TABLE_NAME");
    Table table = null;

    if ((tableName != null) && (tableName.length() > 0)) {
        table = new Table();
        table.setName(tableName);
        table.setType((String) values.get("TABLE_TYPE"));
        table.setCatalog((String) values.get("TABLE_CAT"));
        table.setSchema((String) values.get("TABLE_SCHEM"));
        table.setDescription((String) values.get("REMARKS"));
        table.addColumns(generateColumns(metaData, tableName));
        table.addIndices(generateIndices(metaData, tableName));

        Collection<String> primaryKeys = readPrimaryKeyNames(metaData, tableName);

        for (Object key : primaryKeys) {
            Column col = table.findColumn((String) key, true);

            if (col != null) {
                col.setPrimaryKey(true);
            } else {
                throw new NullPointerException(String.format("%s pk %s is null - %s %s",
                        tableName,
                        key,
                        ToStringBuilder.reflectionToString(metaData, ToStringStyle.SIMPLE_STYLE),
                        ToStringBuilder.reflectionToString(values, ToStringStyle.SIMPLE_STYLE)));
            }
        }
    }

    return table;
}
 
Example 18
/**
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
   return new ToStringBuilder(this).append("id", id)
                                   .append("recipientId", recipientId)
                                   .append("delivererName", delivererName)
                                   .append("channel", channel)
                                   .toString();
}
 
Example 19
Source Project: openhab1-addons   Source File: SerialParameters.java    License: Eclipse Public License 2.0 5 votes vote down vote up
@Override
public String toString() {
    return new ToStringBuilder(this, toStringStyle).append("portName", m_PortName).append("baudRate", m_BaudRate)
            .append("flowControlIn", getFlowControlInString()).append("flowControlOut", getFlowControlOutString())
            .append("databits", getDatabitsString()).append("stopbits", getStopbitsString())
            .append("parity", getParityString()).append("encoding", m_Encoding).append("echo", m_Echo)
            .append("receiveTimeoutMillis", m_ReceiveTimeoutMillis).toString();
}
 
Example 20
@Override
public String toString() {
    final ToStringBuilder builder = createToStringBuilder();
    builder.appendSuper(super.toString());
    builder.append("status", this.status);
    builder.append("body", this.body);

    return builder.toString();
}
 
Example 21
Source Project: accumulo-recipes   Source File: RangeCalculator.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public String toString() {
    ToStringBuilder tsb = new ToStringBuilder(this);
    tsb.append("fieldName", fieldName);
    tsb.append("fieldValue", fieldValue);
    tsb.append("ranges", ranges);
    return tsb.toString();
}
 
Example 22
@Override
public String toString() {
    ToStringBuilder tsb = new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE);
    tsb.append("text", text).append("beep", beep).append("backlight", backlight).append("unit", unit)
            .append("symbols", symbols);
    return tsb.toString();
}
 
Example 23
Source Project: iaf   Source File: IfsaFacade.java    License: Apache License 2.0 5 votes vote down vote up
protected QueueSender createSender(QueueSession session, Queue queue)
    throws IfsaException {

    try {
        QueueSender queueSender = session.createSender(queue);
        if (log.isDebugEnabled()) {
            log.debug(getLogPrefix()+ "got queueSender ["
                            + ToStringBuilder.reflectionToString((IFSAQueueSender) queueSender)+ "]");
        }
        return queueSender;
    } catch (Exception e) {
        throw new IfsaException(e);
    }
}
 
Example 24
Source Project: tddl5   Source File: HbFactory.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * @param cluster
 * @param tableName
 * @return
 */
public HTableInterface getHtable(String tableName) {
    try {
        return tablePool.getTable(tableName);
    } catch (Exception e) {
        throw new TddlNestableRuntimeException("get htable admin fail with htable(" + tableName + "),cluster("
                                               + clusterName + "),configuration("
                                               + ToStringBuilder.reflectionToString(conficuration) + ")", e);
    }
}
 
Example 25
@Override
public String toString() {
  return ToStringBuilder.reflectionToString(this);
}
 
Example 26
Source Project: tddl   Source File: TableIndexStat.java    License: Apache License 2.0 4 votes vote down vote up
public String toString() {
    return ToStringBuilder.reflectionToString(this, TddlToStringStyle.DEFAULT_STYLE);
}
 
Example 27
Source Project: biolink-model   Source File: Attribute.java    License: Creative Commons Zero v1.0 Universal 4 votes vote down vote up
@Override
public String toString() {
    return new ToStringBuilder(this).append("category", category).append("description", description).append("fullName", fullName).append("hasAttributeType", hasAttributeType).append("hasQualitativeValue", hasQualitativeValue).append("hasQuantitativeValue", hasQuantitativeValue).append("id", id).append("interactsWith", interactsWith).append("iri", iri).append("name", name).append("nodeProperty", nodeProperty).append("relatedTo", relatedTo).append("subclassOf", subclassOf).append("synonym", synonym).append("systematicSynonym", systematicSynonym).toString();
}
 
Example 28
Source Project: microservice-kafka   Source File: Item.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
	return ToStringBuilder.reflectionToString(this);
}
 
Example 29
Source Project: iaf   Source File: JobDef.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
	return ToStringBuilder.reflectionToString(this);
}
 
Example 30
Source Project: lams   Source File: ParallelActivity.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
   public String toString() {
return new ToStringBuilder(this).append("activityId", getActivityId()).toString();
   }