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.organisation.DivisiFormController.java

@PostConstruct
@Override//from  w w w  . j a va 2s .c  o  m
public void initialization() {
    super.initialization();
    try {
        String divisiId = FacesUtil.getRequestParameter("divisiId");
        model = new DivisiModel();
        isUpdate = Boolean.FALSE;
        if (StringUtils.isNotEmpty(divisiId)) {
            Divisi divisi = service.getEntiyByPK(Long.parseLong(divisiId));
            if (divisiId != null) {
                model = getModelFromEntity(divisi);
                isUpdate = Boolean.TRUE;
            }
        }
        doSelectOneMenuDepartment();
    } catch (Exception e) {
        LOGGER.error("error", e);
    }
}

From source file:ch.ralscha.extdirectspring.filter.BooleanFilterTest.java

@Test
public void testBooleanFilter() {
    Map<String, Object> json = new HashMap<String, Object>();
    json.put("field", "aField");
    json.put("type", "boolean");
    json.put("value", Boolean.FALSE);

    Filter filter = Filter.createFilter(json, genericConversionService);
    assertThat(filter).isInstanceOf(BooleanFilter.class);
    BooleanFilter booleanFilter = (BooleanFilter) filter;
    assertThat(booleanFilter.getField()).isEqualTo("aField");
    assertThat(booleanFilter.getValue()).isEqualTo(false);
}

From source file:org.apache.streams.gnip.flickr.test.FlickrEDCAsActivityTest.java

@Ignore
@Test/*from  ww  w .ja  va  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 = FlickrEDCAsActivityTest.class.getResourceAsStream("/FlickrEDC.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 = null;
            try {
                activity = jsonMapper.readValue(fixedObject.toString(), Activity.class);
            } catch (Exception e) {
                LOGGER.error(jsonObject.toString());
                LOGGER.error(fixedObject.toString());
                e.printStackTrace();
                Assert.fail();
            }
            //LOGGER.debug(des);
        }
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail();
    }
}

From source file:cn.guoyukun.spring.jpa.plugin.web.controller.BaseMovableController.java

@RequestMapping(value = "{fromId}/{toId}/up")
@ResponseBody//from  ww w  .  ja  v  a 2 s. c o m
public AjaxResponse up(@PathVariable("fromId") ID fromId, @PathVariable("toId") ID toId) {

    if (this.permissionList != null) {
        this.permissionList.assertHasEditPermission();
    }

    AjaxResponse ajaxResponse = new AjaxResponse("??");
    try {
        getMovableService().up(fromId, toId);
    } catch (IllegalStateException e) {
        ajaxResponse.setSuccess(Boolean.FALSE);
        ajaxResponse.setMessage(MessageUtils.message("move.not.enough"));
    }
    return ajaxResponse;
}

From source file:it.geosolutions.geoserver.jms.events.ToggleSwitch.java

public void disable() {
    if (isToggleEnabled()) {
        ctx.publishEvent(new ToggleEvent(Boolean.FALSE, toggleType));
    }
}

From source file:org.simbasecurity.core.audit.provider.DatabaseAuditLogProviderTest.java

@Test
public void auditEventIsPersisted_digestNotEnabled() {
    when(configurationServiceMock.getValue(ConfigurationParameter.AUDIT_LOG_INTEGRITY_ENABLED))
            .thenReturn(Boolean.FALSE);

    SSOToken ssoToken = new SSOToken();
    AuditLogEvent event = new AuditLogEvent(AuditLogEventCategory.SESSION, "username", ssoToken, "remoteIP",
            "message", "userAgent", "hostServerName", "surname", "firstname", "requestURL", "CHAINID");
    provider.log(event);/*www .j  ava  2 s  . c om*/

    jdbcTemplate.query("SELECT * FROM SIMBA_AUDIT_LOG WHERE ssoToken=?", getRowMapper(true),
            ssoToken.getToken());
}

From source file:com.betel.flowers.service.UsuarioService.java

public Boolean existsUsername(Usuario usuario) {
    Boolean find = Boolean.FALSE;
    Usuario user = this.findByUsername(usuario);
    if (user.getId() != null) {
        find = Boolean.TRUE;/*from   w w w  .java2s.c  o  m*/
    }
    return find;
}

From source file:org.jdal.aop.SerializableProxyUtils.java

public static BeanDefinitionHolder createSerializableProxy(BeanDefinitionHolder definition,
        BeanDefinitionRegistry registry, boolean proxyTargetClass) {

    String originalBeanName = definition.getBeanName();
    BeanDefinition targetDefinition = definition.getBeanDefinition();

    // Create a scoped proxy definition for the original bean name,
    // "hiding" the target bean in an internal target definition.
    RootBeanDefinition proxyDefinition = new RootBeanDefinition(SerializableProxyFactoryBean.class);
    proxyDefinition.setOriginatingBeanDefinition(definition.getBeanDefinition());
    proxyDefinition.setSource(definition.getSource());
    proxyDefinition.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);

    String targetBeanName = getTargetBeanName(originalBeanName);
    proxyDefinition.getPropertyValues().add("targetBeanName", targetBeanName);

    if (proxyTargetClass) {
        targetDefinition.setAttribute(AutoProxyUtils.PRESERVE_TARGET_CLASS_ATTRIBUTE, Boolean.TRUE);
    } else {//  w  w w  .ja va2s. c  om
        proxyDefinition.getPropertyValues().add("proxyTargetClass", Boolean.FALSE);
    }

    // Copy autowire settings from original bean definition.
    proxyDefinition.setAutowireCandidate(targetDefinition.isAutowireCandidate());
    proxyDefinition.setPrimary(targetDefinition.isPrimary());
    if (targetDefinition instanceof AbstractBeanDefinition) {
        proxyDefinition.copyQualifiersFrom((AbstractBeanDefinition) targetDefinition);
    }

    // Set singleton property of FactoryBean
    proxyDefinition.getPropertyValues().add("singleton", !targetDefinition.isPrototype());

    // The target bean should be ignored in favor of the scoped proxy.
    targetDefinition.setAutowireCandidate(false);
    targetDefinition.setPrimary(false);

    // Register the target bean as separate bean in the factory.
    registry.registerBeanDefinition(targetBeanName, targetDefinition);

    // Return the scoped proxy definition as primary bean definition
    // (potentially an inner bean).
    return new BeanDefinitionHolder(proxyDefinition, originalBeanName, definition.getAliases());
}

From source file:com.anhao.market.controller.AdminController.java

@RequestMapping("create.do")
public String createAdmin(HttpServletRequest request) {
    Admin admin = new Admin();
    String randomId = RandomStringUtils.randomNumeric(10);

    admin.setId(randomId);//from  w  w w .  j  a  v a 2 s .c  o m
    admin.setCreateDate(new Date());
    admin.setDepartment("");
    admin.setEmail("845885222@qq.com");
    admin.setIsEnabled(Boolean.TRUE);
    admin.setIsLocked(Boolean.FALSE);
    admin.setLockedDate(new Date());
    admin.setLoginDate(new Date());
    admin.setLoginFailureCount(0);
    admin.setLoginIp(randomId);

    admin.setModifyDate(new Date());
    admin.setName(RandomStringUtils.randomNumeric(5));
    admin.setPassword(RandomStringUtils.randomNumeric(5));
    admin.setUsername(RandomStringUtils.randomNumeric(8));
    adminService.create(admin);
    return "list";
}

From source file:org.zalando.baigan.TestEtcdConfigService.java

@Before
public void init() throws JsonMappingException, JsonGenerationException, IOException {

    final Condition<Boolean> condition = new Condition<Boolean>("appdomain", new Equals("1"), true);

    final Set<Condition<Boolean>> conditions = ImmutableSet.of(condition);
    configuration = new Configuration("express.feature.toggle", "Feature toggle", conditions, Boolean.FALSE);

    StringWriter writer = new StringWriter();
    mapper.writeValue(writer, configuration);
    buffer = writer.toString();/*from w w w. j  a  va2s  .co m*/
}