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.inkubator.hrm.web.recruitment.RecruitSelectionTypeFormController.java

@PostConstruct
@Override/*from  w  w  w. j  a va2  s .co m*/
public void initialization() {
    super.initialization();
    try {
        String recruitSelectionTypeId = FacesUtil.getRequestParameter("execution");
        model = new RecruitSelectionTypeModel();
        isUpdate = Boolean.FALSE;
        listRecruitDynamicField = recruitDynamicFieldService.getAllData();
        if (StringUtils.isNotEmpty(recruitSelectionTypeId)) {
            RecruitSelectionType recruitSelectionType = recruitmentTypeService
                    .getEntiyByPK(Long.parseLong(recruitSelectionTypeId));
            if (recruitSelectionType != null) {
                model = getModelFromEntity(recruitSelectionType);
                List<RecruitSelectionTypeField> listFieldFromSelectionTypeField = recruitSelectionTypeFieldService
                        .getEntityByRecruitSelectionTypeId(Long.parseLong(recruitSelectionTypeId));
                selectedRecruitDynamicField = new ArrayList<RecruitDynamicField>();
                RecruitDynamicField recruitDynamicField;
                //add selected data in RecruitSelectionTypeField and add to list selectedRecruitDynamicField
                for (RecruitSelectionTypeField selectionTypeField : listFieldFromSelectionTypeField) {
                    recruitDynamicField = recruitDynamicFieldService
                            .getEntiyByPK(selectionTypeField.getRecruitDynamicField().getId());
                    selectedRecruitDynamicField.add(recruitDynamicField);
                }

                //remove all list from listRecruitDynamicField by selectedRecruitDynamicField to prevent duplicate data
                listRecruitDynamicField.removeAll(selectedRecruitDynamicField);

                //add selected with fieldNewLabel property
                for (RecruitSelectionTypeField selectionTypeField : listFieldFromSelectionTypeField) {
                    recruitDynamicField = recruitDynamicFieldService
                            .getEntiyByPK(selectionTypeField.getRecruitDynamicField().getId());
                    recruitDynamicField.setFieldNewLabel(selectionTypeField.getFieldNewLabel());
                    listRecruitDynamicField.add(recruitDynamicField);
                }
                isUpdate = Boolean.TRUE;
            }
        }
    } catch (Exception e) {
        LOGGER.error("Error", e);
    }
}

From source file:net.ceos.project.poi.annotated.bean.PerformanceObjectBuilder.java

/**
 * Create a PerformanceObject for tests.
 * //from  w  ww .  j a v  a 2  s.  c  o  m
 * @return the {@link PerformanceObject}
 */
public static PerformanceObject buildPerformanceObject(int multiplier) {
    PerformanceObject toValidate = new PerformanceObject();

    toValidate.setDateAttribute1(new Date());
    toValidate.setDateAttribute2(new Date());
    toValidate.setDateAttribute3(new Date());

    toValidate.setStringAttribute1("some string");
    toValidate.setStringAttribute2("some string");
    toValidate.setStringAttribute3("some string");
    toValidate.setStringAttribute4("some string");
    toValidate.setStringAttribute5("some string");
    toValidate.setStringAttribute6("some string");
    toValidate.setStringAttribute7("some string");
    toValidate.setStringAttribute8("some string");
    toValidate.setStringAttribute9("some string");
    toValidate.setStringAttribute10("some string");
    toValidate.setStringAttribute11("some string");
    toValidate.setStringAttribute12("some string");

    toValidate.setIntegerAttribute1(6 * multiplier);
    toValidate.setIntegerAttribute2(11 * multiplier);
    toValidate.setIntegerAttribute3(33 * multiplier);
    toValidate.setIntegerAttribute4(46 * multiplier);
    toValidate.setIntegerAttribute5(2 * multiplier);
    toValidate.setIntegerAttribute6(7 * multiplier);
    toValidate.setIntegerAttribute7(9 * multiplier);

    toValidate.setDoubleAttribute1(Double.valueOf("11.3") * multiplier);
    toValidate.setDoubleAttribute2(Double.valueOf("237.131") * multiplier);
    toValidate.setDoubleAttribute3(Double.valueOf("25.777") * multiplier);

    toValidate.setLongAttribute(Long.valueOf("1234567890") * multiplier);

    toValidate.setBooleanAttribute1(Boolean.TRUE);
    toValidate.setBooleanAttribute2(Boolean.TRUE);
    toValidate.setBooleanAttribute3(Boolean.FALSE);
    toValidate.setBooleanAttribute4(Boolean.TRUE);
    /* create sub object Job */
    Job job = new Job();
    job.setJobCode(0005);
    job.setJobFamily("Family Job Name");
    job.setJobName("Job Name");
    toValidate.setJob(job);
    toValidate.setIntegerPrimitiveAttribute1(2 * multiplier);
    toValidate.setIntegerPrimitiveAttribute2(3 * multiplier);
    toValidate.setIntegerPrimitiveAttribute3(11 * multiplier);
    toValidate.setIntegerPrimitiveAttribute4(5 * multiplier);
    toValidate.setIntegerPrimitiveAttribute5(12 * multiplier);

    toValidate.setDoublePrimitiveAttribute(44.6 * multiplier);

    toValidate.setLongPrimitiveAttribute(987654321L * multiplier);

    toValidate.setBooleanPrimitiveAttribute(true);
    /* create sub object AddressInfo */
    AddressInfo ai = new AddressInfo();
    ai.setAddress("this is the street");
    ai.setNumber(99);
    ai.setCity("this is the city");
    ai.setCityCode(70065);
    ai.setCountry("This is a Country");
    toValidate.setAddressInfo(ai);
    toValidate.setFloatAttribute(14.765f * multiplier);
    toValidate.setFloatPrimitiveAttribute(11.1125f * multiplier);
    toValidate.setUnitFamily(UnitFamily.COMPONENTS);
    toValidate.setBigDecimalAttribute(BigDecimal.valueOf(24.777).multiply(BigDecimal.valueOf(multiplier)));
    // TODO add new fields below

    return toValidate;
}

From source file:ch.ralscha.extdirectspring.bean.ExtDirectFormPostResultTest.java

@Test
public void testExtDirectFormPostResultBindingResult() {
    BindingResult br = new TestBindingResult(Collections.<FieldError>emptyList());
    ExtDirectFormPostResult result = new ExtDirectFormPostResult(br);
    assertThat(result.getResult()).hasSize(1).contains(MapEntry.entry("success", Boolean.TRUE));

    FieldError error = new FieldError("testobject", "field1", "message");
    br = new TestBindingResult(Collections.singletonList(error));
    result = new ExtDirectFormPostResult(br);
    assertThat(result.getResult()).hasSize(2).contains(MapEntry.entry("success", Boolean.FALSE));
    Map<String, List<String>> errors = (Map<String, List<String>>) result.getResult().get("errors");
    assertThat(errors).isNotNull().hasSize(1);
    assertThat(errors.get("field1")).containsExactly("message");
}

From source file:de.blizzy.backup.BackupPlugin.java

boolean isHidden() {
    return Boolean
            .parseBoolean(StringUtils.defaultString(getApplicationArg(ARG_HIDDEN), Boolean.FALSE.toString()));
}

From source file:org.yamj.core.service.ArtworkProcessScheduler.java

@Scheduled(initialDelay = 30000, fixedDelay = 60000)
public void processArtwork() throws Exception {
    int maxThreads = configService.getIntProperty("yamj3.scheduler.artworkprocess.maxThreads", 1);
    if (maxThreads <= 0) {
        if (!messageDisabled) {
            messageDisabled = Boolean.TRUE;
            LOG.info("Artwork processing is disabled");
        }//from  w  w w. ja v  a  2  s  .  co m
        return;
    } else {
        messageDisabled = Boolean.FALSE;
    }

    int maxResults = configService.getIntProperty("yamj3.scheduler.artworkprocess.maxResults", 20);
    List<QueueDTO> queueElements = artworkStorageService.getArtworLocatedQueue(maxResults);
    if (CollectionUtils.isEmpty(queueElements)) {
        LOG.debug("No artwork found to process");
        return;
    }

    LOG.info("Found {} artwork objects to process; process with {} threads", queueElements.size(), maxThreads);
    BlockingQueue<QueueDTO> queue = new LinkedBlockingQueue<QueueDTO>(queueElements);

    ExecutorService executor = Executors.newFixedThreadPool(maxThreads);
    for (int i = 0; i < maxThreads; i++) {
        ArtworkProcessRunner worker = new ArtworkProcessRunner(queue, artworkProcessorService);
        executor.execute(worker);
    }
    executor.shutdown();

    // run until all workers have finished
    while (!executor.isTerminated()) {
        try {
            TimeUnit.SECONDS.sleep(5);
        } catch (InterruptedException ignore) {
        }
    }

    LOG.debug("Finished artwork processing");
}

From source file:com.mycollab.module.user.service.mybatis.RoleServiceDBImpl.java

private void setAllRoleNotDefault(Integer sAccountId) {
    Role updateRecord = new Role();
    updateRecord.setIsdefault(Boolean.FALSE);
    RoleExample ex = new RoleExample();
    ex.createCriteria().andSaccountidEqualTo(sAccountId);
    roleMapper.updateByExampleSelective(updateRecord, ex);
}

From source file:ar.com.fdvs.dj.test.ReportExporter.java

public static void exportReportXls(JasperPrint jp, String path) throws JRException, FileNotFoundException {
    JRXlsExporter exporter = new JRXlsExporter();

    File outputFile = new File(path);
    File parentFile = outputFile.getParentFile();
    if (parentFile != null)
        parentFile.mkdirs();// w  w w.  j  ava2s.c  om
    FileOutputStream fos = new FileOutputStream(outputFile);

    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jp);
    exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, fos);
    exporter.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);
    exporter.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
    exporter.setParameter(JRXlsExporterParameter.IS_IGNORE_GRAPHICS, Boolean.FALSE);

    exporter.exportReport();

    logger.debug("XLS Report exported: " + path);
}

From source file:org.mule.providers.soap.axis.wsdl.wsrf.aspect.WsAddressingAdvice.java

/**
 * Inject call informations.//w w w. j  av  a 2 s  . c om
 * 
 * @param arg0 .
 * @param arg1 .
 * @param arg2 .
 * @throws Throwable .
 */
public void before(Method arg0, Object[] arg1, Object arg2) throws Throwable {

    Call call = (Call) arg1[0];

    if (call == null) {
        return;
    }

    setSerializableClasses(call);
    UMOEvent event = (UMOEvent) arg1[1];
    setOperationsDesc(call, event);
    call.setUseSOAPAction(true);
    call.setSOAPActionURI((String) event.getMessage().getProperty(WSRFParameter.SOAP_ACTION_URI));

    call.setEncodingStyle(null);
    call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
    call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
    call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    setHeader(call, event);

}

From source file:com.quancheng.saluki.gateway.zuul.filter.LimitAccessFilter.java

@Override
public Object run() {
    RequestContext ctx = RequestContext.getCurrentContext();
    HttpServletRequest request = ctx.getRequest();
    String auth = request.getHeader("Authorization");
    String accessToken = auth.split(" ")[1];
    ctx.set("LimitAccess", Boolean.TRUE);
    try {/* w  w w .  ja va 2s  . co  m*/
        Triple<Long, String, Long> clientTriple = databaseUserDetailService.loadClientByToken(accessToken);
        String user = clientTriple.getMiddle();
        Long intervalInMills = clientTriple.getLeft();
        Long limits = clientTriple.getRight();
        if (intervalInMills != null && intervalInMills != 0l && limits != null && limits != 0l) {
            if (!access(user, intervalInMills, limits)) {
                ctx.set("LimitAccess", Boolean.FALSE);
                ctx.setSendZuulResponse(false);
                ctx.setResponseStatusCode(HttpServletResponse.SC_BAD_REQUEST);
                ctx.setResponseBody("The times of usage is limited");
            }
        }
    } catch (Throwable e) {
    }
    return null;
}

From source file:org.codehaus.groovy.grails.plugins.searchable.compass.config.mapping.SearchableClassPropertySearchableGrailsDomainClassMappingConfigurator.java

/**
 * Returns the collection of GrailsDomainClasses that are mapped by this instance
 * @param grailsDomainClasses ALL domain classes
 * @return the collection of domain classes mapped by this instance
 *//*  ww  w  . j av a 2s .c o  m*/
public Collection getMappedBy(Collection grailsDomainClasses) {
    Set mappedBy = new HashSet();
    for (Iterator iter = grailsDomainClasses.iterator(); iter.hasNext();) {
        GrailsDomainClass grailsDomainClass = (GrailsDomainClass) iter.next();
        Object value = SearchableUtils.getSearchablePropertyValue(grailsDomainClass);
        if (value != null) {
            if (!((value instanceof Boolean) && value.equals(Boolean.FALSE))) {
                mappedBy.add(grailsDomainClass);
            }
            continue;
        }
        if (SearchableUtils.isEmbeddedPropertyOfOtherDomainClass(grailsDomainClass, grailsDomainClasses)) {
            mappedBy.add(grailsDomainClass);
        }
    }
    return mappedBy;
}