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.loan.LoanNewSchemaListOfEmpFormController.java

@PostConstruct
@Override//from   www .  j  av a 2 s.co m
public void initialization() {
    super.initialization();
    try {
        model = new LoanNewSchemaListOfEmpModel();
        empDataId = FacesUtil.getRequestParameter("empDataId");
        isUpdate = Boolean.FALSE;
        if (StringUtils.isNotEmpty(empDataId)) {
            EmpData empData = empDataService.getByEmpIdWithDetail(Long.valueOf(empDataId));
            if (empData != null) {
                isUpdate = Boolean.FALSE;
                model.setFirstName(empData.getBioData().getFirstName());
                model.setLastName(empData.getBioData().getLastName());
                model.setCodeJabatan(empData.getGolonganJabatan().getCode());
                model.setNik(empData.getNik());
                model.setEmpDataId(empData.getId());
                if (empData.getJabatanByJabatanId().getJabatan() != null) {
                    model.setNamaJabatan(empData.getJabatanByJabatanId().getJabatan().getName());
                }
            }

            LoanNewSchemaListOfEmp loanNewSchemaListOfEmp = loanNewSchemaListOfEmpService
                    .getEntityByEmpDataId(Long.valueOf(empDataId));
            if (loanNewSchemaListOfEmp != null) {
                isUpdate = Boolean.TRUE;
                oldId = loanNewSchemaListOfEmp.getLoanNewSchema().getId();
                model.setNoSk(loanNewSchemaListOfEmp.getNomorSk());
                model.setLoanNewSchemaId(loanNewSchemaListOfEmp.getLoanNewSchema().getId());
                model.setDescription(loanNewSchemaListOfEmp.getDescription());
            }

        }

        List<LoanNewSchema> listLoanNewSchema = loanNewSchemaService.getAllDataWhereIsActive();
        for (LoanNewSchema loanNewSchema : listLoanNewSchema) {
            dropDownLoanNewSchema.put(loanNewSchema.getLoanSchemaName(), loanNewSchema.getId());
        }

    } catch (Exception e) {
        LOGGER.error("Error", e);
    }
}

From source file:de.hybris.platform.mpintgomsbackoffice.widgets.refund.RefundOpenStatusFilterController.java

@Override
public void addSearchDataConditions(final AdvancedSearchData searchData) {
    if (searchData != null) {
        this.searchData = searchData;
        if (CollectionUtils.isNotEmpty(searchData.getConditions(TmallRefundRequestModel.REFUNDACTION))) {
            // clear existing delivery mode search data
            searchData.getConditions(TmallRefundRequestModel.REFUNDACTION).clear();
        }/* ww w. j  av a 2  s  .  co m*/

        final FieldType statusFieldType = new FieldType();
        statusFieldType.setDisabled(Boolean.FALSE);
        statusFieldType.setSelected(Boolean.TRUE);
        statusFieldType.setName(TmallRefundRequestModel.REFUNDACTION);

        final List<RefundAction> openStatuses = getEnumerationService()
                .getEnumerationValues(RefundAction.class);
        final List<SearchConditionData> statusConditionsList = new ArrayList<>();
        openStatuses.stream()
                .filter(status -> !status.equals(RefundAction.COMPLETED)
                        && !status.equals(RefundAction.CLOSED_BY_CUSTOMER)
                        && !status.equals(RefundAction.REJECTED_BY_SELLER))
                .forEach(status -> statusConditionsList
                        .add(new SearchConditionData(statusFieldType, status, ValueComparisonOperator.EQUALS)));

        final SearchConditionDataList statusSearchConditionsList = SearchConditionDataList
                .or(statusConditionsList);

        searchData.addConditionList(ValueComparisonOperator.OR, Arrays.asList(statusSearchConditionsList));
    }
}

From source file:com.epam.ta.reportportal.core.widget.content.NotPassedTestsContentLoader.java

@SuppressFBWarnings("NP_NULL_PARAM_DEREF")
@Override/* w  w w. j  a v a 2  s . c o  m*/
public Map<String, List<ChartObject>> loadContent(Filter filter, Sort sorting, int quantity,
        List<String> contentFields, List<String> metaDataFields, Map<String, List<String>> options) {
    BusinessRule.expect(metaDataFields == null || metaDataFields.isEmpty(), Predicates.equalTo(Boolean.FALSE))
            .verify(ErrorType.UNABLE_LOAD_WIDGET_CONTENT,
                    "Metadata fields should exist for providing content for 'column chart'.");
    List<String> allFields = Lists.newArrayList(contentFields);
    List<String> xAxis = metaDataFields;
    allFields.addAll(xAxis);
    StatisticsDocumentHandler handler = new StatisticsDocumentHandler(contentFields, xAxis);
    String collectionName = getCollectionName(filter.getTarget());

    // here can be used any repository which extends ReposrtPortalRepository
    launchRepository.loadWithCallback(filter, sorting, quantity, allFields, handler, collectionName);
    return this.convertResult(handler);
}

From source file:io.janusproject.Boot.java

private static void parseCommandLineForSystemProperties(CommandLine cmd) {
    if (cmd.hasOption('o')) {
        System.setProperty(JanusConfig.OFFLINE, Boolean.TRUE.toString());
    }//  ww w  .jav a2s  . c o  m
    if (cmd.hasOption('R')) {
        System.setProperty(JanusConfig.BOOT_DEFAULT_CONTEXT_ID_NAME, Boolean.FALSE.toString());
        System.setProperty(JanusConfig.RANDOM_DEFAULT_CONTEXT_ID_NAME, Boolean.TRUE.toString());
    } else if (cmd.hasOption('B')) {
        System.setProperty(JanusConfig.BOOT_DEFAULT_CONTEXT_ID_NAME, Boolean.TRUE.toString());
        System.setProperty(JanusConfig.RANDOM_DEFAULT_CONTEXT_ID_NAME, Boolean.FALSE.toString());
    } else if (cmd.hasOption('W')) {
        System.setProperty(JanusConfig.BOOT_DEFAULT_CONTEXT_ID_NAME, Boolean.FALSE.toString());
        System.setProperty(JanusConfig.RANDOM_DEFAULT_CONTEXT_ID_NAME, Boolean.FALSE.toString());
    }
    // Define the system properties, if not already done by the JRE.
    Properties props = cmd.getOptionProperties("D"); //$NON-NLS-1$
    if (props != null) {
        for (Entry<Object, Object> entry : props.entrySet()) {
            System.setProperty(entry.getKey().toString(), entry.getValue().toString());
        }
    }
}

From source file:com.adaptris.core.jms.JmsTransactedWorkflowTest.java

public void testSetStrict() throws Exception {
    JmsTransactedWorkflow workflow = new JmsTransactedWorkflow();
    assertEquals(true, workflow.isStrict());
    workflow.setStrict(null);/*from   w  w w. j  a va 2s .c  om*/
    assertEquals(true, workflow.isStrict());
    assertNull(workflow.getStrict());
    workflow.setStrict(Boolean.FALSE);
    assertEquals(false, workflow.isStrict());
    assertEquals(Boolean.FALSE, workflow.getStrict());
    workflow.setStrict(Boolean.TRUE);
    assertEquals(true, workflow.isStrict());
    assertEquals(Boolean.TRUE, workflow.getStrict());
}

From source file:DataStructure.java

public static Boolean isOddIndex(Integer index) {
    if (index % 2 == 0)
        return Boolean.FALSE;
    return Boolean.TRUE;
}

From source file:de.jlo.talendcomp.json.TypeUtil.java

public static Boolean convertToBoolean(String value) throws Exception {
    if (value == null) {
        return null;
    }/*from w  w w  .  ja va 2  s  . co  m*/
    value = value.toLowerCase();
    if ("true".equals(value)) {
        return Boolean.TRUE;
    } else if ("false".equals(value)) {
        return Boolean.FALSE;
    } else if ("1".equals(value)) {
        return Boolean.TRUE;
    } else if ("0".equals(value)) {
        return Boolean.FALSE;
    } else if ("yes".equals(value)) {
        return Boolean.TRUE;
    } else if ("y".equals(value)) {
        return Boolean.TRUE;
    } else if ("s".equals(value)) {
        return Boolean.TRUE;
    } else if ("".equals(value)) {
        return Boolean.TRUE;
    } else if ("no".equals(value)) {
        return Boolean.FALSE;
    } else if ("".equals(value)) {
        return Boolean.FALSE;
    } else if ("n".equals(value)) {
        return Boolean.FALSE;
    } else if ("ja".equals(value)) {
        return Boolean.TRUE;
    } else if ("j".equals(value)) {
        return Boolean.TRUE;
    } else if ("nein".equals(value)) {
        return Boolean.FALSE;
    } else if ("oui".equals(value)) {
        return Boolean.TRUE;
    } else if ("non".equals(value)) {
        return Boolean.FALSE;
    } else if ("ok".equals(value)) {
        return Boolean.TRUE;
    } else if ("x".equals(value)) {
        return Boolean.TRUE;
    } else if (value != null) {
        throw new Exception("Value: " + value + " cannot be parsed to a boolean");
    } else {
        return null;
    }
}

From source file:com.inkubator.hrm.web.payroll.PayComponentDataExceptionFormController.java

@PostConstruct
@Override//from  w  ww.jav  a 2 s .c o m
public void initialization() {
    super.initialization();
    try {
        String payComponentExceptionId = FacesUtil.getRequestParameter("payComponentExceptionId");
        paySalaryComponentId = FacesUtil.getRequestParameter("paySalaryComponentId");
        model = new PayComponentDataExceptionModel();
        isUpdate = Boolean.FALSE;
        if (StringUtils.isNotEmpty(paySalaryComponentId)) {
            PaySalaryComponent paySalaryComponent = paySalaryComponentService
                    .getEntiyByPK(Long.parseLong(paySalaryComponentId.substring(1)));
            model.setComponentName(paySalaryComponent.getCode() + " - " + paySalaryComponent.getName());
            if (payComponentExceptionId != null) {
                PayComponentDataException payComponentDataException = payComponentDataExceptionService
                        .getByPaySalaryComponentId(Long.parseLong(payComponentExceptionId));
                model = getModelFromEntity(payComponentDataException);
                isUpdate = Boolean.TRUE;
            }
        }

    } catch (Exception e) {
        LOGGER.error("Error", e);
    }
}

From source file:com.sslexplorer.extensions.actions.GetApplicationFileAction.java

public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) throws Exception {
    if (response instanceof GZIPResponseWrapper) {
        ((GZIPResponseWrapper) response).setCompress(false);
    }//from   w ww  .ja va2  s.c  o m

    request.setAttribute(Constants.REQ_ATTR_COMPRESS, Boolean.FALSE);
    String application = request.getParameter("name");
    String file = request.getParameter("file").replace('\\', '/');

    String ticket = request.getParameter("ticket");

    if (file.equalsIgnoreCase("sslexplorer.cert")) {
        processApplicationCertRequest(application, ticket, response);
    } else {
        processApplicationFileRequest(application, file, ticket, request, response);
    }
    return null;
}

From source file:com.epam.ta.reportportal.core.widget.content.ChartInvestigatedContentLoader.java

@SuppressFBWarnings("NP_NULL_PARAM_DEREF")
@Override//from   www . j  a  v  a2s.c  o m
public Map<String, List<ChartObject>> loadContent(Filter filter, Sort sorting, int quantity,
        List<String> contentFields, List<String> metaDataFields, Map<String, List<String>> options) {
    BusinessRule.expect(metaDataFields == null || metaDataFields.isEmpty(), Predicates.equalTo(Boolean.FALSE))
            .verify(ErrorType.UNABLE_LOAD_WIDGET_CONTENT,
                    "Metadata fields should exist for providing content for 'column chart'.");
    List<String> allFields = Lists.newArrayList(contentFields);
    List<String> xAxis = metaDataFields;
    allFields.addAll(xAxis);
    StatisticsDocumentHandler handler = new StatisticsDocumentHandler(contentFields, xAxis);
    String collectionName = getCollectionName(filter.getTarget());

    // here can be used any repository which extends ReposrtPortalRepository
    launchRepository.loadWithCallback(filter, sorting, quantity, allFields, handler, collectionName);
    if ((options.get("timeline") != null) && (Period.findByName(options.get("timeline").get(0)) != null)) {
        return convertResult(
                groupByDate(handler.getResult(), Period.findByName(options.get("timeline").get(0))));
    }
    Map<String, List<ChartObject>> result = new HashMap<>();
    result.put("result", handler.getResult());
    return convertResult(result);
}