Example usage for java.lang Boolean TRUE

List of usage examples for java.lang Boolean TRUE

Introduction

In this page you can find the example usage for java.lang Boolean TRUE.

Prototype

Boolean TRUE

To view the source code for java.lang Boolean TRUE.

Click Source Link

Document

The Boolean object corresponding to the primitive value true .

Usage

From source file:org.apache.streams.gnip.powertrack.GnipActivityFixer.java

public GnipActivityFixer() {
    mapper = new ObjectMapper();
    mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, Boolean.FALSE);
    mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, Boolean.TRUE);
    mapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, Boolean.TRUE);
    xmlMapper = new XmlMapper();
    xmlMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, Boolean.FALSE);
    xmlMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, Boolean.TRUE);
    xmlMapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, Boolean.TRUE);
}

From source file:boutique.service.PaiementService.java

public void payerCommande(Commande cmd) {
    cmd.setPayee(Boolean.TRUE);

    //Mise  jour du stock article
    for (SousCommande sscmd : cmd.getSousCommandes()) {
        Article a = sscmd.getArticle();/*from  w  w w  .j  a va2s . com*/
        a.setStock(a.getStock() - sscmd.getQuantite());
        articleService.save(a);

    }
}

From source file:org.yamj.core.api.options.OptionsEpisode.java

public void setWatched(String watched) {
    if ("true".equalsIgnoreCase(watched)) {
        this.watched = Boolean.TRUE;
    } else if ("false".equalsIgnoreCase(watched)) {
        this.watched = Boolean.FALSE;
    }//from  w ww.  j a  v a  2 s  .com
}

From source file:com.civis.utils.html.parser.HtmlParseFilter.java

public Boolean matchText(String linkText) {
    if (linkValueCanBeNull) {
        //can be null, that means this filter is deactivated and always true.
        return Boolean.TRUE;
    }//ww w . ja v  a 2s  . c o m

    return StringUtils.isNotBlank(linkText);
}

From source file:dk.clanie.actor.FirstTestActorImpl.java

@Override
public Future<Boolean> methodReturningTrue() {
    return new AsyncResult<Boolean>(Boolean.TRUE);
}

From source file:org.openvoters.android.tasks.RemoteAPIVoteTask.java

@Override
protected Boolean doInBackground(Object... params) {
    callback = (RemoteAPIVoteCallback) params[0];
    Item party = (Item) params[1];/*from www  .j  av a2s  . c o  m*/
    uniqueVoterID = (String) params[2];

    try {
        String remoteAPIURL = String.format("%s/%s", RemoteAPI.getBaseURL(), "vote");
        makeRequest(remoteAPIURL, party, uniqueVoterID);
        return Boolean.TRUE;

    } catch (Exception e) {
        Log.e("Remote API", String.format("Errore (%s): %s", e, e.getLocalizedMessage()));

        e.printStackTrace();
        exc = e;
        return Boolean.FALSE;
    }
}

From source file:com.inkubator.hrm.web.organisation.OrgTypeOfSpecFormController.java

@PostConstruct
@Override//  w ww.  j ava2 s . com
public void initialization() {
    super.initialization();
    try {
        String orgTypeOfSpecId = FacesUtil.getRequestParameter("orgTypeOfSpecId");
        model = new OrgTypeOfSpecModel();
        isUpdate = Boolean.FALSE;
        if (StringUtils.isNotEmpty(orgTypeOfSpecId)) {
            OrgTypeOfSpec orgTypeOfSpec = service.getEntiyByPK(Long.parseLong(orgTypeOfSpecId));
            if (orgTypeOfSpecId != null) {
                model = getModelFromEntity(orgTypeOfSpec);
                isUpdate = Boolean.TRUE;
            }
        }
    } catch (Exception e) {
        LOGGER.error("Error", e);
    }
}

From source file:de.hybris.platform.marketplaceintegrationbackoffice.widgets.MarketplaceEditorAreaController.java

@Override
@ViewEvent(componentID = COMP_ID_SAVE_BTN, eventName = Events.ON_CLICK)
public void saveObject() throws ObjectSavingException {
    if (isModelValueChanged()) {
        try {//from w w  w. java2  s . c  o  m
            final Context ctx = new DefaultContext();
            ctx.addAttribute(ObjectFacade.CTX_DISABLE_CRUD_COCKPIT_EVENT_NOTIFICATION, Boolean.TRUE);
            final Object savedObject = getObjectFacade().save(getCurrentObject(), ctx);
            getModel().setValue(MODEL_CURRENT_OBJECT, savedObject);

            final Map<String, EventListener<Event>> afterSaveListeners = EditorAreaRendererUtils
                    .getAfterSaveListeners(getModel());
            if (afterSaveListeners != null) {
                for (final EventListener<Event> listener : afterSaveListeners.values()) {
                    try {
                        listener.onEvent(new Event("afterSave"));
                    } catch (final Exception e) // NOPMD, zk specific
                    {
                        throw new ObjectSavingException(String.valueOf(getCurrentObject()), e);
                    }
                }
            }
            final Object currentObject = getCurrentObject();
            sendOutput(SOCKET_OUTPUT_OBJECT_SAVED, currentObject);
            handleObjectSavingSuccess(currentObject);
            publishCRUDCockpitEventNotification(ObjectFacade.OBJECT_UPDATED_EVENT, currentObject);

            if (BooleanUtils.isTrue(getValue(MODEL_INPUT_OBJECT_IS_NEW, Boolean.class))) {
                setObject(currentObject);
            } else {
                resetValueChangedState();
                updateWidgetTitle();
            }
        } catch (final ObjectSavingException ex) {
            handleObjectSavingException(ex);
        }
    }
}

From source file:org.jdal.aop.SerializableProxyUtils.java

public static BeanDefinitionHolder createSerializableProxy(BeanDefinitionHolder definition,
        BeanDefinitionRegistry registry, boolean proxyTargetClass) {

    String originalBeanName = definition.getBeanName();
    BeanDefinition targetDefinition = definition.getBeanDefinition();

    // Create a scoped proxy definition for the original bean name,
    // "hiding" the target bean in an internal target definition.
    RootBeanDefinition proxyDefinition = new RootBeanDefinition(SerializableProxyFactoryBean.class);
    proxyDefinition.setOriginatingBeanDefinition(definition.getBeanDefinition());
    proxyDefinition.setSource(definition.getSource());
    proxyDefinition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);

    String targetBeanName = getTargetBeanName(originalBeanName);
    proxyDefinition.getPropertyValues().add("targetBeanName", targetBeanName);

    if (proxyTargetClass) {
        targetDefinition.setAttribute(AutoProxyUtils.PRESERVE_TARGET_CLASS_ATTRIBUTE, Boolean.TRUE);
    } else {//from   www . ja v  a2s  .  co m
        proxyDefinition.getPropertyValues().add("proxyTargetClass", Boolean.FALSE);
    }

    // Copy autowire settings from original bean definition.
    proxyDefinition.setAutowireCandidate(targetDefinition.isAutowireCandidate());
    proxyDefinition.setPrimary(targetDefinition.isPrimary());
    if (targetDefinition instanceof AbstractBeanDefinition) {
        proxyDefinition.copyQualifiersFrom((AbstractBeanDefinition) targetDefinition);
    }

    // Set singleton property of FactoryBean
    proxyDefinition.getPropertyValues().add("singleton", !targetDefinition.isPrototype());

    // The target bean should be ignored in favor of the scoped proxy.
    targetDefinition.setAutowireCandidate(false);
    targetDefinition.setPrimary(false);

    // Register the target bean as separate bean in the factory.
    registry.registerBeanDefinition(targetBeanName, targetDefinition);

    // Return the scoped proxy definition as primary bean definition
    // (potentially an inner bean).
    return new BeanDefinitionHolder(proxyDefinition, originalBeanName, definition.getAliases());
}