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

The following examples show how to use org.apache.commons.lang.builder.ToStringBuilder. 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 check out the related API usage on the sidebar.
Example #1
Source File: Acknowledge.java    From freehealth-connector with GNU Affero General Public License v3.0 6 votes vote down vote up
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 File: BranchCondition.java    From lams with 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 #3
Source File: MergeRequestChangedLabels.java    From gitlab-plugin with GNU General Public License v2.0 5 votes vote down vote up
@Override
public String toString() {
    return new ToStringBuilder(this)
        .append("previous", previous)
        .append("current", current)
        .toString();
}
 
Example #4
Source File: GetHomeDataResponse.java    From openhab1-addons with Eclipse Public License 2.0 5 votes vote down vote up
@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 #5
Source File: Author.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
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 #6
Source File: LogicalPlan.java    From Bats with 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 #7
Source File: MergeRequestHook.java    From gitlab-plugin with GNU General Public License v2.0 5 votes vote down vote up
@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 #8
Source File: HbFactory.java    From tddl5 with 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 #9
Source File: MessageDelivery.java    From rice with 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 #10
Source File: IfsaFacade.java    From iaf with 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 #11
Source File: HmRemoteControlOptions.java    From openhab1-addons with Eclipse Public License 2.0 5 votes vote down vote up
@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 #12
Source File: GetHomeDataResponse.java    From openhab1-addons with Eclipse Public License 2.0 5 votes vote down vote up
@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 #13
Source File: RangeCalculator.java    From accumulo-recipes with 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 #14
Source File: MeasurementResponse.java    From openhab1-addons with Eclipse Public License 2.0 5 votes vote down vote up
@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 #15
Source File: KeyValueSet.java    From pentaho-kettle with 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 #16
Source File: StaffToStudentValidator.java    From secure-data-service with Apache License 2.0 5 votes vote down vote up
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 File: ScriptModuleLoaderTest.java    From Nicobar with 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 #18
Source File: DdlUtils.java    From DataLink with 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 #19
Source File: GetHomeDataResponse.java    From openhab1-addons with Eclipse Public License 2.0 5 votes vote down vote up
@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 #20
Source File: RecipientDelivererConfig.java    From rice with 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("recipientId", recipientId)
                                   .append("delivererName", delivererName)
                                   .append("channel", channel)
                                   .toString();
}
 
Example #21
Source File: SerialParameters.java    From openhab1-addons with 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 #22
Source File: JBossScriptModule.java    From Nicobar with 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 #23
Source File: Author.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
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 #24
Source File: LoginSession.java    From pxf with 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 #25
Source File: CriteriaIntegerValue.java    From rice with Educational Community License v2.0 4 votes vote down vote up
@Override
public String toString() {
    return ToStringBuilder.reflectionToString(this);
}
 
Example #26
Source File: DefaultUUIDModificationRequest.java    From datawave with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
    ToStringBuilder tsb = new ToStringBuilder(this);
    tsb.append("Events", events);
    return tsb.toString();
}
 
Example #27
Source File: Item.java    From microservice-consul with Apache License 2.0 4 votes vote down vote up
@Override
public String toString() {
	return ToStringBuilder.reflectionToString(this);
}
 
Example #28
Source File: DataSetVersion.java    From biolink-model with Creative Commons Zero v1.0 Universal 4 votes vote down vote up
@Override
public String toString() {
    return new ToStringBuilder(this).append("distribution", distribution).append("sourceDataFile", sourceDataFile).append("title", title).append("type", type).append("versionOf", versionOf).toString();
}
 
Example #29
Source File: PacketWithHeaderPacket.java    From canal with Apache License 2.0 4 votes vote down vote up
public String toString() {
    return ToStringBuilder.reflectionToString(this, CanalToStringStyle.DEFAULT_STYLE);
}
 
Example #30
Source File: PlayerStats.java    From ScoreboardStats with MIT License 4 votes vote down vote up
@Override
public String toString() {
    return ToStringBuilder.reflectionToString(this);
}