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.tapas.evidence.fe.menu.MenuPresenter.java

@Override
public void bind() {
    final Tree tree = this.view.getTree();
    addEntry(tree, null, Boolean.FALSE, this.getMessage("menu.kindergarten", this.getLocale()),
            KindergartenPresenter.class);
    addEntry(tree, null, Boolean.FALSE, this.getMessage("menu.teacher", this.getLocale()),
            TeacherPresenter.class);
    addEntry(tree, null, Boolean.FALSE, this.getMessage("menu.responsible", this.getLocale()),
            ResponsiblePersonPresenter.class);
    addEntry(tree, null, Boolean.FALSE, this.getMessage("menu.child", this.getLocale()), ChildPresenter.class);
}

From source file:com.apache.kafka.connect.solr.converter.SolrJsonDocConverter.java

public SolrJsonDocConverter() {

    valueConverter = new JsonConverter();
    keyConverter = new JsonConverter();

    mapper = new ObjectMapper();
    reader = mapper.reader();//  w  ww. ja va2s. c o m

    Map<String, String> props = new HashMap<String, String>();
    props.put("schemas.enable", Boolean.FALSE.toString());
    valueConverter.configure(props, false);
    keyConverter.configure(props, true);

}

From source file:fr.itldev.koya.webscript.user.GetByAuthKey.java

@Override
public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException {
    Map<String, Object> jsonMap = KoyaWebscript.getJsonMap(req);

    String authKey = (String) jsonMap.get("authKey");
    Boolean failProof = Boolean.FALSE;

    try {/*  ww w  .  j a v  a 2  s . c om*/
        failProof = Boolean.valueOf(jsonMap.get("failProof").toString());
    } catch (NullPointerException ex) {

    }
    String response = "";

    try {
        response = KoyaWebscript.getObjectAsJson(userService.getUser(authKey));
    } catch (KoyaServiceException ex) {
        if (!failProof) {
            throw new WebScriptException("KoyaError : " + ex.getErrorCode().toString());
        }
    }
    res.setContentType("application/json");
    res.getWriter().write(response);
}

From source file:com.zanshang.services.author.AuthorFilledActor.java

@Override
public void onReceive(Object o) throws Exception {
    //o is uid/*  w  ww.  j a  v  a 2  s.c  om*/
    Future<Object> askPerson = Patterns.ask(personActor, o.toString(), ActorConstant.DEFAULT_TIMEOUT);
    ActorRef sender = getSender();
    final ActorRef self = getSelf();
    askPerson.onSuccess(new OnSuccess<Object>() {
        @Override
        public void onSuccess(Object personInformation) throws Throwable {
            if (personInformation != null) {
                Person information = (Person) personInformation;
                if (StringUtils.isEmpty(information.getIdentityCode())
                        || StringUtils.isEmpty(information.getIdentityFront())
                        || StringUtils.isEmpty(information.getIdentityBack())
                        || StringUtils.isEmpty(information.getLegalName())) {
                    sender.tell(Boolean.FALSE, self);
                } else {
                    sender.tell(Boolean.TRUE, self);
                }
            } else {
                Future<Object> askCompany = Patterns.ask(companyActor, o.toString(),
                        ActorConstant.DEFAULT_TIMEOUT);
                askCompany.onSuccess(new OnSuccess<Object>() {
                    @Override
                    public void onSuccess(Object companyInformation) throws Throwable {
                        if (companyInformation != null) {
                            Company information = (Company) companyInformation;
                            if (StringUtils.isEmpty(information.getCompanyCode())
                                    || StringUtils.isEmpty(information.getLicense())
                                    || StringUtils.isEmpty(information.getContactPhone())) {
                                sender.tell(Boolean.FALSE, self);
                            } else {
                                sender.tell(Boolean.TRUE, self);
                            }
                        } else {
                            Exception exception = new Exception("Found user neither has Person information nor "
                                    + "Company " + "information:" + o);
                            sender.tell(new Status.Failure(exception), self);
                            throw exception;
                        }
                    }
                }, getContext().dispatcher());
            }
        }
    }, getContext().dispatcher());
}

From source file:cz.strmik.cmmitool.web.controller.OrganizationController.java

@RequestMapping(method = RequestMethod.GET, value = "/edit-{orgId}.do")
public String setupFormEdit(@PathVariable("orgId") Long orgId, ModelMap model) {
    if (!model.containsAttribute("org")) {
        Organization org = organizationDao.read(orgId);
        model.addAttribute("org", org);
        model.addAttribute("create", Boolean.FALSE);
    }//from  www.j ava  2  s.  c o m
    return ORG_FORM;
}

From source file:com.aurel.track.fieldType.fieldChange.converter.BooleanSetterConverter.java

/**
 * Convert the string to object value after load
 * @param value/*from   w ww. ja  v  a2  s  .  c  o  m*/
 * @param setter
 * @return
 */
@Override
public Object getActualValueFromStoredString(String value, Integer setter) {
    if (value == null || value.trim().length() == 0) {
        return null;
    } else {
        try {
            return Boolean.valueOf(value);
        } catch (Exception e) {
            LOGGER.warn("Converting the " + value + " to Boolean failed with " + e.getMessage());
            LOGGER.debug(ExceptionUtils.getStackTrace(e));
            return Boolean.FALSE;
        }
    }
}

From source file:com.gnip.test.YoutubeEDCAsActivityTest.java

@Test
@Ignore/* w w w  .ja v a 2 s  . co  m*/
public void Tests() throws Exception {
    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);

    InputStream is = YoutubeEDCAsActivityTest.class.getResourceAsStream("/YoutubeEDC.xml");
    if (is == null)
        System.out.println("null");
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    XmlMapper 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);

    ObjectMapper jsonMapper = new ObjectMapper();

    try {
        while (br.ready()) {
            String line = br.readLine();
            //LOGGER.debug(line);

            Object activityObject = xmlMapper.readValue(line, Object.class);

            String jsonString = jsonMapper.writeValueAsString(activityObject);

            JSONObject jsonObject = new JSONObject(jsonString);

            JSONObject fixedObject = GnipActivityFixer.fix(jsonObject);

            Activity activity = jsonMapper.readValue(fixedObject.toString(), Activity.class);

            //LOGGER.debug(des);
        }
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail();
    }
}

From source file:com.moviejukebox.scanner.artwork.FanartTvScanner.java

public FanartTvScanner(ArtworkType fanartTvArtworkType) {
    super(fanartTvArtworkType);

    setOverwrite();/*from ww w.  j a  v  a2  s . c  o  m*/
    setDownloadByType();

    if (PropertiesUtil.getBooleanProperty("scanner." + artworkTypeName + ".debug", Boolean.FALSE)) {
        debugOutput();
    }
}

From source file:com.innovaciones.reporte.service.RepuestoModeloServiceImpl.java

@Override
@Transactional// w  w w.  j  av a  2  s.  c  o  m
public List<RepuestoModelo> addRepuestosModelo(Modelo modelo, List<RepuestoModelo> repuestoModelos) {

    for (RepuestoModelo repuestoModelo : repuestoModelos) {
        repuestoModelo.setIdModelo(new Modelo());
        repuestoModelo.setIdModelo(modelo);
    }

    List<RepuestoModelo> busquedaRepuestoModelos = getRepuestoModeloByIdModeloInterno(modelo.getId());

    //VERIFICA ELIMINACIONES 
    for (RepuestoModelo busqueda : busquedaRepuestoModelos) {

        Boolean existe = Boolean.FALSE;

        RepuestoModelo repuestoModeloEncontrado = null;

        for (RepuestoModelo repuestoModelo : repuestoModelos) {

            if (busqueda.getIdModelo().getId().equals(repuestoModelo.getIdModelo().getId())
                    && busqueda.getIdDetalleCatalogoReporte().getId()
                            .equals(repuestoModelo.getIdDetalleCatalogoReporte().getId())) {
                existe = Boolean.TRUE;
                repuestoModeloEncontrado = repuestoModelo;
                break;
            }
        }

        if (!existe) {
            busqueda.setEstado(EstadosEnum.INACTIVO.getValue());
            repuestoModeloDAO.addRepuestoModelo(busqueda);
            // repuestoModeloDAO.deleteRepuestoModelo(busqueda);
        } else {
            busqueda.setEstado(EstadosEnum.ACTIVO.getValue());
            repuestoModeloDAO.addRepuestoModelo(busqueda);
            repuestoModelos.remove(repuestoModeloEncontrado);
        }
    }

    //VERIFICA ADICIONES
    for (RepuestoModelo repuestoModelo : repuestoModelos) {
        repuestoModeloDAO.addRepuestoModelo(repuestoModelo);
    }

    //        if (!repuestoModelos.isEmpty()) {
    //
    //            List<RepuestoModelo> busquedaRepuestoModelos = getRepuestoModeloByIdModelo(modelo.getId());
    //            if (!busquedaRepuestoModelos.isEmpty()) {
    //
    //                for (RepuestoModelo repuestoModelo : repuestoModelos) {
    //
    //                    Boolean existe = Boolean.FALSE;
    //                    for (RepuestoModelo busqueda : busquedaRepuestoModelos) {
    //
    //                        if (busqueda.getIdModelo().getId().equals(repuestoModelo.getIdModelo().getId())
    //                                && busqueda.getIdRepuesto().getId().equals(repuestoModelo.getIdRepuesto().getId())) {
    //                            existe = Boolean.TRUE;
    //                            break;
    //                        }
    //                    }
    //                    if (!existe) {
    //                        repuestoModeloDAO.deleteRepuestoModelo(repuestoModelo);
    //                    } else {
    //                        repuestoModeloDAO.addRepuestoModelo(repuestoModelo);
    //                    }
    //                }
    //
    //                repuestoModelos = getRepuestoModeloByIdModelo(repuestoModelos.get(0).getIdModelo().getId());
    //
    //            } else {
    //                for (RepuestoModelo repuestoModelo : repuestoModelos) {
    //                    repuestoModeloDAO.addRepuestoModelo(repuestoModelo);
    //                }
    //            }
    //
    //        }
    return repuestoModelos;
}

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;
    }/* www.j  a  v a 2  s.  c  o m*/
}