List of usage examples for java.lang Boolean TRUE
Boolean TRUE
To view the source code for java.lang Boolean TRUE.
Click Source Link
From source file:at.beeone.netbankinglight.test.JsonParserTest.java
@Test public void testParseTransaction() throws JSONException { JSONObject json = new JSONObject(getSampleJson("transaction.json")); Transaction transaction = JsonParser.toTransaction(json); assertNotNull(transaction);/*from w ww. j ava 2s . co m*/ assertEquals(transaction.getId(), "1155"); assertEquals(null, transaction.getBill()); assertEquals(Boolean.FALSE, transaction.isCancelled()); assertEquals(Boolean.TRUE, transaction.isFinished()); assertEquals(1350635542000L, transaction.getCarryOutDate().getTime()); assertEquals(1350635542000L, transaction.getCreatedOn().getTime()); assertEquals(null, transaction.getCustomerData()); assertEquals(null, transaction.getIdentification()); assertEquals(null, transaction.getNotes()); assertTrue(transaction.getTags().isEmpty()); }
From source file:la.kosmos.app.EmailConfiguration.java
public boolean sendEmail(String subject, String email, String message) throws Exception { try {// w w w . j a va 2 s . c o m MimeMessage msg = mailSender.createMimeMessage(); MimeMessageHelper helper = new MimeMessageHelper(msg); helper.setSubject(subject); helper.setTo(email); helper.setText("<p>" + message + "</p>", true); mailSender.send(msg); return Boolean.TRUE; } catch (MessagingException | MailException e) { throw e; } }
From source file:fr.xebia.demo.wicket.blog.service.CommentService.java
@SuppressWarnings("unchecked") public List<Comment> getCommentsForPostId(Long postId) throws ServiceException { try {/*from w w w.j a v a 2 s . c o m*/ Session session = ((Session) currentEntityManager().getDelegate()); Criteria criteria = session.createCriteria(getObjectClass()) .add(Expression.eq("approved", Boolean.TRUE)).add(Expression.eq("postId", postId)) .addOrder(Order.desc("date")).setCacheable(false); return criteria.list(); } catch (PersistenceException e) { logger.error(e.getCause(), e); throw new ServiceException("Can't get last posts", e); } finally { closeEntityManager(); } }
From source file:com.acc.storefront.interceptors.BeforeControllerHandlerInterceptor.java
@Override public boolean preHandle(final HttpServletRequest request, final HttpServletResponse response, final Object handler) throws Exception { if (request.getAttribute(INTERCEPTOR_ONCE_KEY) == null) { // Set the flag so that we are not executed multiple times request.setAttribute(INTERCEPTOR_ONCE_KEY, Boolean.TRUE); final HandlerMethod handlerMethod = (HandlerMethod) handler; // Call the pre handler once for the request for (final BeforeControllerHandler beforeControllerHandler : getBeforeControllerHandlers()) { if (!beforeControllerHandler.beforeController(request, response, handlerMethod)) { // Return false immediately if a handler returns false return false; }//from ww w . ja v a 2 s .c o m } } return true; }
From source file:org.atemsource.atem.impl.common.attribute.PrimitiveAttributeTest.java
private EntityA createEntityA() { EntityA entity = new EntityA(); entity.setBooleanO(Boolean.TRUE); entity.setBooleanP(false);/*from w ww . j av a 2s. co m*/ entity.setIntO(null); entity.setIntP(12); entity.setLongO(4L); entity.setNumber(new Long(10)); return entity; }
From source file:at.porscheinformatik.common.spring.web.extended.template.cache.html.HtmlTemplateController.java
public HtmlTemplateController(Boolean fallbackToIndex) { this.fallbackToIndex = fallbackToIndex != null ? fallbackToIndex : Boolean.TRUE; }
From source file:com.lc.storefront.interceptors.BeforeControllerHandlerInterceptor.java
@Override public boolean preHandle(final HttpServletRequest request, final HttpServletResponse response, final Object handler) throws Exception { if (request.getAttribute(INTERCEPTOR_ONCE_KEY) == null) {//from ww w . j a v a2 s. c om // Set the flag so that we are not executed multiple times request.setAttribute(INTERCEPTOR_ONCE_KEY, Boolean.TRUE); final HandlerMethod handlerMethod = (HandlerMethod) handler; // Call the pre handler once for the request for (final BeforeControllerHandler beforeControllerHandler : getBeforeControllerHandlers()) { if (!beforeControllerHandler.beforeController(request, response, handlerMethod)) { // Return false immediately if a handler returns false return false; } } } return true; }
From source file:com.ewcms.core.site.web.AclAction.java
public String input() { type = "user"; inherit = Boolean.TRUE; return Action.INPUT; }
From source file:ch.ralscha.extdirectspring.bean.ExtDirectStoreResult.java
public ExtDirectStoreResult(T[] record) { this((Long) null, Arrays.asList(record), Boolean.TRUE, null); }
From source file:io.opencensus.contrib.spring.sleuth.v1x.OpenCensusSleuthSpan.java
OpenCensusSleuthSpan(org.springframework.cloud.sleuth.Span span) {
super(fromSleuthSpan(span), Boolean.TRUE.equals(span.isExportable()) ? recordOptions : notRecordOptions);
}