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:cn.vlabs.duckling.vwb.ui.rsi.profile.SiteDomainService.java

public Object isDomainUsed(RestSession session, Object message) throws ServiceException {
    DomainRequestItem request = (DomainRequestItem) message;
    if (StringUtils.isEmpty(request.getDomain())) {
        return Boolean.FALSE;
    }//from   w ww  .  j  av  a  2  s.  c  o  m
    VWBContainer container = VWBContainerImpl.findContainer();
    if (container.getDomainService().isDomainUsed(request.getDomain())) {
        return Boolean.TRUE;
    } else {
        return Boolean.FALSE;
    }
}

From source file:in.rishikeshdarandale.rest.redis.repository.cart.CartRepository.java

@Override
public Boolean exists(String key) {
    return null != redisTemplate.opsForValue().get(key) ? Boolean.TRUE : Boolean.FALSE;
}

From source file:BasicDnD.java

public static void main(String[] args) {
    // Schedule a job for the event-dispatching thread:
    // creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            // Turn off metal's use of bold fonts
            UIManager.put("swing.boldMetal", Boolean.FALSE);
            createAndShowGUI();//from w w w.java 2s.c  om
        }
    });
}

From source file:rmblworx.tools.timey.persistence.dao.AlarmDao.java

@Override
@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
public Boolean createAlarm(final AlarmDescriptor descriptor) {
    Boolean result = Boolean.FALSE;
    if (descriptor != null) {
        try {/*from   w w  w  . j  a v  a 2s  . co  m*/
            final AlarmEntity entity = new AlarmEntity();
            final Timestamp timestamp = new Timestamp(descriptor.getAlarmtime().getMilliSeconds());
            final String sound = descriptor.getSound();
            Timestamp snooze = null;
            if (descriptor.getSnooze() != null) {
                snooze = new Timestamp(descriptor.getSnooze().getMilliSeconds());
            }
            entity.setAlarm(timestamp);
            entity.setIsActivated(descriptor.getIsActive());
            entity.setDescription(descriptor.getDescription());
            entity.setSnooze(snooze);
            entity.setSound(sound);
            this.currentSession().save(entity);
            result = Boolean.TRUE;
        } catch (final Exception e) {
            this.logError(e);
        }
    }
    // TODO: Noch umzusetzen : Jeder Zeitpunkt darf nur von einem Alarm beschrieben und persistent sein
    return result;
}

From source file:io.svectors.hbase.parser.JsonEventParser.java

/**
 * default c.tor/* w w  w  . j a v  a 2 s . c  o  m*/
 */
public JsonEventParser() {
    this.keyConverter = new JsonConverter();
    this.valueConverter = new JsonConverter();

    Map<String, String> props = new HashMap<>(1);
    props.put("schemas.enable", Boolean.FALSE.toString());

    this.keyConverter.configure(props, true);
    this.valueConverter.configure(props, false);

}

From source file:com.google.step2.example.provider.GuiceModule.java

@Override
protected void configure() {

    try {/*from   www.  j a v  a2  s  .  com*/
        Message.addExtensionFactory(AxMessage2.class);
    } catch (MessageException e) {
        throw new CreationException(null);
    }

    try {
        Message.addExtensionFactory(HybridOauthMessage.class);
    } catch (MessageException e) {
        throw new CreationException(null);
    }

    bind(ConsumerAssociationStore.class).to(InMemoryConsumerAssociationStore.class).in(Scopes.SINGLETON);

    bind(ConsumerManager.class).toProvider(ConsumerManagerProvider.class).in(Scopes.SINGLETON);

    bind(HttpClient.class).toInstance(
            HttpClientFactory.getInstance(0, Boolean.FALSE, 10000, 10000, CookiePolicy.IGNORE_COOKIES));
}

From source file:com.nec.harvest.service.impl.CashServiceImpl.java

/** {@inheritDoc} */
@Override// w  ww  . j a v a 2  s  . c om
public boolean updateCashByOrgCodeAndDate(Session session, User user, JSONCash jSONCash, String monthly)
        throws ServiceException {
    if (user == null) {
        throw new IllegalArgumentException("user object must not be null or empty");
    }
    if (jSONCash == null) {
        throw new IllegalArgumentException("jSONCash must not be null or empty");
    }
    if (monthly == null) {
        throw new IllegalArgumentException("monthly must not be null or empty");
    }

    boolean isUpdated = Boolean.FALSE;
    try {
        Query query = repository.getNamedQuery(session, SqlConstants.SQL_UPDATE_CASH_BY_ORGANIZATION_AND_MONTH);
        query.setDouble("syokenHanbai", jSONCash.getSyokenHanbai());
        query.setDouble("prepaidHanbai", jSONCash.getPrepaidHanbai());
        query.setDouble("sonotaAzukari", jSONCash.getSonotaAzukari());
        query.setDouble("urikakeKaisyu", jSONCash.getUrikakeKaisyu());
        query.setDouble("kabusoku", jSONCash.getKabusoku());
        query.setDouble("soukingaku", jSONCash.getSoukingaku());
        query.setString("rem", jSONCash.getRem());

        // Logged-in user's code
        String userCode = user.getUsrCode();
        query.setString("tanCode", userCode);
        query.setString("APInf2", userCode);
        query.setString("stfCodeU", userCode);

        String version = null;
        try {
            Version productVersion = ProductHelper.getProductInfor();
            if (productVersion != null) {
                version = productVersion.getProjectVersion();
            }
        } catch (IOException ex) {
            // TODO
        }
        query.setString("prdNoU", version);
        query.setInteger("updNo", jSONCash.getUpdNo() + 1);
        query.setString("strCode", user.getOrganization().getStrCode());
        query.setString("getSudo", monthly);
        query.setDate("srDate", jSONCash.getSrDate());

        // Updating the record by using SQL for given changed information
        int numberOfRecordUpdated = query.executeUpdate();
        isUpdated = numberOfRecordUpdated > 0;
    } catch (HibernateException ex) {
        throw new ServiceException("An exception occured while update cash data ", ex);
    }
    return isUpdated;
}

From source file:com.acc.storefront.controllers.pages.SearchPageControllerUnitTest.java

@Test
public void testPagedDataFlagsCallShowAllOver100ResultsOneDefaultPage() {

    BDDMockito.given(Integer.valueOf(searchPageData.getPagination().getNumberOfPages()))
            .willReturn(Integer.valueOf(2));
    BDDMockito.given(Long.valueOf(searchPageData.getPagination().getTotalNumberOfResults()))
            .willReturn(Long.valueOf(AbstractSearchPageController.MAX_PAGE_LIMIT + 1));
    BDDMockito.given(Integer.valueOf(searchPageData.getPagination().getPageSize()))
            .willReturn(Integer.valueOf(DEFAULT_PAGE_SIZE));

    controller.populateModel(model, searchPageData, ShowMode.Page);

    Mockito.verify(model).addAttribute("searchPageData", searchPageData);
    Mockito.verify(model).addAttribute("isShowAllAllowed", Boolean.FALSE);
    Mockito.verify(model).addAttribute("isShowPageAllowed", Boolean.FALSE);
}

From source file:com.haulmont.cuba.gui.app.security.user.changepassw.ChangePasswordDialog.java

@Override
public void init(Map<String, Object> params) {
    super.init(params);

    getDialogOptions().setWidthAuto();//from ww  w  .j a va  2  s  .c  o  m

    Boolean cancelEnabled = (Boolean) params.get("cancelEnabled");
    if (Boolean.FALSE.equals(cancelEnabled)) {
        this.cancelEnabled = false;
    }

    Boolean currentPasswordRequired = (Boolean) params.get("currentPasswordRequired");
    if (Boolean.TRUE.equals(currentPasswordRequired)) {
        currentPasswordField.setVisible(true);
        currentPasswordLabel.setVisible(true);

        this.currentPasswordRequired = true;
    }

    addAction(new AbstractAction("windowCommit", clientConfig.getCommitShortcut()) {
        @Override
        public void actionPerform(Component component) {
            changePassword();
        }
    });
}

From source file:com.efficio.fieldbook.web.nursery.controller.GermplasmTreeController.java

/**
 * Load initial germplasm tree./* w  w  w .j  ava  2  s  .  c  o m*/
 *
 * @return the string
 */
@ResponseBody
@RequestMapping(value = "/loadInitGermplasmTree", method = RequestMethod.GET)
public String loadInitialGermplasmTree() {

    try {
        List<TreeNode> rootNodes = new ArrayList<TreeNode>();
        rootNodes.add(new TreeNode("LOCAL", AppConstants.GERMPLASM_LIST_LOCAL.getString(), true, "lead",
                Boolean.FALSE));
        rootNodes.add(new TreeNode("CENTRAL", AppConstants.GERMPLASM_LIST_CENTRAL.getString(), true, "lead",
                Boolean.FALSE));
        return TreeViewUtil.convertTreeViewToJson(rootNodes);

    } catch (Exception e) {
        LOG.error(e.getMessage(), e);
    }

    return "[]";
}