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:com.haulmont.cuba.web.gui.components.converters.YesNoIconConverter.java
public YesNoIconConverter() { super(Boolean.TRUE.toString(), Boolean.FALSE.toString()); }
From source file:me.timothy.ddd.entities.JSONCompatible.java
public static boolean getBoolean(JSONObject obj, String key) { return obj.get(key) == Boolean.TRUE; }
From source file:com.solidmaps.webapp.dao.LicensePCDAO.java
public List<LicensePCEntity> findByCompany(Integer idCompany) { StringBuilder sb = new StringBuilder(); sb.append("from LicensePCEntity e where e.company.idCompany =:idCompany "); sb.append("and e.isActive =:active "); sb.append("order by dateInsert "); Query query = super.getEm().createQuery(sb.toString()); query.setParameter("idCompany", idCompany); query.setParameter("active", Boolean.TRUE); @SuppressWarnings("unchecked") List<LicensePCEntity> list = query.getResultList(); return list;//from w w w .ja va 2s.co m }
From source file:in.rishikeshdarandale.rest.services.impl.ItemServiceImpl.java
@Override public Boolean isItemInStock(String skuId) { // TODO extend this behavior for your item return Boolean.TRUE; }
From source file:Main.java
/** * Return the xml translation of an object * /*from w ww. j ava 2s. com*/ * @param cls * @param entity * @return */ public static String objectToXML(Class<?> cls, Object entity) { try { Marshaller m = JAXBContext.newInstance(cls).createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); m.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE); StringWriter sw = new StringWriter(); m.marshal(entity, sw); return sw.toString(); } catch (Exception e) { e.printStackTrace(); } return null; }
From source file:Main.java
/** * Formats an XML string for pretty printing. Requires Java 1.6. * // w w w.java2 s .com * Taken from http://stackoverflow.com/questions/139076/how-to-pretty-print-xml-from-java * * @param xml * @return pretty-print formatted XML */ public static String prettyPrintXml(String xml) { try { final InputSource src = new InputSource(new StringReader(xml)); final Node document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(src) .getDocumentElement(); final Boolean keepDeclaration = Boolean.valueOf(xml.startsWith("<?xml")); //May need this: System.setProperty(DOMImplementationRegistry.PROPERTY,"com.sun.org.apache.xerces.internal.dom.DOMImplementationSourceImpl"); final DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance(); final DOMImplementationLS impl = (DOMImplementationLS) registry.getDOMImplementation("LS"); final LSSerializer writer = impl.createLSSerializer(); writer.getDomConfig().setParameter("format-pretty-print", Boolean.TRUE); // Set this to true if the output needs to be beautified. writer.getDomConfig().setParameter("xml-declaration", keepDeclaration); // Set this to true if the declaration is needed to be outputted. return writer.writeToString(document); } catch (Exception e) { throw new RuntimeException(e); } }
From source file:com.aaj.frontend.bu.UserManagerTest.java
@Test public void test2() { log.info("starting test2 ..."); Assert.isTrue(Boolean.TRUE); }
From source file:Main.java
public static Document readXml(InputSource source) throws ParserConfigurationException, IOException, SAXException { DocumentBuilderFactory f = DocumentBuilderFactory.newInstance(); f.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); DocumentBuilder b = f.newDocumentBuilder(); return b.parse(source); }
From source file:wad.service.GameService.java
public ArrayList<Boolean> checkAnswers(String[] answers) { this.answers.add(answer1); this.answers.add(answer2); this.answers.add(answer3); ArrayList<Boolean> results = new ArrayList(); for (int i = 0; i < answers.length; i++) { if (answers[i].equals(this.answers.get(i))) { System.out.println("YEAA"); results.add(Boolean.TRUE); } else {//from w ww .ja v a2s .co m System.out.println("NOO"); results.add(Boolean.FALSE); } } return results; }
From source file:codes.thischwa.c5c.util.jackson.JacksonTest.java
@Before public void init() { data.put("name", "john"); data.put("key", Boolean.TRUE); dataHolder.setName("john"); dataHolder.setKey(Boolean.TRUE); }