Example usage for java.lang Boolean TRUE

List of usage examples for java.lang Boolean TRUE

Introduction

In this page you can find the example usage for java.lang Boolean TRUE.

Prototype

Boolean TRUE

To view the source code for java.lang Boolean TRUE.

Click Source Link

Document

The Boolean object corresponding to the primitive value true .

Usage

From source file:gov.nih.nci.cabig.caaers.domain.workflow.ReviewCommentTest.java

public void testIsEditable() {
    assertNull(comment.getEditable());
    comment.setEditable(Boolean.TRUE);
    assertTrue(comment.getEditable());
}

From source file:ar.com.zauber.commons.dao.predicate.InPredicate.java

/** @see Predicate#evaluate(java.lang.Object) */
public final boolean evaluate(final T value) {
    for (T element : target) {
        if (element.equals(value)) {
            return Boolean.TRUE;
        }//from w  w w  .  ja  va 2s .  co m
    }
    return Boolean.FALSE;
}

From source file:za.co.dwarfsun.jcmanager.test.repository.AttribRepositoryTest.java

@Test(enabled = true)
public void createAttrib() {
    repo = ctx.getBean(AttribRepository.class);
    Attrib attrib = new Attrib.Builder("testAttribute").tblName("TEST").fldName("Test").isakey(Boolean.TRUE)
            .build();/*  ww w.  j  av a2 s .com*/
    repo.save(attrib);
    id = attrib.getId();
    Assert.assertNotNull(attrib);
}

From source file:ru.org.linux.spring.boxlets.AbstractBoxlet.java

@Override
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response)
        throws Exception {
    ModelAndView mav = getData(request);
    if (mav == null) {
        mav = new ModelAndView();
    }//from   w  w  w. j  av a 2 s  .co  m

    if (request.getParameterMap().containsKey("edit")) {
        mav.addObject("editMode", Boolean.TRUE);
    }
    return mav;
}

From source file:httpRequests.GetPost.java

public GetPost(ArrayList<String> api_key) {
    apiIndex = 0;//from  w w  w  .j ava 2s . c o  m
    API_KEYS = new ArrayList<String>();
    currentAvailability = new ArrayList<Boolean>();
    for (String s : api_key) {
        API_KEYS.add(s);
        currentAvailability.add(Boolean.TRUE);
    }

}

From source file:org.springmodules.validation.valang.EqualsFunction.java

protected Object getResult(Object target, Function[] arguments) {
    Object value1 = arguments[0].getResult(target);
    Object value2 = arguments[1].getResult(target);
    return (ObjectUtils.nullSafeEquals(value1, value2)) ? Boolean.TRUE : Boolean.FALSE;
}

From source file:com.knowbout.hibernate.TransactionManager.java

public static void setRollbackOnly() {
    rollbackOnly.set(Boolean.TRUE);
}

From source file:cz.muni.fi.pa165.deliveryservice.service.CourierServiceImpl.java

@PreAuthorize("hasRole('ROLE_ADMIN')")
@Override// w w  w.  j a  va2  s  .  c o m
public CourierDTO createCourier(CourierDTO courierDto) {
    if (courierDto == null) {
        throw new NullPointerException();
    }

    Courier courier = mapper.map(courierDto, Courier.class);
    courier.setActive(Boolean.TRUE);
    courierDao.createCourier(courier);
    return mapper.map(courier, CourierDTO.class);
}

From source file:org.springframework.data.convert.JsonBooleanDeserializer.java

@Override
public Boolean deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {
    JsonToken currentToken = jp.getCurrentToken();

    if (currentToken.equals(JsonToken.VALUE_STRING)) {
        String text = jp.getText().trim();

        if (YES.equalsIgnoreCase(text)) {
            return Boolean.TRUE;
        } else if (NO.equalsIgnoreCase(text)) {
            return Boolean.FALSE;
        }//www.  j  a  va2  s.  c om

        throw ctxt.weirdStringException(text, Boolean.class,
                "Only \"" + YES + "\" or \"" + NO + "\" values supported");
    } else if (currentToken.equals(JsonToken.VALUE_NULL)) {
        return getNullValue();
    }

    throw ctxt.mappingException(Boolean.class);
}

From source file:eu.trentorise.smartcampus.mobility.logging.StatLogger.java

public void log(Object sj, String userId) {
    if (Boolean.TRUE.equals(loggingEnabled)) {
        mongoTemplate.save(createData(sj, userId));
    }
}