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:sys.core.view.mbean.MenuMBean.java

public void cargarMenuBar() {
    try {/*from w w w .ja  va 2s . co m*/
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("rolDto.id", sessionMBean.getSessionUsuarioDto().getRolDto().getId());
        map.put("opcionSistemaDto.estado", Boolean.TRUE);
        map.put("opcionSistemaDto.tipoMenu", "M");
        Map<String, String> order = new HashMap<String, String>();
        order.put("opcionSistemaDto.orden", "asc");
        order.put("opcionSistemaDto.descripcion", "asc");
        List<PermisoDto> listaPermisos = permisoRolManager.obtenerConFiltroConOrden(map, order);

        List<OpcionSistemaDto> listaOpciones = new ArrayList<OpcionSistemaDto>();
        for (PermisoDto p : listaPermisos) {
            OpcionSistemaDto o = p.getOpcionSistemaDto();
            o.setPermiso(p.getEstado());
            if (o.getPermiso() && o.getTipoMenu().equals("M")) {
                listaOpciones.add(o);
            }

        }

        MenuBarHelper menuBarHelper = (MenuBarHelper) WebServletContextListener.getApplicationContext()
                .getBean("menuBarHelper");
        this.principalMenuBar = menuBarHelper.getMenuBar(listaOpciones, listaPermisos);

    } catch (Exception e) {
        String msg = UtilCore.Internacionalizacion.getMensajeInternacional("general.mensaje.error.cargar.menu");
        showError(msg, e.getMessage());
        logger.error(msg, e);
    }
}

From source file:com.digitalizat.business.ACLManagerIml.java

@Override
@Transactional/* w  ww.  j a  v a2 s.c  o m*/
public void addOrganization(Organization org) {
    //creamos la sucursal principal
    Branch mainBranch = new Branch();
    mainBranch.setName("main");
    mainBranch.setMain(Boolean.TRUE);
    mainBranch.setOrganization(org);

    organizationDAO.addOrganization(org);
    branchDAO.addBranch(mainBranch);

}

From source file:com.pamarin.income.service.impl.UserServiceImpl.java

@Override
public User activateAccount(String code) {
    User user = repo.findByActivateCode(code);
    if (user == null) {
        return null;
    }/*from  w ww  .j  a  v  a 2 s  .  co m*/

    user.setActivateCode(null);
    user.setEnabled(Boolean.TRUE);
    return user;
}

From source file:com.mycompany.mockitotomee.service.GreetingServiceIT.java

@Configuration
public Properties configuration() {
    return new Properties() {
        private static final long serialVersionUID = 3109256773218160485L;

        {/*from   ww w .j a  v a  2 s  .  c o m*/
            setProperty(OpenEjbContainer.OPENEJB_EMBEDDED_REMOTABLE, Boolean.TRUE.toString());
            setProperty("MailProvider", "new://Resource=type=javax.mail.Session");
            setProperty("MailProvider.mail.smtp.host", "127.0.0.1");
            setProperty("MailProvider.mail.smtp.port", "25");
            setProperty("MailProvider.mail.transport.protocol", "smtp");
            setProperty("MailProvider.mail.smtp.auth", "false");
            setProperty("MailProvider.mail.smtp.user", "someuser");
            setProperty("MailProvider.password", "mypassword");
            setProperty(Context.INITIAL_CONTEXT_FACTORY, LocalInitialContextFactory.class.getName());
            String providers = String.format("%s", JacksonJsonProvider.class.getName());
            setProperty("cxf.jaxrs.providers", providers);
        }
    };
}

From source file:com.hubspot.jinjava.lib.filter.BoolFilter.java

@Override
public Object filter(Object var, JinjavaInterpreter interpreter, String... args) {
    if (var == null) {
        return false;
    }/* w w  w  .  j a v a 2 s .  co m*/

    final String str = var.toString();

    return str.equals("1") ? Boolean.TRUE : BooleanUtils.toBoolean(str);
}

From source file:de.hybris.platform.mobileservices.text.UseCaseMTBS02to08ItemLinksTest.java

@Before
public void setUp() throws Exception {
    createCoreData();/*  w ww  .  j a  v  a2s  . co  m*/
    createHardwareCatalog();

    createConfiguration1();

    // make sure links are allowed globally
    wapPushEnabledBefore = Config.getParameter("mobile.wappush.enabled");
    Config.setParameter("mobile.wappush.enabled", Boolean.TRUE.toString());
}

From source file:mx.com.quadrum.service.impl.ContactoServiceImpl.java

@Override
public String agregar(Contacto contacto) {
    contacto.setActivo(Boolean.FALSE);
    contacto.setPrimeraSesion(Boolean.TRUE);
    if (contacto.getGrado() != null) {
        if (contacto.getGrado().getId() == 0) {
            contacto.setGrado(null);/* www  .j  a v a 2  s.  co m*/
        }
    }
    if (contactoRepository.agregar(contacto)) {
        return ADD_CORRECT + CONTACTO + contacto.getId();
    }
    return ERROR_HIBERNATE;
}

From source file:com.ibm.watson.app.common.util.rest.BooleanResponseHandler.java

@Override
protected Boolean doHandleResponse(HttpResponse response) throws IOException {
    // If we get here, we accepted the response as valid, so return true
    return Boolean.TRUE;
}

From source file:de.appsolve.padelcampus.utils.PlayerUtil.java

public void markAsDeleted(Player user) {
    user.setDeleted(Boolean.TRUE);
    user.setAllowEmailContact(Boolean.FALSE);
    List<Team> teams = teamDAO.findByPlayer(user);
    if (teams != null) {
        for (Team team : teams) {
            team.setName(TeamUtil.getTeamName(team));
            teamDAO.saveOrUpdate(team);// ww w .  j  av a  2 s  .  c o m
        }
    }
    playerDAO.saveOrUpdate(user);
}

From source file:labr_client.xml.ObjToXML.java

public static void jaxbObjectToXML(LabrRequest request, HashMap<String, String> patient) {

    try {/*from   w  ww. j  ava  2s.c o m*/
        JAXBContext context = JAXBContext.newInstance(LabrRequest.class);
        Marshaller m = context.createMarshaller();
        //for pretty-print XML in JAXB
        m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
        //----------PATIENT----------------------------
        request.patient.name.setValue("De Mey");
        request.patient.name.setX(20);
        request.patient.name.setY(50);
        request.patient.firstName.setValue("Matthias");
        request.patient.firstName.setX(150);
        request.patient.firstName.setY(50);
        request.patient.birthDate.setValue("07/06/1990");
        request.patient.birthDate.setX(20);
        request.patient.birthDate.setY(80);
        request.patient.gender.setValue("M");
        request.patient.gender.setX(150);
        request.patient.gender.setY(80);
        request.patient.straatAndNumber.setValue("Hemelbeekstraat 16");
        request.patient.straatAndNumber.setX(20);
        request.patient.straatAndNumber.setY(110);
        request.patient.zip.setValue("8000");
        request.patient.zip.setX(20);
        request.patient.zip.setY(140);
        request.patient.city.setValue("Brugge");
        request.patient.city.setX(120);
        request.patient.city.setY(140);

        request.patient.country.setValue("Belgie");
        request.patient.country.setX(20);
        request.patient.country.setY(170);
        request.patient.nationalNumber.setValue("001-12345-223");
        request.patient.nationalNumber.setX(120);
        request.patient.nationalNumber.setY(210);
        //----------ATTRIBUTEN-------------------------
        request.attributes.setAge(26);
        //----------LABELS-----------------------------
        LabrXMLLabel l = new LabrXMLLabel();
        l.setColor("#110000");
        l.setSize(12);
        l.setId("1");
        l.setValue("Hematologie");
        request.labels.getLabel().add(l);
        //---------KNOPPEN-----------------------------
        request.buttons.save.setX(300);
        request.buttons.save.setY(100);
        request.buttons.save.setColor(-65536);
        request.buttons.save.setWidth(100);
        request.buttons.save.setValue("Save");
        //----------AANVRAGEN--------------------------
        LabrXMLRequest r = new LabrXMLRequest();
        r.setComment("Dit is commentaar");
        r.setLoinc("Kalium");
        request.requests.getRequest().add(r);
        r.setLoinc("Natrium");
        request.requests.getRequest().add(r);
        //----------AANVRAGEN--------------------------
        // Write to System.out for debugging
        // m.marshal(emp, System.out);            
        // Write to File
        m.marshal(request, new File("C:\\Users\\labbl\\Documents\\test.xml"));
    } catch (JAXBException e) {
        e.printStackTrace();
    }

}