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.qualogy.qafe.gwt.server.event.assembler.LogAssembler.java
private void assembleAttributes(LogFunctionGVO eventItemGVO, LogFunction eventItem, Event event, ApplicationContext applicationContext) { Parameter messageParameters = eventItem.getMessage(); ParameterGVO messageGVOParameters = assembleParameter(messageParameters); eventItemGVO.setMessageGVO(messageGVOParameters); eventItemGVO.setDebug(Boolean.FALSE); eventItemGVO.setDelay(eventItem.getDelay()); String[] properties = StringUtils.split(eventItem.getStyle() == null ? "" : eventItem.getStyle(), ';'); String[][] styleProperties = new String[properties.length][2]; for (int i = 0; i < properties.length; i++) { styleProperties[i] = StringUtils.split(properties[i], ':'); }/*from w ww. ja va2 s.c om*/ /* * Modify the properties since this is DOM manipulation : font-size for css has to become fontSize for DOM */ for (int i = 0; i < styleProperties.length; i++) { styleProperties[i][0] = StyleDomUtil.initCapitalize(styleProperties[i][0]); } eventItemGVO.setStyleProperties(styleProperties); eventItemGVO.setStyleClass(eventItem.getStyleClass()); }
From source file:com.omertron.yamjtrakttv.model.SummaryInfo.java
public SummaryInfo(String rating, boolean inWatchlist) { this.rating = Rating.fromValue(rating); this.inWatchlist = inWatchlist; this.inCollection = Boolean.FALSE; this.watched = Boolean.FALSE; this.plays = 0; }
From source file:com.icesoft.faces.component.effect.ApplyEffectRenderer.java
public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException { try {/*w w w.j a v a2 s.co m*/ String parentId = uiComponent.getParent().getClientId(facesContext); ApplyEffect af = (ApplyEffect) uiComponent; Effect fx = EffectBuilder.build(af.getEffectType()); if (fx == null) { log.error("No Effect for effectType [" + af.getEffectType() + "]"); } else { fx.setSequence(af.getSequence()); fx.setSequenceId(af.getSequenceNumber().intValue()); fx.setSubmit(af.getSubmit().booleanValue()); fx.setTransitory(af.getTransitory().booleanValue()); fx.setOptions(af.getOptions()); if (af.getFire().booleanValue()) { JavascriptContext.fireEffect(fx, uiComponent.getParent(), facesContext); if (af.getAutoReset().booleanValue()) af.setFire(Boolean.FALSE); } if (af.getEvent() != null) { String event = af.getEvent(); LocalEffectEncoder.encodeLocalEffect(parentId, fx, event, facesContext); } } } catch (Exception e) { log.error("Unexpected Exception in ApplyEffectRenderer", e); } }
From source file:com.atypon.wayf.request.ResponseWriterTest.java
@Test public void testHasNoMore() { RequestContextAccessor.set(new RequestContext().setRequestUrl("/list").setOffset(0).setLimit(30) .setHasAnotherDbPage(Boolean.FALSE)); String link = responseWriter._getLinkHeaderValue(); assertEquals("", link); }
From source file:pl.lodz.p.edu.ftims.poi.poi.controller.SyncronisationController.java
@RequestMapping(method = RequestMethod.POST) public @ResponseBody @SuppressWarnings("empty-statement") String checkpoint(@RequestBody String input) { logger.log(Level.INFO, "Sync:{0}", input); Gson gson = new Gson(); HistoryListDao h = gson.fromJson(input, HistoryListDao.class); logger.log(Level.INFO, "Sync:{0} h:", h); int i = 0;/*from w w w . j a v a 2s . c o m*/ ErrorDao errorDao = new ErrorDao(Boolean.FALSE); String id = new String();//Do ukoszernienia try { for (HistoryDao history : h.getHistory()) { Department dep = dr.findOne(h.getDepartement()); Package pack = pr.findOne(history.getPack()); History historia = new History(); historia.setID(id);//Do ukoszernienia historia.setPack(pack); historia.setOddzial(dep); historia.setDate(history.getDate()); History save = hr.save(historia); id = save.getID(); // if (i >= 1) { // throw new Exception("Test"); // }; //Test mechanizmu ponawiania pack.getHistory().add(save); pr.save(pack); i++; } } catch (Exception e) { logger.log(Level.SEVERE, "Wyst\u0105pi\u0142 wyj\u0105tek w trakcie przetwarzania: {0}", e); try { History findOne = hr.findOne(id); logger.info(findOne.toString()); hr.delete(id); Package pack = findOne.getPack(); logger.info(pack.toString()); boolean removedRelation = pack.getHistory().remove(findOne); logger.log(Level.INFO, "Removed {0}", removedRelation); pr.save(pack); } catch (Exception ex) { logger.log(Level.SEVERE, "Wyst\u0105pi\u0142 wyj\u0105tek w trakcie wycofywania zmian: {0}", ex); } errorDao.setError(Boolean.TRUE); } errorDao.setInsertedRecords(i); return gson.toJson(errorDao); }
From source file:com.snapdeal.scm.fh.service.impl.ConvertorService.java
@SuppressWarnings("unchecked") @Override// w w w . ja v a 2 s. c om public <T> T convertToObject(Class<T> clazz, String value) throws ParseException { if (StringUtils.isEmpty(value) || StringUtils.NULL.equalsIgnoreCase(value)) { return null; } if (clazz.equals(Integer.class)) { return (T) Integer.valueOf(value); } if (clazz.equals(Date.class)) { try { return (T) new Date(Long.valueOf(value)); } catch (NumberFormatException ne) { return (T) DateUtils.parseDate(value, ALLOWED_DATE_FORMATS); } } if (clazz.equals(String.class)) { return (T) value; } if (clazz.equals(Float.class)) { return (T) Float.valueOf(value); } if (clazz.equals(Double.class)) { return (T) Double.valueOf(value); } if (clazz.equals(Boolean.class)) { if (value.equals("1") || value.equalsIgnoreCase("true")) { return (T) Boolean.TRUE; } else if (value.equals("0") || value.equalsIgnoreCase("false")) { return (T) Boolean.FALSE; } } throw new ParseException("unable to parse string [" + value + "] to class " + clazz, 0); }
From source file:com.base.dao.sql.ReflectionUtils.java
public static Object convertValue(Object value, Class toType) { Object result = null;// w w w .j a v a2s . c o m if (value != null) { if (value.getClass().isArray() && toType.isArray()) { Class componentType = toType.getComponentType(); result = Array.newInstance(componentType, Array.getLength(value)); for (int i = 0, icount = Array.getLength(value); i < icount; i++) { Array.set(result, i, convertValue(Array.get(value, i), componentType)); } } else { if ((toType == Integer.class) || (toType == Integer.TYPE)) result = Integer.valueOf((int) longValue(value)); if ((toType == Double.class) || (toType == Double.TYPE)) result = new Double(doubleValue(value)); if ((toType == Boolean.class) || (toType == Boolean.TYPE)) result = booleanValue(value) ? Boolean.TRUE : Boolean.FALSE; if ((toType == Byte.class) || (toType == Byte.TYPE)) result = Byte.valueOf((byte) longValue(value)); if ((toType == Character.class) || (toType == Character.TYPE)) result = new Character((char) longValue(value)); if ((toType == Short.class) || (toType == Short.TYPE)) result = Short.valueOf((short) longValue(value)); if ((toType == Long.class) || (toType == Long.TYPE)) result = Long.valueOf(longValue(value)); if ((toType == Float.class) || (toType == Float.TYPE)) result = new Float(doubleValue(value)); if (toType == BigInteger.class) result = bigIntValue(value); if (toType == BigDecimal.class) result = bigDecValue(value); if (toType == String.class) result = stringValue(value); if (toType == Date.class) { result = DateUtils.toDate(stringValue(value)); } if (Enum.class.isAssignableFrom(toType)) result = enumValue((Class<Enum>) toType, value); } } else { if (toType.isPrimitive()) { result = primitiveDefaults.get(toType); } } return result; }
From source file:org.codehaus.grepo.query.jpa.converter.ConverterRepositoryTest.java
/** Test with implicit conversion and specified converter. */ @Test//www. ja va 2 s. c o m public void testWithSpecifiedConverter() { TestResultConverter.setReturnValue(Boolean.TRUE); Assert.assertTrue(repo.isExistingUsernameWithSpecifiedConverter("username")); TestResultConverter.setReturnValue(Boolean.FALSE); Assert.assertFalse(repo.isExistingUsernameWithSpecifiedConverter("username")); }
From source file:com.comcast.oscar.dictionary.DictionaryTLV.java
/** * //from w ww .j av a 2 s . c om * @param sTlvDotNotation Example 24.1.3 * @param dsq DictionarySQLQueries * @return ArrayDeque<String> of TLV Names found in Dictionary */ public static ArrayDeque<String> getTypeHierarchyStack(String sTlvDotNotation, DictionarySQLQueries dsq) { boolean localDebug = Boolean.FALSE; ArrayDeque<String> adTypeHierarchyStack = new ArrayDeque<String>(); List<String> lsTlvDotNotation = new ArrayList<String>(); lsTlvDotNotation = Arrays.asList(sTlvDotNotation.split("\\.")); if (debug | localDebug) System.out.println("ConfigrationFileExport.getTlvDefintion(): " + lsTlvDotNotation.toString()); //Get TLV Dictionary for the Top Level JSONObject joTlvDictionary = dsq.getTlvDefinition(Integer.decode(lsTlvDotNotation.get(0))); //Search for TLV Definition if (lsTlvDotNotation.size() == 1) { try { adTypeHierarchyStack.addFirst(joTlvDictionary.getString(Dictionary.TLV_NAME)); } catch (JSONException e) { e.printStackTrace(); } } else if (lsTlvDotNotation.size() >= 1) { try { adTypeHierarchyStack.addFirst(joTlvDictionary.getString(Dictionary.TLV_NAME)); } catch (JSONException e) { e.printStackTrace(); } int iRecursiveSearch = 0; while (iRecursiveSearch < lsTlvDotNotation.size()) { if (debug | localDebug) System.out.println("ConfigrationFileExport.getTlvDefintion(): WHILE-LOOP"); try { if (joTlvDictionary.getString(Dictionary.TYPE).equals(lsTlvDotNotation.get(iRecursiveSearch))) { if (joTlvDictionary.getBoolean(Dictionary.ARE_SUBTYPES)) { try { JSONArray jaTlvDictionary = joTlvDictionary.getJSONArray(Dictionary.SUBTYPE_ARRAY); for (int iIndex = 0; iIndex < jaTlvDictionary.length(); iIndex++) { if (debug | localDebug) System.out.println("ConfigrationFileExport.getTlvDefintion(): FOR-LOOP"); JSONObject joTlvDictionaryTemp = jaTlvDictionary.getJSONObject(iIndex); if (joTlvDictionaryTemp.getString(Dictionary.TYPE) .equals(lsTlvDotNotation.get(iRecursiveSearch + 1))) { joTlvDictionary = joTlvDictionaryTemp; iRecursiveSearch++; try { adTypeHierarchyStack .addFirst(joTlvDictionary.getString(Dictionary.TLV_NAME)); } catch (JSONException e) { e.printStackTrace(); } break; } } } catch (JSONException e) { e.printStackTrace(); } } else { iRecursiveSearch++; } } } catch (JSONException e1) { e1.printStackTrace(); } } } return adTypeHierarchyStack; }
From source file:gov.nih.nci.cabig.ctms.web.tabs.AutomaticSaveFlowFormControllerTest.java
public void testWillSaveFlagIncludedInRefdata() throws Exception { Map<?, ?> refdata = controller.referenceData(request, command, errors, 0); assertTrue(refdata.containsKey("willSave")); assertEquals(Boolean.FALSE, refdata.get("willSave")); }