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.appraisal.CompetencyGroupFormController.java

@PostConstruct
@Override//from  w ww . j ava  2  s . c  o m
public void initialization() {
    super.initialization();
    try {
        model = new AppraisalCompetencyGroupModel();
        isUpdate = Boolean.FALSE;

        String id = FacesUtil.getRequestParameter("execution");
        if (StringUtils.isNotEmpty(id)) {
            AppraisalCompetencyGroup competencyGroup = appraisalCompetencyGroupService
                    .getEntityByIdWithDetail(Long.parseLong(id.substring(1)));
            if (competencyGroup != null) {
                isUpdate = Boolean.TRUE;
                model = getModelFromEntity(competencyGroup);
            }
        } else {
            List<KlasifikasiKerja> listKlasifikasiKerja = klasifikasiKerjaService.getAllData();
            model.setDualListModelKlasifikasiKerja(
                    new DualListModel<>(listKlasifikasiKerja, new ArrayList<>()));
        }

        model.setListCompetencyType(appraisalCompetencyTypeService.getAllData());
    } catch (Exception e) {
        LOGGER.error("error", e);
    }
}

From source file:br.com.joaops.smt.security.SmtUserDetails.java

@Override
public boolean isAccountNonExpired() {
    if (this.getUser().getAccountCanExpire()) {
        Calendar expirationDate = Calendar.getInstance();
        expirationDate.setTime(this.getUser().getAccountExpiration());
        if (Calendar.getInstance().after(expirationDate)) {
            return Boolean.FALSE;
        } else {/* w  ww.  j  ava2  s  .c o m*/
            return Boolean.TRUE;
        }
    } else {
        return Boolean.TRUE;
    }
}

From source file:it.polimi.diceH2020.SPACE4Cloud.shared.solution.Solution.java

@JsonIgnore
private Boolean isFeasible() {
    if (evaluated) {
        return lstSolutions.stream().allMatch(SolutionPerJob::getFeasible);
    } else//  w  w  w.  java2  s  . c om
        return Boolean.FALSE;
}

From source file:gridool.db.DBLocalJob.java

public Boolean reduce() throws GridException {
    return error == null ? Boolean.TRUE : Boolean.FALSE;
}

From source file:hydrograph.ui.validators.impl.BooleanOrParameterValidationRule.java

@Override
public boolean validate(Object object, String propertyName, Map<String, List<FixedWidthGridRow>> inputSchemaMap,
        boolean isJobImported) {
    String value = null;/*from  w w w .  ja v a2  s  . c  om*/
    if (object instanceof String) {
        value = (String) object;
    } else if (object instanceof Boolean) {
        boolean bol = (boolean) object;
        value = bol + "";
    }
    if (StringUtils.isNotBlank(value)) {
        Matcher matcher = Pattern.compile(Constants.REGEX).matcher(value);
        if ((matcher.matches() || Boolean.TRUE.toString().equalsIgnoreCase(value)
                || Boolean.FALSE.toString().equalsIgnoreCase(value))) {
            return true;
        }
        errorMessage = propertyName + " is mandatory";
    }
    errorMessage = propertyName + " is not boolean value or valid parameter";
    return false;
}

From source file:com.adaptris.core.services.UseXmlCharsetAsEncodingService.java

private static XMLInputFactory createInputFactory() {
    XMLInputFactory factory = XMLInputFactory.newFactory();
    factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, Boolean.FALSE);
    return factory;
}

From source file:com.chaosinmotion.securechat.server.json.SimpleReturnResult.java

/**
 * Add a boolean return value by key/*from  w  ww . j  a va2  s  .c om*/
 * @param key
 * @param value
 */
public void put(String key, boolean value) {
    data.put(key, value ? Boolean.TRUE : Boolean.FALSE);
}

From source file:com.inkubator.hrm.web.loan.LoanNewSchemaListOfTypeFormController.java

@PostConstruct
@Override//from w  w w . j  a v  a  2s .c  om
public void initialization() {
    super.initialization();
    try {
        model = new LoanNewSchemaListOfTypeModel();
        loanNewSchemaId = FacesUtil.getRequestParameter("loanNewSchemaId");
        id = FacesUtil.getRequestParameter("id");
        isUpdate = Boolean.FALSE;
        dropDownSchemeType = new HashMap<String, Long>();
        if (StringUtils.isNotEmpty(id)) {
            LoanNewSchemaListOfType loanNewSchemaListOfType = loanNewSchemaListOfTypeService
                    .getEntityByIdWithDetail(Long.valueOf(id));
            if (loanNewSchemaListOfType != null) {
                isUpdate = Boolean.TRUE;
                model = getModelFromEntity(loanNewSchemaListOfType);
            }
        } else {
            model.setIsActive(Boolean.TRUE);
        }

        listLoanNewType = loanNewTypeService.getAllData();
        for (LoanNewType loanNewType : listLoanNewType) {
            dropDownSchemeType.put(loanNewType.getLoanTypeName(), loanNewType.getId());
        }
    } catch (Exception e) {
        LOGGER.error("Error", e);
    }
}

From source file:airlift.util.AirliftUtil.java

/**
 * Creates the bean utils bean./*from w  ww .  j a  v  a2 s. com*/
 *
 * @param _allowedDateTimePatterns the _allowed date time patterns
 * @param _timeZone the _time zone
 * @return BeansUtilsBean
 */
public static org.apache.commons.beanutils.BeanUtilsBean createBeanUtilsBean(String[] _allowedDateTimePatterns,
        java.util.TimeZone _timeZone) {
    org.apache.commons.beanutils.converters.SqlDateConverter sqlDateConverter = new org.apache.commons.beanutils.converters.SqlDateConverter();
    sqlDateConverter.setPatterns(_allowedDateTimePatterns);
    sqlDateConverter.setTimeZone(_timeZone);

    org.apache.commons.beanutils.converters.DateConverter dateConverter = new org.apache.commons.beanutils.converters.DateConverter();
    dateConverter.setPatterns(_allowedDateTimePatterns);
    dateConverter.setTimeZone(_timeZone);

    org.apache.commons.beanutils.converters.SqlTimestampConverter sqlTimestampConverter = new org.apache.commons.beanutils.converters.SqlTimestampConverter();
    sqlTimestampConverter.setPatterns(_allowedDateTimePatterns);
    sqlTimestampConverter.setTimeZone(_timeZone);

    //registering "" (empty string) as a true value to support checkboxes with
    //the value attribute not being set.  Setting the value
    //atrribute wil make the value visible on the form.  This may
    //not be desired for a simple yes-no option hence the need to
    //register "" as true.
    String[] trueStrings = { "yes", "y", "true", "on", "1", "" };
    String[] falseStrings = { "no", "n", "false", "off", "0" };
    org.apache.commons.beanutils.converters.BooleanConverter booleanConverter = new org.apache.commons.beanutils.converters.BooleanConverter(
            trueStrings, falseStrings, Boolean.FALSE);

    org.apache.commons.beanutils.ConvertUtilsBean convertUtilsBean = new org.apache.commons.beanutils.ConvertUtilsBean();
    convertUtilsBean.register(sqlDateConverter, java.sql.Date.class);
    convertUtilsBean.register(dateConverter, java.util.Date.class);
    convertUtilsBean.register(sqlTimestampConverter, java.sql.Timestamp.class);
    convertUtilsBean.register(booleanConverter, Boolean.class);
    convertUtilsBean.register(booleanConverter, Boolean.TYPE);

    return new org.apache.commons.beanutils.BeanUtilsBean(convertUtilsBean);
}

From source file:cz.fi.muni.pa165.dto.PrintedBookDAOTest.java

@DirtiesContext
@BeforeMethod/* w w  w . j av  a 2 s  .  co  m*/
public void setup() {

    em = emf.createEntityManager();
    em.getTransaction().begin();

    Book book = new Book();
    book.setName("Harry Potter");
    book.setISBN("123112315");
    book.setDescription("Book about Wizard!");
    book.setAuthors("J.K. Rowling");
    book.setDepartment(Department.Sport);

    em.persist(book);
    em.getTransaction().commit();

    em.getTransaction().begin();

    PrintedBook pb1 = new PrintedBook();
    pb1.setBook(book);
    pb1.setCondition(Condition.Used);
    pb1.setState(Boolean.FALSE);

    PrintedBook pb2 = new PrintedBook();
    pb2.setBook(book);
    pb2.setCondition(Condition.Used);
    pb2.setState(Boolean.TRUE);

    Loan l = new Loan();
    l.setReturned(false);
    l.setToDate(new Date());
    l.setFromDate(new Date());
    l.setDateReturned(new Date());
    pb2.setLoan(l);

    em.persist(l);
    em.persist(pb1);
    em.persist(pb2);
    em.getTransaction().commit();
    em.close();
}