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

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

Introduction

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

Prototype

ToStringStyle MULTI_LINE_STYLE

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

Click Source Link

Document

The multi line toString style.

Usage

From source file:org.hippoecm.frontend.plugins.reporting.ReportModel.java

@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("reportNode", nodeModel.toString())
            .toString();//ww  w  . j ava 2 s  .com
}

From source file:org.hippoecm.frontend.plugins.standards.ClassResourceModel.java

@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("class", clazz.getName())
            .append("key", key).append("locale", locale).append("style", style).toString();
}

From source file:org.intellij.plugins.junit.ClassPattern.java

public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("tested", testedClassPattern)
            .append("test", testClassPattern).toString();
}

From source file:org.jahia.services.search.AbstractHit.java

@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("type", this.getType())
            .append("title", this.getTitle()).append("link", this.getLink()).append("score", this.getScore())
            .append("contentType", this.getContentType()).append("created", this.getCreated())
            .append("createdBy", this.getCreatedBy()).append("lastModified", this.getLastModified())
            .append("lastModifiedBy", this.getLastModifiedBy())
            .append("lastModifiedBy", this.getLastModifiedBy()).toString();
}

From source file:org.jahia.services.usermanager.BaseJahiaExternalUser.java

@Override
public String toString() {
    return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("username", username)
            .append("userKey", userKey).append("provider", providerKey).append("localPath", getLocalPath())
            .append("externalProperties", externalProperties).toString();
}

From source file:org.jbuilt.components.html.raw.base.AbstractCommandComponent.java

/**
 * Generic reflection-based toString./*  ww w.j  a  v  a2 s  .  com*/
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
    // TODO: change to not use reflection toString
    if (LOG.isWarnEnabled()) {
        //        LOG.warn("Remember to over-ride toString " + ClassUtils.getShortClassName(getClass()) + "!");
    }
    return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
}

From source file:org.jbuilt.components.html.raw.base.AbstractComponent.java

/**
 * Generic reflection-based toString.//from ww w  .j a  v a2 s.  c o  m
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
    // TODO: change to not use reflection toString
    if (LOG.isWarnEnabled()) {
        //          LOG.warn("Remember to over-ride toString " + ClassUtils.getShortClassName(getClass()) + "!");
    }
    return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
}

From source file:org.jbuilt.components.html.raw.base.AbstractFormComponent.java

/**
 * Generic reflection-based toString./* w w w.j  a  va 2 s .  c  o  m*/
 * 
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
    // TODO: change to not use reflection toString
    if (LOG.isWarnEnabled()) {
        // LOG.warn("Remember to over-ride toString " +
        // ClassUtils.getShortClassName(getClass()) + "!");
    }
    return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
}

From source file:org.jbuilt.utils.ClassClassMapEntry.java

/**
 * Generic reflection-based toString.//w w w .j  a v  a2 s .  c om
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
    // TODO: change to not use reflection toString
    if (LOG.isWarnEnabled()) {
        //LOG.warn("Remember to over-ride toString " + ClassUtils.getShortClassName(getClass()) + "!");
    }
    return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
}

From source file:org.jobjects.dao.annotation.Manager.java

/**
 * Persistance du bean annot avec DaoTable ainsi que DaoField. Si pour une
 * raison quelconque une problme survient, l'exception CreateException sera
 * leve.//from w  w  w .  ja v a  2s  .  co  m
 * @param bean Le bean d'un type quelconque comportant des annotations daoTable et
 *          DaoField
 * @return Un bean de mme type que celui pass en paramtre. Les donnes du
 *         bean sont rafraichi  partir de la base au cas o celle-ci aurait
 *         modifi les donnes grace  des trigger ou autre.
 * @throws CreateException
 *           Exception leve au sur problme de persistance.
 */
public final T create(final T bean) throws CreateException {
    T returnValue = null;
    try {
        String msg = "Cannot create " + entityClass.getCanonicalName() + " : "
                + ToStringBuilder.reflectionToString(bean, ToStringStyle.MULTI_LINE_STYLE);

        if (null == sql_create) {
            sql_create = loadSqlCreate(usualTable, fields);
        }

        returnValue = entityClass.newInstance();
        try {
            Connection connection = getConnection();
            try {
                PreparedStatement pstmt = connection.prepareStatement(sql_create);
                try {
                    int i = 1;
                    for (Field field : fields) {
                        Annotation[] annotations = field.getAnnotations();
                        for (Annotation annotation : annotations) {
                            if (annotation instanceof DaoField) {
                                Object obj = BeanUtils.getProperty(bean, field.getName());
                                if (obj == null) {
                                    pstmt.setNull(i++, ((DaoField) annotation).type());
                                } else {
                                    setAll(pstmt, i++, obj);
                                }
                                break;
                            }
                        }
                    }
                    pstmt.executeUpdate();
                } finally {
                    pstmt.close();
                }
                pstmt = null;
            } finally {
                connection.close();
            }
            connection = null;
        } catch (SQLException sqle) {
            log.error(msg, sqle);
            throw new CreateException(msg, sqle);
        }
        try {
            returnValue = load(bean);
        } catch (FinderException le) {
            log.error(msg, le);
            throw new CreateException(msg, le);
        }
    } catch (Exception e) {
        throw new CreateException(e);
    }
    return returnValue;
}