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.openmrs.module.facialrecog.api.db.hibernate.HibernateFacialRecogDAO.java
public FacialRecogData getByUuid(String uuid) { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(mappedClass); criteria.add(Restrictions.eq("uuid", uuid)); criteria.add(Restrictions.eq("voided", Boolean.FALSE)); return (FacialRecogData) criteria.uniqueResult(); }
From source file:org.apache.streams.data.MoreoverJsonActivitySerializer.java
@Override public Activity deserialize(String serialized) { serialized = serialized.replaceAll("\\[[ ]*\\]", "null"); System.out.println(serialized); ObjectMapper mapper = new ObjectMapper(); AnnotationIntrospector introspector = new JaxbAnnotationIntrospector(mapper.getTypeFactory()); mapper.setAnnotationIntrospector(introspector); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, Boolean.FALSE); mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, Boolean.FALSE); mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, Boolean.TRUE); mapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, Boolean.TRUE); mapper.configure(DeserializationFeature.WRAP_EXCEPTIONS, Boolean.TRUE); Article article;//from w w w . j a v a 2s .com try { ObjectNode node = (ObjectNode) mapper.readTree(serialized); node.remove("tags"); node.remove("locations"); node.remove("companies"); node.remove("topics"); node.remove("media"); node.remove("outboundUrls"); ObjectNode jsonNodes = (ObjectNode) node.get("source").get("feed"); jsonNodes.remove("editorialTopics"); jsonNodes.remove("tags"); jsonNodes.remove("autoTopics"); article = mapper.convertValue(node, Article.class); } catch (IOException e) { throw new IllegalArgumentException("Unable to deserialize", e); } return MoreoverUtils.convert(article); }
From source file:com.uimirror.core.framework.rest.util.WebUtil.java
/** * Checks if the app URL and redirect URL are same or not * @param appURL which will be validated * @param redirectURL to which it will be redirected * @return <code>true</code> if valid *//*from w w w. j av a 2s . co m*/ public static boolean isValidAppAndRedirectURL(String appURL, String redirectURL) { if (StringUtils.isEmpty(appURL)) return Boolean.FALSE; String url1 = getURLDomain(appURL); if (url1 != null && !isLoaclHostURL(url1)) { return url1.equals(getURLDomain(redirectURL)); } return Boolean.FALSE; }
From source file:com.newlandframework.rpc.netty.MessageRecvInitializeTask.java
public Boolean call() { response.setMessageId(request.getMessageId()); try {// w w w . j a v a 2 s . c o m Object result = reflect(request); response.setResult(result); return Boolean.TRUE; } catch (Throwable t) { response.setError(t.toString()); t.printStackTrace(); System.err.printf("RPC Server invoke error!\n"); return Boolean.FALSE; } }
From source file:com.epam.ta.reportportal.core.widget.content.LineChartContentLoader.java
@SuppressFBWarnings("NP_NULL_PARAM_DEREF") @Override// w ww. jav a 2s . c om public Map<String, List<ChartObject>> loadContent(Filter filter, Sort sorting, int quantity, List<String> contentFields, List<String> metaDataFields, Map<String, List<String>> options) { BusinessRule.expect(metaDataFields == null || metaDataFields.isEmpty(), Predicates.equalTo(Boolean.FALSE)) .verify(ErrorType.UNABLE_LOAD_WIDGET_CONTENT, "Metadata fields should exist for providing content."); List<String> allFields = Lists.newArrayList(contentFields); List<String> xAxis = metaDataFields; allFields.addAll(xAxis); StatisticsDocumentHandler handler = new StatisticsDocumentHandler(contentFields, xAxis); String collectionName = getCollectionName(filter.getTarget()); // here can be used any repository which extends ReposrtPortalRepository launchRepository.loadWithCallback(filter, sorting, quantity, allFields, handler, collectionName); if ((options.get("timeline") != null) && (Period.findByName(options.get("timeline").get(0)) != null)) { return groupByDate(handler.getResult(), Period.findByName(options.get("timeline").get(0))); } Map<String, List<ChartObject>> result = new HashMap<>(); result.put(RESULT, handler.getResult()); return result; }
From source file:de.pro.dbw.file.dream.api.DreamModel.java
public static DreamModel copy(DreamModel toCopy) { final DreamModel copy = new DreamModel(); copy.setDescription(toCopy.getDescription()); copy.setFavorite(toCopy.isFavorite()); copy.setFavoriteReason(toCopy.getFavoriteReason()); copy.setGenerationTime(toCopy.getGenerationTime()); copy.setId(toCopy.getId());//from w w w . j a v a 2s . co m copy.setMarkAsChanged(Boolean.FALSE); copy.setText(toCopy.getText()); copy.setTitle(toCopy.getTitle()); return copy; }
From source file:org.codehaus.groovy.grails.plugins.searchable.compass.mapping.SearchableGrailsDomainClassCompassMappingUtils.java
/** * Get the mappable domain class properties * @param grailsDomainClass/* ww w .ja v a 2s .c om*/ * @param searchableValue * @param searchableGrailsDomainClasses * @param excludedProperties * @param domainClassPropertyMappingFactory * @return */ public static GrailsDomainClassProperty[] getMappableProperties(GrailsDomainClass grailsDomainClass, Object searchableValue, Collection searchableGrailsDomainClasses, final List excludedProperties, SearchableGrailsDomainClassPropertyMappingFactory domainClassPropertyMappingFactory) { boolean defaultExcludes = false; if (searchableValue instanceof Boolean) { if (searchableValue.equals(Boolean.FALSE)) { return null; } searchableValue = new HashMap() { { put("except", excludedProperties); } }; defaultExcludes = true; } Class mappedClass = grailsDomainClass.getClazz(); List properties = new ArrayList(); for (int i = 0, max = grailsDomainClass.getProperties().length; i < max; i++) { GrailsDomainClassProperty property = grailsDomainClass.getProperties()[i]; String propertyName = property.getName(); if (propertyName.equals("id")) { // TODO refactor with specific id mapping continue; } if (!SearchableUtils.isIncludedProperty(propertyName, searchableValue)) { LOG.debug("Not mapping [" + ClassUtils.getShortName(mappedClass) + "." + propertyName + "] because of " + (defaultExcludes ? "default property exclusions" : "specified only/except rule")); continue; } if (domainClassPropertyMappingFactory.getGrailsDomainClassPropertyMapping(property, searchableGrailsDomainClasses) == null) { continue; } LOG.debug("Mapping [" + ClassUtils.getShortName(mappedClass) + "." + propertyName + "]"); properties.add(property); } return (GrailsDomainClassProperty[]) properties.toArray(new GrailsDomainClassProperty[properties.size()]); }
From source file:com.betel.flowers.service.UsuarioService.java
public Boolean stateUsername(Usuario usuario) { Boolean state = Boolean.FALSE; Usuario user = this.findByUsername(usuario); if (user.getId() != null) { state = user.getEstado();/* w ww .j a v a 2s . co m*/ } return state; }
From source file:com.lc.storefront.interceptors.beforeview.CartRestorationBeforeViewHandler.java
@Override public void beforeView(final HttpServletRequest request, final HttpServletResponse response, final ModelAndView modelAndView) throws Exception { if (getSessionService().getAttribute(WebConstants.CART_RESTORATION) != null && getSessionService().getAttribute(WebConstants.CART_RESTORATION_SHOW_MESSAGE) != null && ((Boolean) getSessionService().getAttribute(WebConstants.CART_RESTORATION_SHOW_MESSAGE)) .booleanValue()) {/*from w w w . jav a2 s.co m*/ if (getSessionService().getAttribute(WebConstants.CART_RESTORATION_ERROR_STATUS) != null) { modelAndView.getModel().put("restorationErrorMsg", getSessionService().getAttribute(WebConstants.CART_RESTORATION_ERROR_STATUS)); } else { modelAndView.getModel().put("restorationData", getSessionService().getAttribute(WebConstants.CART_RESTORATION)); } modelAndView.getModel().put("showModifications", showModifications(request)); } getSessionService().setAttribute(WebConstants.CART_RESTORATION_SHOW_MESSAGE, Boolean.FALSE); }
From source file:DataStructure.java
public static Boolean isEvenIndex(Integer index) { if (index % 2 == 0) return Boolean.TRUE; return Boolean.FALSE; }