Search in sources :

Example 1 with ToStringBuilder

use of org.eclipse.scout.rt.platform.util.ToStringBuilder in project scout.rt by eclipse.

the class Person method toString.

@Override
public String toString() {
    ToStringBuilder builder = new ToStringBuilder(this);
    builder.attr("id", m_id);
    builder.attr("name", m_name);
    builder.attr("age", m_age);
    builder.attr("cars", m_cars);
    return builder.toString();
}
Also used : ToStringBuilder(org.eclipse.scout.rt.platform.util.ToStringBuilder)

Example 2 with ToStringBuilder

use of org.eclipse.scout.rt.platform.util.ToStringBuilder in project scout.rt by eclipse.

the class CodeTypeCacheKey method toString.

@Override
public String toString() {
    final ToStringBuilder builder = new ToStringBuilder(this);
    builder.attr("locale", getLocale());
    builder.attr("codeTypeClass", getCodeTypeClass());
    return builder.toString();
}
Also used : ToStringBuilder(org.eclipse.scout.rt.platform.util.ToStringBuilder)

Example 3 with ToStringBuilder

use of org.eclipse.scout.rt.platform.util.ToStringBuilder in project scout.rt by eclipse.

the class RunContext method toString.

@Override
public String toString() {
    final ToStringBuilder builder = new ToStringBuilder(this);
    interceptToStringBuilder(builder);
    return builder.toString();
}
Also used : ToStringBuilder(org.eclipse.scout.rt.platform.util.ToStringBuilder)

Example 4 with ToStringBuilder

use of org.eclipse.scout.rt.platform.util.ToStringBuilder in project scout.rt by eclipse.

the class ProcessingStatus method toString.

/**
 * Returns a string representation of the status, suitable for debugging purposes only.
 */
@Override
public String toString() {
    ToStringBuilder builder = new ToStringBuilder(this);
    builder.attr("title", getTitle(), false);
    builder.attr("body", getBody(), false);
    builder.attr("severity", getSeverityName());
    builder.attr("code", getCode());
    builder.attr("exception", m_exception, false);
    return builder.toString();
}
Also used : ToStringBuilder(org.eclipse.scout.rt.platform.util.ToStringBuilder)

Example 5 with ToStringBuilder

use of org.eclipse.scout.rt.platform.util.ToStringBuilder in project scout.rt by eclipse.

the class AbstractContentAssistField method newByRecLookupRowProvider.

/**
 * @see LookupCall#getDataByRec()
 */
protected ILookupRowProvider<LOOKUP_KEY> newByRecLookupRowProvider(final LOOKUP_KEY parentKey, final TriState activeState) {
    return new ILookupRowProvider<LOOKUP_KEY>() {

        @SuppressWarnings("unchecked")
        @Override
        public List<ILookupRow<LOOKUP_KEY>> provide(ILookupCall<LOOKUP_KEY> lookupCall) {
            return (List<ILookupRow<LOOKUP_KEY>>) lookupCall.getDataByRec();
        }

        @Override
        public void beforeProvide(ILookupCall<LOOKUP_KEY> lookupCall) {
            prepareRecLookup(lookupCall, parentKey, activeState);
        }

        @Override
        public void afterProvide(ILookupCall<LOOKUP_KEY> lookupCall, List<ILookupRow<LOOKUP_KEY>> result) {
            interceptFilterLookupResult(lookupCall, result);
            interceptFilterRecLookupResult(lookupCall, result);
            cleanupResultList(result);
        }

        @Override
        public void provideSync(ILookupCall<LOOKUP_KEY> lookupCall, ILookupRowFetchedCallback<LOOKUP_KEY> callback) {
            throw new UnsupportedOperationException("Legacy calls not supported");
        }

        @Override
        public IFuture<Void> provideAsync(ILookupCall<LOOKUP_KEY> lookupCall, ILookupRowFetchedCallback<LOOKUP_KEY> callback, ClientRunContext clientRunContext) {
            throw new UnsupportedOperationException("Legacy calls not supported");
        }

        @Override
        public String toString() {
            ToStringBuilder sb = new ToStringBuilder(this).attr("Rec Lookup").attr("parentKey", parentKey).attr("activeState", activeState);
            return sb.toString();
        }
    };
}
Also used : ILookupRow(org.eclipse.scout.rt.shared.services.lookup.ILookupRow) ClientRunContext(org.eclipse.scout.rt.client.context.ClientRunContext) ILookupRowFetchedCallback(org.eclipse.scout.rt.shared.services.lookup.ILookupRowFetchedCallback) ToStringBuilder(org.eclipse.scout.rt.platform.util.ToStringBuilder) EventListenerList(org.eclipse.scout.rt.platform.util.EventListenerList) List(java.util.List) ArrayList(java.util.ArrayList) ILookupCall(org.eclipse.scout.rt.shared.services.lookup.ILookupCall)

Aggregations

ToStringBuilder (org.eclipse.scout.rt.platform.util.ToStringBuilder)24 ArrayList (java.util.ArrayList)8 List (java.util.List)8 ClientRunContext (org.eclipse.scout.rt.client.context.ClientRunContext)8 ILookupCall (org.eclipse.scout.rt.shared.services.lookup.ILookupCall)8 ILookupRow (org.eclipse.scout.rt.shared.services.lookup.ILookupRow)8 ILookupRowFetchedCallback (org.eclipse.scout.rt.shared.services.lookup.ILookupRowFetchedCallback)8 ILookupRowProvider (org.eclipse.scout.rt.client.ui.form.fields.smartfield.ILookupRowProvider)4 EventListenerList (org.eclipse.scout.rt.platform.util.EventListenerList)4