Example usage for org.apache.commons.lang.builder ToStringStyle DEFAULT_STYLE

List of usage examples for org.apache.commons.lang.builder ToStringStyle DEFAULT_STYLE

Introduction

In this page you can find the example usage for org.apache.commons.lang.builder ToStringStyle DEFAULT_STYLE.

Prototype

ToStringStyle DEFAULT_STYLE

To view the source code for org.apache.commons.lang.builder ToStringStyle DEFAULT_STYLE.

Click Source Link

Document

The default toString style.

Usage

From source file:com.photon.phresco.commons.model.Customer.java

public String toString() {
    return new ToStringBuilder(this, ToStringStyle.DEFAULT_STYLE).append(super.toString())
            .append("emailId", emailId).append("address", address).append("country", country)
            .append("state", state).append("zipcode", zipcode).append("contactNumber", contactNumber)
            .append("fax", fax).append("validFrom", validFrom).append("validUpto", validUpto)
            .append("type", type).append("repoInfo", repoInfo)
            .append("applicableTechnologies", applicableTechnologies)
            .append("applicableAppTypes", applicableAppTypes).append("options", options)
            .append("context", context).append("uiType", uiType).append("supportEmail", supportEmail)
            .append("supportPassword", supportPassword).append("supportSmtpHost", supportSmtpHost).toString();
}

From source file:com.photon.phresco.commons.model.ApplicationInfo.java

public String toString() {
    return new ToStringBuilder(this, ToStringStyle.DEFAULT_STYLE).append(super.toString())
            .append("code", getCode()).append("appDirName", getAppDirName()).append("techInfo", getTechInfo())
            .append("pilotInfo", getPilotInfo()).append("emailSupported", isEmailSupported())
            .append("selectedModules", getSelectedModules()).append("selectedJSLibs", getSelectedJSLibs())
            .append("selectedFrameworks", getSelectedFrameworks())
            .append("selectedComponents", getSelectedComponents())
            .append("selectedServers", getSelectedServers()).append("selectedDatabases", getSelectedDatabases())
            .append("selectedWebservices", getSelectedWebservices()).append("version", getVersion())
            .append("phoneEnabled", isPhoneEnabled()).append("tabletEnabled", isTabletEnabled())
            .append("pilot", isPilot()).append("embedAppId", getEmbedAppId())
            .append("functionalFramework", getFunctionalFramework())
            .append("dependentModules", getDependentModules()).append("phrescoPomFile", getPhrescoPomFile())
            .append("pomFile", getPomFile()).append("rootModule", getRootModule())
            .append("modules", getModules()).toString();
}

From source file:com.gisgraphy.model.User.java

/**
 * {@inheritDoc}//  w w  w .  j  a  v a 2s.  co  m
 */
@Override
public String toString() {
    ToStringBuilder sb = new ToStringBuilder(this, ToStringStyle.DEFAULT_STYLE)
            .append("username", this.username).append("enabled", this.enabled)
            .append("accountExpired", this.accountExpired).append("credentialsExpired", this.credentialsExpired)
            .append("accountLocked", this.accountLocked);

    GrantedAuthority[] auths = this.getAuthorities();
    if (auths != null) {
        sb.append("Granted Authorities: ");

        for (int i = 0; i < auths.length; i++) {
            if (i > 0) {
                sb.append(", ");
            }
            sb.append(auths[i].toString());
        }
    } else {
        sb.append("No Granted Authorities");
    }
    return sb.toString();
}

From source file:com.klwork.common.utils.ReflectionUtils.java

/**
 * ??//from  w  w  w . j a  v  a2s  .c  om
 * 
 * @param object
 * @return
 */
public static String toString(Object object) {
    return new ReflectionToStringBuilder(object, ToStringStyle.DEFAULT_STYLE).toString();
}

From source file:com.vmware.appfactory.workpool.dto.JsonWorkpoolRequest.java

@Override
public String toString() {
    return new ReflectionToStringBuilder(this, ToStringStyle.DEFAULT_STYLE)
            .setExcludeFieldNames(new String[] { "licenseKey" }).toString();
}

From source file:com.impetus.ankush.common.domain.User.java

/**
 * {@inheritDoc}/*from  ww w.  j a va 2s .  co m*/
 */
@Override
public String toString() {
    ToStringBuilder sb = new ToStringBuilder(this.id, ToStringStyle.DEFAULT_STYLE).append("id", this.id)
            .append("username", this.username).append("enabled", this.enabled)
            .append("accountExpired", this.accountExpired).append("credentialsExpired", this.credentialsExpired)
            .append("accountLocked", this.accountLocked);

    if (roles != null) {
        sb.append("Granted Authorities: ");

        int i = 0;
        for (Role role : roles) {
            if (i > 0) {
                sb.append(", ");
            }
            sb.append(role.toString());
            i++;
        }
    } else {
        sb.append("No Granted Authorities");
    }
    return sb.toString();
}

From source file:com.zhjy.external.model.original.JyBidderInfoAbstract.java

public String toString() {
    ToStringBuilder sb = new ToStringBuilder(this, ToStringStyle.DEFAULT_STYLE);
    sb.append("id", this.id).append("tradingCardID", this.tradingCardID).append("name", this.name)
            .append("legalName", this.legalName).append("legalNameID", this.legalNameID)
            .append("contactName", this.contactName).append("cell", this.cell)
            .append("incorporation", this.incorporation).append("incorCell", this.incorCell)
            .append("authorities", this.authorities).append("ccAdress", this.ccAdress)
            .append("ccCell", this.ccCell).append("ccHeader", this.ccHeader).append("post", this.post)
            .append("headCell", this.headCell).append("refCapital", this.refCapital)
            .append("licenseID", this.licenseID).append("orgCodeID", this.orgCodeID)
            .append("safetyPermits", this.safetyPermits).append("bank", this.bank)
            .append("bankAccount", this.bankAccount).append("bankAccount2", this.bankAccount2)
            .append("unitType", this.unitType);

    return sb.toString();
}

From source file:io.reign.zk.ResilientZkClient.java

@Override
public void process(final WatchedEvent event) {
    /***** log event *****/
    // log if TRACE
    if (logger.isTraceEnabled()) {
        logger.trace("***** Received ZooKeeper Event:  {}",
                ReflectionToStringBuilder.toString(event, ToStringStyle.DEFAULT_STYLE));

    }/*from   w w  w .ja v  a  2 s.  c  o m*/

    /***** pass notifications on to registered Watchers *****/
    // if (event.getType() != EventType.None) {
    if (shutdown) {
        logger.warn("Already shutdown:  not passing event to registered watchers:  type={}; path={}",
                event.getType(), event.getPath());
        return;
    } else {
        for (Watcher watcher : watcherSet) {
            watcher.process(event);
        }
    }
    // }

    /***** process events *****/
    switch (event.getType()) {
    case NodeChildrenChanged:
        this.childWatchesMap.remove(event.getPath());
        break;
    case NodeCreated:
    case NodeDataChanged:
    case NodeDeleted:
        this.dataWatchesMap.remove(event.getPath());
        break;
    case None:
        Event.KeeperState eventState = event.getState();
        if (eventState == Event.KeeperState.SyncConnected) {

            // this.connected = true;

            if (currentSessionId == null) {
                if (logger.isInfoEnabled()) {
                    logger.info(
                            "Restoring watches as necessary:  sessionId={}; connectString={}; sessionTimeout={}",
                            new Object[] { this.zooKeeper.getSessionId(), getConnectString(),
                                    getSessionTimeout() });
                }
                restoreWatches();
            }

            this.currentSessionId = this.zooKeeper.getSessionId();
            this.sessionPassword = this.zooKeeper.getSessionPasswd();

            logger.info("SyncConnected:  notifying all waiters:  currentSessionId={}; connectString={}",
                    currentSessionId, getConnectString());
            synchronized (this) {
                // notify waiting threads that connection has been
                // established
                this.notifyAll();
            }
            logger.info("SyncConnected:  notified all waiters:  currentSessionId={}; connectString={}",
                    currentSessionId, getConnectString());

        } else if (eventState == Event.KeeperState.Disconnected) {
            // this.connected = false;

        } else if (eventState == Event.KeeperState.Expired) {
            // expired session; close ZK connection and reconnect
            if (!this.shutdown) {
                // if session has been expired, clear out the existing ID
                logger.info(
                        "Session has been expired by ZooKeeper cluster:  reconnecting to establish new session:  oldSessionId={}; connectString={}",
                        currentSessionId, getConnectString());

                // null out current session ID
                this.currentSessionId = null;

                // do connection in another thread so as to not block the ZK event thread
                spawnReconnectThread();
            }

        } else {
            logger.warn("Unhandled state:  eventType=" + event.getType() + "; eventState=" + eventState);
        }
        break;
    default:
        logger.warn("Unhandled event type:  eventType=" + event.getType() + "; eventState=" + event.getState());
    }

}

From source file:com.redhat.rhn.domain.server.Server.java

/**
 * {@inheritDoc}/*from w w w  .j a  va 2s.  c  om*/
 */
@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.DEFAULT_STYLE).append("id", id).append("org", org)
            .append("name", name).append("description", description).toString();
}

From source file:nl.knaw.huygens.timbuctoo.model.RelationType.java

@Override
public String toString() {
    return ToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE, false);
}