Example usage for java.lang Boolean FALSE

List of usage examples for java.lang Boolean FALSE

Introduction

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

Prototype

Boolean FALSE

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

Click Source Link

Document

The Boolean object corresponding to the primitive value false .

Usage

From source file:com.icesoft.faces.util.CoreUtils.java

public static boolean isPortletEnvironment() {
    if (portletEnvironment == null) {
        try {//from w ww  .j av  a2  s .  c o  m
            Class portletRequestClass = Class.forName("javax.portlet.PortletRequest");
            portletEnvironment = new Boolean(portletRequestClass
                    .isInstance(FacesContext.getCurrentInstance().getExternalContext().getRequest()));
        } catch (Throwable e) {
            //both ClassNotFoundException and NoClassDefError
            //portlet not found
            portletEnvironment = Boolean.FALSE;
        }
    }
    return portletEnvironment.booleanValue();
}

From source file:uk.ac.aber.raf8.mmp.core.jobs.YQLCacheStocksQueryJob.java

@Override
protected void executeInternal(final JobExecutionContext jobExecutionContext) throws JobExecutionException {

    final YQLIndustryQueryModel industryQueryModel = YQLQueryCache.getInstance().getYqlIndustryQueryModel();
    final YQLStocksQueryModel stocksQueryModel = new YQLStocksQueryModel();

    for (final YQLIndustryModel industryModel : industryQueryModel.getIndustryModels()) {
        Boolean success = Boolean.FALSE;
        Integer tries = 0;//ww  w .j a v  a 2 s  .co  m
        while (!success && tries < MAX_TRIES) {
            try {
                final YQLStocksQueryModel temp = YQLService.getInstance()
                        .getYQLStocksQueryModel(industryModel.getCompanyModels());
                stocksQueryModel.getStockModels().addAll(temp.getStockModels());
                success = Boolean.TRUE;
            } catch (final Exception e) {
                e.printStackTrace();
                tries++;
                try {
                    Thread.sleep(DELAY_BETWEEN_TRIES);
                } catch (final InterruptedException e1) {
                    e1.printStackTrace();
                }
            }
        }
    }

    YQLQueryCache.getInstance().setYQLStocksQueryModel(stocksQueryModel);
}

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:org.springframework.data.convert.JsonBooleanDeserializer.java

@Override
public Boolean getNullValue() {
    return Boolean.FALSE;
}

From source file:org.openmrs.module.expandedcohort.api.db.hibernate.HibernateCohortDefinitionDataDao.java

public CohortDefinitionData getByUuid(String uuid) {
    Criteria criteria = sessionFactory.getCurrentSession().createCriteria(mappedClass);
    criteria.add(Restrictions.eq("uuid", uuid));
    criteria.add(Restrictions.eq("voided", Boolean.FALSE));
    return (CohortDefinitionData) criteria.uniqueResult();
}

From source file:org.obozek.minermonitor.view.AddMiner.java

@PostConstruct
public void init() {
    miner.setUser(securityContextHelper.getUser());
    miner.setAlive(Boolean.FALSE);
    miner.setDeadCheckIntervalMs(DEAD_CHECK_INTERVAL);
}

From source file:com.tapas.evidence.repository.KindergartenRepositoryImpl.java

@Override
@SuppressWarnings("unchecked")
public List<Kindergarten> findAll() {
    final Long tenantId = ((EvidenceUserDetails) SecurityContextHolder.getContext().getAuthentication()
            .getPrincipal()).getTenantId();
    Query query = this.entityManager.createNamedQuery(Kindergarten.QUERY_NAME_FIND_ALL_BY_DELETED_FLAG);
    query.setParameter("deleted", Boolean.FALSE);
    query.setParameter("tenantId", tenantId);
    return query.getResultList();
}

From source file:Main.java

static Boolean[] toObject(final boolean[] array) {
    if (array == null) {
        return null;
    } else if (array.length == 0) {
        return new Boolean[0];
    }/* w  ww  .  j  av a 2  s .  c  o  m*/
    final Boolean[] result = new Boolean[array.length];
    for (int i = 0; i < array.length; i++) {
        result[i] = (array[i] ? Boolean.TRUE : Boolean.FALSE);
    }
    return result;
}

From source file:ch.ralscha.extdirectspring.controller.ApiControllerWithXMLConfig1Test.java

@Test
public void testGroup1() throws Exception {

    Configuration config = new Configuration();
    config.setTimeout(15000);// w  w w  .j  av a2 s  .  co m
    config.setEnableBuffer(Boolean.FALSE);
    config.setMaxRetries(5);
    config.setStreamResponse(true);

    ApiRequestParams params = ApiRequestParams.builder().group("group1").configuration(config)
            .providerType("websocket").build();
    ApiControllerTest.runTest(mockMvc, params, ApiControllerTest.group1Apis(null));
}

From source file:com.tapas.evidence.repository.ChildRepositoryImpl.java

@Override
@SuppressWarnings("unchecked")
public List<Child> findAll() {
    final Long tenantId = ((EvidenceUserDetails) SecurityContextHolder.getContext().getAuthentication()
            .getPrincipal()).getTenantId();
    Query query = this.entityManager.createNamedQuery(Child.QUERY_NAME_FIND_ALL_BY_DELETED_FLAG);
    query.setParameter("deleted", Boolean.FALSE);
    query.setParameter("tenantId", tenantId);
    return query.getResultList();
}