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:uk.org.rbc1b.roms.db.project.HibernateProjectAvailabilityDao.java

@SuppressWarnings("unchecked")
@Override//from   w w  w.  j a  v a 2  s.c  o m
public List<ProjectAvailability> findUnconfirmedVolunteers() {
    Criteria criteria = this.sessionFactory.getCurrentSession().createCriteria(ProjectAvailability.class);
    criteria.add(Restrictions.eq("personResponded", Boolean.TRUE));
    criteria.add(Restrictions.eq("overseerConfirmed", Boolean.TRUE));
    criteria.add(Restrictions.eq("confirmationEmail", Boolean.FALSE));

    return criteria.list();
}

From source file:com.github.veithen.ulog.MetaFactory.java

private static boolean isLog4jAvailable() {
    if (log4jAvailable == null) {
        try {//w  ww .j av  a 2s.c om
            MetaFactory.class.getClassLoader().loadClass("org.apache.log4j.Logger");
            log4jAvailable = Boolean.TRUE;
        } catch (ClassNotFoundException ex) {
            log4jAvailable = Boolean.FALSE;
        }
    }
    return log4jAvailable.booleanValue();
}

From source file:com.solace.labs.spring.boot.autoconfigure.SolaceJavaAutoConfigurationTest.java

@Test
public void defaultNativeConnectionFactory() throws InvalidPropertiesException {
    load(EmptyConfiguration.class, "");
    SpringJCSMPFactory jcsmpFactory = this.context.getBean(SpringJCSMPFactory.class);
    JCSMPSession session = jcsmpFactory.createSession();

    assertEquals("localhost", (String) session.getProperty(JCSMPProperties.HOST));
    assertEquals("default", (String) session.getProperty(JCSMPProperties.VPN_NAME));
    assertEquals("spring-default-client-username", (String) session.getProperty(JCSMPProperties.USERNAME));
    assertEquals("", (String) session.getProperty(JCSMPProperties.PASSWORD));
    assertEquals(JCSMPProperties.SUPPORTED_MESSAGE_ACK_AUTO,
            (String) session.getProperty(JCSMPProperties.MESSAGE_ACK_MODE));
    assertEquals(Boolean.FALSE, (Boolean) session.getProperty(JCSMPProperties.REAPPLY_SUBSCRIPTIONS));
    assertNotNull((String) session.getProperty(JCSMPProperties.CLIENT_NAME));
    // Channel properties
    JCSMPChannelProperties cp = (JCSMPChannelProperties) session
            .getProperty(JCSMPProperties.CLIENT_CHANNEL_PROPERTIES);
    assertEquals(1, (int) cp.getConnectRetries());
    assertEquals(5, (int) cp.getReconnectRetries());
    assertEquals(20, (int) cp.getConnectRetriesPerHost());
    assertEquals(3000, (int) cp.getReconnectRetryWaitInMillis());
}

From source file:com.redhat.rhn.manager.kickstart.KickstartSessionCreateCommand.java

/**
 * Constructor//  ww  w .  j ava 2  s  . c  o  m
 * @param owner who creates the session
 * @param ksdata KickstartData profile used for this session
 * @param clientIp Client IP of the kickstarting system.
 */
public KickstartSessionCreateCommand(Org owner, KickstartData ksdata, String clientIp) {
    this.ksession = new KickstartSession();
    this.ksession.setKickstartMode(KickstartSession.MODE_DEFAULT_SESSION);
    this.ksession.setOrg(owner);
    this.ksession.setDeployConfigs(Boolean.FALSE);
    this.ksession.setPackageFetchCount(new Long(0));
    this.ksession.setKsdata(ksdata);
    this.ksession.setVirtualizationType(ksdata.getKickstartDefaults().getVirtualizationType());
    this.ksession.setKstree(ksdata.getTree());
    this.ksession.setLastAction(new Date());
    this.ksession.setState(KickstartFactory.SESSION_STATE_CREATED);
    this.ksession.setClientIp(clientIp);
    log.debug("serverProfile on ksdata: " + ksdata.getKickstartDefaults().getProfile());
    if (ksdata.getKickstartDefaults().getProfile() != null) {
        Profile p = ProfileManager.lookupByIdAndOrg(ksdata.getKickstartDefaults().getProfile().getId(), owner);
        log.debug("setting serverProfile on session: " + p.getId());
        this.ksession.setServerProfile(p);
    }

    log.debug("Saving new KickstartSession: " + this.ksession.getId());
    KickstartFactory.saveKickstartSession(this.ksession);
    log.debug("Saved new KickstartSession: " + this.ksession.getId());

    // Now create one time ActivationKey
    User user = UserFactory.findRandomOrgAdmin(owner);
    log.debug("Got random orgadmin: " + user.getLogin());
    String note = LocalizationService.getInstance().getMessage("kickstart.session.newtokennote", " ");

    Channel toolsChannel = KickstartScheduleCommand.getToolsChannel(ksdata, user, null);
    log.debug("creating one-time-activation key: " + user.getLogin());
    ActivationKey key = KickstartScheduleCommand.createKickstartActivationKey(user, ksdata, null, this.ksession,
            toolsChannel, BooleanUtils.toBoolean(ksdata.getKickstartDefaults().getCfgManagementFlag()), null,
            note);
    log.debug("added key: " + key.getKey());

    // Need to add child channels to the key so when kickstarting the
    // system from bare metal we will have the proper child channel subscriptions.
    if (ksdata.getKickstartDefaults().getProfile() != null) {
        log.debug("Checking child channels for packages in profile.");
        addChildChannelsForProfile(ksdata.getKickstartDefaults().getProfile(), ksdata.getChannel(), key);
    }
}

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

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

    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:org.geowebcache.diskquota.DiskQuotaConfig.java

public void setDefaults() {
    if (enabled == null) {
        enabled = Boolean.FALSE;
    }//from   w w  w . j ava  2  s . c o  m
    if (diskBlockSize == null) {
        diskBlockSize = DEFAULT_DISK_BLOCK_SIZE;
    }
    if (cacheCleanUpFrequency == null) {
        cacheCleanUpFrequency = DEFAULT_CLEANUP_FREQUENCY;
    }

    if (maxConcurrentCleanUps == null) {
        maxConcurrentCleanUps = DEFAULT_MAX_CONCURRENT_CLEANUPS;
    }
    if (cacheCleanUpUnits == null) {
        cacheCleanUpUnits = DEFAULT_CLEANUP_UNITS;
    }
    if (globalExpirationPolicyName == null) {
        globalExpirationPolicyName = DEFAULT_GLOBAL_POLICY_NAME;
    }
    if (globalQuota == null) {
        globalQuota = new Quota(500, StorageUnit.MiB);
    }
    if (quotaStore == null) {
        quotaStore = "bdb";
    }
}

From source file:com.cloudhopper.sxmp.SxmpSender.java

static public Response send(String url, Request request, boolean shouldParseResponse)
        throws UnsupportedEncodingException, SxmpErrorException, IOException, SxmpParsingException,
        SAXException, ParserConfigurationException {
    // convert request into xml
    String requestXml = SxmpWriter.createString(request);
    String responseXml = null;//from  ww w.j a  va2 s  .  c  om

    HttpClient client = new DefaultHttpClient();
    client.getParams().setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1);
    client.getParams().setParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, Boolean.FALSE);

    long start = System.currentTimeMillis();
    long stop = 0;

    logger.debug("Request XML:\n" + requestXml);

    // execute request
    try {
        HttpPost post = new HttpPost(url);
        StringEntity entity = new StringEntity(requestXml);
        // write old or new encoding?
        if (request.getVersion().equals(SxmpParser.VERSION_1_1)) {
            // v1.1 is utf-8
            entity.setContentType("text/xml; charset=\"utf-8\"");
        } else {
            // v1.0 was 8859-1, though that's technically wrong
            // unspecified XML must be encoded in UTF-8
            // maintained this way for backward compatibility
            entity.setContentType("text/xml; charset=\"iso-8859-1\"");
        }
        post.setEntity(entity);

        ResponseHandler<String> responseHandler = new BasicResponseHandler();

        // execute request (will throw exception if fails)
        responseXml = client.execute(post, responseHandler);

        stop = System.currentTimeMillis();
    } finally {
        // clean up all resources
        client.getConnectionManager().shutdown();
    }

    logger.debug("Response XML:\n" + responseXml);
    logger.debug("Response Time: " + (stop - start) + " ms");

    // deliver responses sometimes aren't parseable since its acceptable
    // for delivery responses to merely return "OK" and an HTTP 200 error
    if (!shouldParseResponse) {
        return null;
    } else {
        // convert response xml into an object
        SxmpParser parser = new SxmpParser(SxmpParser.VERSION_1_0);
        // v1.0 data remains in ISO-8859-1, and responses are v1.0
        ByteArrayInputStream bais = new ByteArrayInputStream(responseXml.getBytes("ISO-8859-1"));
        Operation op = parser.parse(bais);

        if (!(op instanceof Response)) {
            throw new SxmpErrorException(SxmpErrorCode.OPTYPE_MISMATCH,
                    "Unexpected response class type parsed");
        }

        return (Response) op;
    }
}

From source file:com.tapas.evidence.repository.TeacherRepositoryImpl.java

@Override
@SuppressWarnings("unchecked")
public List<Teacher> findByKindergartenId(final Long kindergarteId) {
    final Long tenantId = ((EvidenceUserDetails) SecurityContextHolder.getContext().getAuthentication()
            .getPrincipal()).getTenantId();
    Query query = this.entityManager
            .createNamedQuery(Teacher.QUERY_NAME_FIND_BY_KINDERGARTEN_ID_AND_DELETED_FLAG);
    query.setParameter("kindergartenId", kindergarteId);
    query.setParameter("deleted", Boolean.FALSE);
    query.setParameter("tenantId", tenantId);
    return query.getResultList();
}

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

public Boolean checkPassword(Usuario usuario) {
    Boolean password = Boolean.FALSE;
    Usuario user = this.findByUsername(usuario);
    if (user.getId() != null) {
        String inputPasswordUser = DigestUtils.md5Hex(usuario.getPassword());
        if (user.getPassword().equals(inputPasswordUser)) {
            password = Boolean.TRUE;
        }/*from w  w w . j  ava 2  s.c om*/
    }
    return password;
}