List of usage examples for java.lang Boolean FALSE
Boolean FALSE
To view the source code for java.lang Boolean FALSE.
Click Source Link
From source file:com.inkubator.hrm.web.organisation.KlasifikasiKerjaLevelFormController.java
@PostConstruct @Override/*from ww w . j av a 2 s .c o m*/ public void initialization() { super.initialization(); try { String klasifikasiKerjaLevelId = FacesUtil.getRequestParameter("klasifikasiKerjaLevelId"); model = new KlasifikasiKerjaLevelModel(); klasifikasiKerjaList = klasifikasiKerjaService.getAllData(); isUpdate = Boolean.FALSE; if (StringUtils.isNotEmpty(klasifikasiKerjaLevelId)) { KlasifikasiKerjaLevel klasifikasiKerjaLevel = service .getEntiyByPK(Long.parseLong(klasifikasiKerjaLevelId)); if (klasifikasiKerjaLevelId != null) { model = getModelFromEntity(klasifikasiKerjaLevel); isUpdate = Boolean.TRUE; } } // doSelectOneMenuKlasifikasiKerja(); } catch (Exception e) { LOGGER.error("error", e); } }
From source file:com.gplus.api.GPlusEDCAsActivityTest.java
@Test public void Tests() throws Exception { InputStream is = GPlusEDCAsActivityTest.class.getResourceAsStream("/GPlusEDCFixed.json"); if (is == null) System.out.println("null"); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); 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); jsonMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, Boolean.FALSE); jsonMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, Boolean.TRUE); jsonMapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, Boolean.TRUE); try {//from w w w.j a va 2 s . com while (br.ready()) { String line = br.readLine(); Activity activity = null; try { activity = gplusSerializer.deserialize(line); } catch (Exception e) { LOGGER.error(line); e.printStackTrace(); Assert.fail("Exception on gplus Serializer.deserialize(jsonString) : " + e); } try { String activityString = gplusSerializer.serialize(activity); LOGGER.debug(activityString); } catch (Exception e) { LOGGER.error(activity.toString()); e.printStackTrace(); Assert.fail("Exception on gplus Serializer.serialize(activity) : " + e); } } } catch (Exception e) { System.out.println("Exception: " + e); LOGGER.error(e.getMessage()); Assert.fail(""); } }
From source file:org.codehaus.grepo.query.hibernate.converter.ConverterRepositoryTest.java
@Test public void testWithSpecifiedConverter() { TestResultConverter.setReturnValue(Boolean.TRUE); Assert.assertTrue(repo.isExistingUsernameWithSpecifiedConverter("username")); TestResultConverter.setReturnValue(Boolean.FALSE); Assert.assertFalse(repo.isExistingUsernameWithSpecifiedConverter("username")); }
From source file:beans.GsMailer.java
@Override public boolean enabled() { logger.info("checking if enabled..."); return app.configuration().getBoolean("smtp.enabled") != Boolean.FALSE; }
From source file:belajar.nfc.controller.EntriTransaksiController.java
@RequestMapping(method = RequestMethod.POST) public void saveEntriTransaksi(@RequestBody EntriTransaksi entriTransaksi) throws Exception { if (entriTransaksi == null) { throw new Exception("Tidak Boleh Kosong"); }/* ww w.jav a2 s.c o m*/ entriTransaksi.setLunas(Boolean.FALSE); entriTransaksiDao.save(entriTransaksi); }
From source file:com.sun.identity.openid.provider.Codec.java
/** * TODO: Description./*from w w w . j av a 2s .c o m*/ * * @param value * TODO. * @return TODO. * @throws DecodeException * TODO. */ public static Boolean decodeBoolean(String value) throws DecodeException { if (value == null) { return null; } if (value.equals("true")) { return Boolean.TRUE; } if (value.equals("false")) { return Boolean.FALSE; } throw new DecodeException("boolean could not be decoded"); }
From source file:com.inkubator.hrm.web.loan.LoanNewTypeFormController.java
@PostConstruct @Override// ww w . j a va 2s . co m public void initialization() { super.initialization(); try { String param = FacesUtil.getRequestParameter("param"); loanNewTypeModel = new LoanNewTypeModel(); isUpdate = Boolean.FALSE; List<Currency> currencyList = currencyService.getAllData(); for (Currency currency : currencyList) { mapCurrency.put(currency.getName(), currency.getId()); } if (StringUtils.isNumeric(param)) { LoanNewType loanNewType = loanNewTypeService.getEntityWithRelationByPk(Long.parseLong(param)); if (loanNewType != null) { loanNewTypeModel.setId(loanNewType.getId()); loanNewTypeModel.setLoanTypeCode(loanNewType.getLoanTypeCode()); loanNewTypeModel.setLoanTypeName(loanNewType.getLoanTypeName()); loanNewTypeModel.setCurrencyCode(loanNewType.getCurrency().getId()); loanNewTypeModel.setCurrencyName(loanNewType.getCurrency().getName()); loanNewTypeModel.setInterestMethod(loanNewType.getInterestMethod()); loanNewTypeModel.setInterest(loanNewType.getInterest().doubleValue()); loanNewTypeModel.setRoundingStatus(loanNewType.getRoundingStatus()); loanNewTypeModel.setDescription(loanNewType.getDescription()); isUpdate = Boolean.TRUE; rounding = loanNewTypeModel.getRoundingStatus().intValue() == 1 ? Boolean.TRUE : Boolean.FALSE; currencyId = loanNewType.getCurrency().getId(); } } } catch (Exception e) { LOGGER.error("Error", e); } }
From source file:com.alfaariss.oa.engine.user.provisioning.translator.standard.converter.exist.ExistConverter.java
/** * Converts the value to a boolean value. * This means: whenever oValue is a String that is non-empty and non-null, * a Boolean.TRUE is returned.// w w w .j a v a 2 s .c o m * This means that when oValue is a Boolean with value false, Boolean.FALSE is returned. * @see IConverter#convert(java.lang.Object) */ public Object convert(Object oValue) { if (oValue == null) return Boolean.FALSE; if (oValue instanceof Boolean && oValue.equals(Boolean.FALSE)) return Boolean.FALSE; if (!(oValue instanceof String)) { _logger.debug("Not a String: " + oValue); throw new IllegalArgumentException("Not a String: " + oValue); } String sValue = (String) oValue; if (sValue.length() > 0) return Boolean.TRUE; return Boolean.FALSE; }
From source file:com.redhat.rhn.manager.monitoring.ModifyFilterCommand.java
/** * Create a command that modifies a new filter. * @param user0 the user modifying the filter *//*from w w w. j av a 2s .c o m*/ public ModifyFilterCommand(User user0) { user = user0; filter = new Filter(); filter.setUser(user); filter.setOrg(user.getOrg()); filter.setType(NotificationFactory.FILTER_TYPE_REDIR); filter.setRecurringBool(Boolean.FALSE); now = new Date(); Calendar sevenDays = Calendar.getInstance(); sevenDays.add(Calendar.DAY_OF_YEAR, 7); filter.setExpiration(sevenDays.getTime()); filter.setStartDate(now); }
From source file:com.reddit.api.RedditEDCAsActivityJSONTest.java
@Test public void Tests() throws Exception { InputStream is = RedditEDCAsActivityJSONTest.class.getResourceAsStream("/RedditEDCFixed.json"); if (is == null) System.out.println("null"); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); 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); jsonMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, Boolean.FALSE); jsonMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, Boolean.TRUE); jsonMapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, Boolean.TRUE); try {/*from w w w .ja v a2 s . c o m*/ while (br.ready()) { String line = br.readLine(); Activity activity = null; try { activity = redditSerializer.deserialize(line); } catch (Exception e) { LOGGER.error(line); e.printStackTrace(); Assert.fail("Exception on redditSerializer.deserialize(jsonString) : " + e); } try { String activityString = redditSerializer.serialize(activity); System.out.println(jsonMapper.writeValueAsString(activity)); } catch (Exception e) { LOGGER.error(activity.toString()); e.printStackTrace(); Assert.fail("Exception on redditSerializer.serialize(activity) : " + e); } //LOGGER.info(activity); } } catch (Exception e) { System.out.println("Exception: " + e); LOGGER.error(e.getMessage()); Assert.fail(""); } }