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:org.springmodules.validation.valang.functions.InRoleFunction.java
protected Object doGetResult(Object target) { Object role = getArguments()[0].getResult(target); Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); if (authentication == null) { return Boolean.FALSE; }/*from ww w . j av a 2s .com*/ Collection<GrantedAuthority> authorities = authentication.getAuthorities(); for (GrantedAuthority grantedAuthority : authorities) { if (grantedAuthority.equals(role)) { return Boolean.TRUE; } } return Boolean.FALSE; }
From source file:uk.org.rbc1b.roms.db.project.HibernateProjectAvailabilityDao.java
@SuppressWarnings("unchecked") @Override// ww w . j a va 2s . com public List<ProjectAvailability> findUnnotifiedVolunteers() { Criteria criteria = this.sessionFactory.getCurrentSession().createCriteria(ProjectAvailability.class); criteria.add(Restrictions.eq("emailSent", Boolean.FALSE)); return criteria.list(); }
From source file:com.sirti.microservice.hbase.service.UnicoStoricoService.java
public UnicoStoricoResultSet findFilterAlarms(String filter) { UnicoStoricoResultSet hkpiresultset = new UnicoStoricoResultSet(); try {/* w ww. j a v a 2 s . c o m*/ long starttime = System.nanoTime(); List<UnicoStorico> hkpilist = unicoStoricoDao.findFilterUnicoStorico(filter); long endtime = System.nanoTime(); hkpiresultset.setList(hkpilist); hkpiresultset.setDuration((endtime - starttime) / 1000000); hkpiresultset.setError(Boolean.FALSE); } catch (Exception e) { hkpiresultset.setError(Boolean.TRUE); hkpiresultset.setErrorMsg(e.getLocalizedMessage()); } return hkpiresultset; }
From source file:com.inkubator.hrm.web.recruitment.RecruitAdvertisementCategoryFormController.java
@PostConstruct @Override//from w ww . j a va 2s . c o m public void initialization() { super.initialization(); try { String recruitAdvertisementCategoryId = FacesUtil.getRequestParameter("recruitmentId"); model = new RecruitAdvertisementCategoryModel(); isUpdate = Boolean.FALSE; if (StringUtils.isNotEmpty(recruitAdvertisementCategoryId)) { RecruitAdvertisementCategory recruitAdvertisementCategory = service .getEntiyByPK(Long.parseLong(recruitAdvertisementCategoryId)); if (recruitAdvertisementCategory != null) { model = getModelFromEntity(recruitAdvertisementCategory); isUpdate = Boolean.TRUE; } } } catch (Exception e) { LOGGER.error("Error", e); } }
From source file:me.ferrybig.javacoding.webmapper.test.session.DefaultDataStorageTest.java
@Test public void getDataAsChoosesCorrectBackendTypeTest() { List<Object> list = new ArrayList<>(); list.add(new Object()); list.add(BigInteger.ZERO);/*from ww w. ja va 2 s .c om*/ list.add("string"); list.add(Boolean.FALSE); list.add(new JSONObject()); data.setData(list); assertEquals("string", extr(data.getDataAs(String.class))); }
From source file:org.apache.streams.data.MoreoverJsonActivitySerializerTest.java
@Before public void setup() throws IOException { json = JsonUtil.getFromFile("classpath:org/apache/streams/data/moreover.json"); mapper = new ObjectMapper(); 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); }
From source file:it.larusba.neo4j.jdbc.http.driver.Neo4jResponseTest.java
@Test public void displayErrorShouldSucceed() throws SQLException { // Without errors Neo4jResponse response = generateNeo4jResponse(Boolean.FALSE); Assert.assertEquals(0, response.displayErrors().length()); // With errors response = generateNeo4jResponse(Boolean.TRUE); Assert.assertTrue(response.displayErrors().length() > 0); }
From source file:org.sakaiproject.genericdao.test.AbstractTestBaseDao.java
public void commonStartup(GenericDao genericDao) { // load up the interceptor dataInterceptor = (BasicDataInterceptor) applicationContext .getBean("org.sakaiproject.genericdao.interceptors.TestInterceptor"); if (dataInterceptor == null) { throw new RuntimeException("onSetUp: dataInterceptor could not be retrieved from spring context"); }/* w ww .j a va 2 s . c o m*/ gto1 = new GenericTestObject(TEST_TITLE, Boolean.FALSE); gto2 = new GenericTestObject(TEST_TITLE + "2", Boolean.FALSE); gto3 = new GenericTestObject(TEST_TITLE + "3", Boolean.FALSE); gto4 = new GenericTestObject(TEST_TITLE + "4", Boolean.TRUE); gto5 = new GenericTestObject(TEST_TITLE + "5", Boolean.TRUE); gto6 = new GenericTestObject("number six", Boolean.FALSE); gtpo1 = new GenericTestParentObject("parent object 1", gto4); gtpo2 = new GenericTestParentObject("parent object 2", gto5); // preload data if desired preloadGTOs(genericDao); }
From source file:com.omertron.fanarttvapi.TestLogger.java
/** * Configure the logger with a simple in-memory file for the required log * level//from w w w . j a va2s . c o m * * @param level The logging level required * @return True if successful */ public static boolean Configure(String level) { StringBuilder config = new StringBuilder("handlers = java.util.logging.ConsoleHandler\n"); config.append(".level = ").append(level).append(CRLF); config.append("java.util.logging.ConsoleHandler.level = ").append(level).append(CRLF); // Only works with Java 7 or later config.append("java.util.logging.SimpleFormatter.format = [%1$tH:%1$tM:%1$tS %4$6s] %2$s - %5$s %6$s%n") .append(CRLF); // Exclude logging messages config.append("org.apache.http.level = SEVERE").append(CRLF); InputStream ins = new ByteArrayInputStream(config.toString().getBytes()); try { LogManager.getLogManager().readConfiguration(ins); // Exclude http logging System.setProperty("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog"); System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http", "warn"); } catch (IOException ex) { LOG.warn("Failed to configure log manager due to an IO problem", ex); return Boolean.FALSE; } finally { try { ins.close(); } catch (IOException ex) { LOG.info("Failed to close input stream", ex); } } LOG.debug("Logger initialized to '{}' level", level); return Boolean.TRUE; }