下面列出了怎么用org.apache.commons.lang.builder.ToStringBuilder的API类实例代码及写法,或者点击链接到github查看源代码。
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();
}
/**
* @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();
}
@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();
}
@Override
public String toString() {
return new ToStringBuilder(this)
.append("previous", previous)
.append("current", current)
.toString();
}
@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();
}
@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();
}
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();
}
@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();
}
@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();
}
/**
* @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();
}
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();
}
@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();
}
@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();
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
.append("scriptModuleSpec", scriptModuleSpec)
.append("createTime", createTime)
.toString();
}
@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();
}
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;
}
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;
}
/**
* @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();
}
@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();
}
@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();
}
@Override
public String toString() {
ToStringBuilder tsb = new ToStringBuilder(this);
tsb.append("fieldName", fieldName);
tsb.append("fieldValue", fieldValue);
tsb.append("ranges", ranges);
return tsb.toString();
}
@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();
}
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);
}
}
/**
* @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);
}
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
public String toString() {
return ToStringBuilder.reflectionToString(this, TddlToStringStyle.DEFAULT_STYLE);
}
@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();
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
@Override
public String toString() {
return new ToStringBuilder(this).append("activityId", getActivityId()).toString();
}