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.sec.ose.osi.sdk.protexsdk.codetree.CodeTreeAPIWrapper.java
public static PartialCodeTree setCodeTree(String projectName, UIResponseObserver observer) { String ROOT = "/"; String projectID = UISDKInterfaceManager.getSDKInterface().getProjectID(projectName); String pMessage = " > Generating Code Tree from server.\n"; observer.pushMessageWithHeader(pMessage); try {// w ww.j a v a2 s.co m PartialCodeTree codeTree = getCodeTree(projectName); if (codeTree == null) { codeTree = ProtexSDKAPIManager.getCodeTreeAPI().getCodeTreeByNodeTypes(projectID, ROOT, CodeTreeUtilities.INFINITE_DEPTH, Boolean.TRUE, CodeTreeUtilities.ALL_CODE_TREE_NODE_TYPES); codeTreeMap.put(projectName, codeTree); } return codeTree; } catch (SdkFault e) { log.warn(e); } return null; }
From source file:com.basistech.rosette.apimodel.ModelTest.java
@Parameterized.Parameters(name = "inputStreamContent: {0}") public static Collection<Object[]> data() { return Lists.newArrayList(new Object[] { Boolean.FALSE }, new Object[] { Boolean.TRUE }); }
From source file:cz.muni.fi.pa165.bookingmanager.desktop.rest.UserRESTManager.java
public UserRESTManager() { ClientConfig clientConfig = new DefaultClientConfig(); clientConfig.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE); url = ServerURIHelper.loadURLForUser(); client = Client.create(clientConfig); webResource = client.resource(url);/* w w w. j a v a 2s .co m*/ webResource.addFilter(new HTTPBasicAuthFilter("rest", "rest")); }
From source file:dao.FriendDAOImpl.java
@Override public void acceptFriendship(FriendEntity fe) { fe.setAccepted(Boolean.TRUE); }
From source file:com.livhuwani.rambuda.policyquotationapp.services.Impl.PolicyQuoteCrudServiceImpl.java
@Override public PolicyQuote createPolicyQuotes(Person person, Policy policy) { PolicyQuote quote = new PolicyQuote(); quote.setId(Long.MAX_VALUE + 1); quote.setPerson(person);/*from ww w .ja v a 2 s.c o m*/ quote.setPolicy(policy); quote.setQuoteAmount(BigDecimal.valueOf(3200)); quote.setQuoteStatus(Boolean.TRUE); quote.setQuoteDate(new Date()); PolicyQuote savedQuote = policyQuoteRepository.saveAndFlush(quote); return savedQuote; }
From source file:com.tikinou.schedulesdirect.core.jackson.deser.BooleanYNDeserializer.java
@Override public Boolean deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { JsonToken t = jp.getCurrentToken();/* ww w.j a v a 2 s. c o m*/ if (t == JsonToken.VALUE_TRUE) { return Boolean.TRUE; } if (t == JsonToken.VALUE_FALSE) { return Boolean.FALSE; } if (t == JsonToken.VALUE_NULL) { return null; } if (t == JsonToken.VALUE_NUMBER_INT) { return (jp.getIntValue() != 0); } if (t == JsonToken.VALUE_STRING) { String text = jp.getText().trim(); if ("true".equals(text)) { return Boolean.TRUE; } if ("false".equals(text) || text.length() == 0) { return Boolean.FALSE; } if ("N".equalsIgnoreCase(text) || text.length() == 0) { return Boolean.FALSE; } if ("Y".equalsIgnoreCase(text)) { return Boolean.TRUE; } throw ctxt.weirdStringException(text, Boolean.class, "only \"true\" or \"false\" recognized"); } // Otherwise, no can do: throw ctxt.mappingException(Boolean.class); }
From source file:com.evolveum.midpoint.model.api.util.EvaluatedPolicyRuleUtil.java
private static void arrangeForPresentationInt(TreeNode<EvaluatedPolicyRuleTrigger<?>> root, EvaluatedPolicyRuleTrigger<?> trigger) { PolicyConstraintPresentationType presentation = trigger.getConstraint().getPresentation(); boolean hidden = isHidden(presentation, trigger.getConstraintKind()); boolean isFinal = presentation != null && Boolean.TRUE.equals(presentation.isFinal()); if (!hidden) { TreeNode<EvaluatedPolicyRuleTrigger<?>> newNode = new TreeNode<>(trigger); root.add(newNode);//from ww w . j a v a 2s .com root = newNode; } if (!isFinal) { for (EvaluatedPolicyRuleTrigger<?> innerTrigger : trigger.getInnerTriggers()) { arrangeForPresentationInt(root, innerTrigger); } } }
From source file:net.sourceforge.fenixedu.applicationTier.Servico.resourceAllocationManager.RemoverTurno.java
@Atomic public static Object run(final InfoShift infoShift, final InfoClass infoClass) { check(RolePredicates.RESOURCE_ALLOCATION_MANAGER_PREDICATE); final Shift shift = FenixFramework.getDomainObject(infoShift.getExternalId()); if (shift == null) { return Boolean.FALSE; }//from w w w . ja va 2 s .c om final SchoolClass schoolClass = (SchoolClass) CollectionUtils.find(shift.getAssociatedClassesSet(), new Predicate() { @Override public boolean evaluate(Object arg0) { final SchoolClass schoolClass = (SchoolClass) arg0; return schoolClass.getExternalId().equals(infoClass.getExternalId()); } }); if (schoolClass == null) { return Boolean.FALSE; } shift.getAssociatedClassesSet().remove(schoolClass); return Boolean.TRUE; }
From source file:org.codehaus.groovy.grails.plugins.searchable.compass.mapping.SearchableGrailsDomainClassCompassMappingUtils.java
/** * Is the given GrailsDomainClass a root class in the Compass mapping? * @param grailsDomainClass the domain class to check for * @param searchableGrailsDomainClasses a collection of searchable GrailsDomainClass instances * @return true unless it's an embedded class in another domain class without explicit searchable declaration *//*from ww w .j av a2 s . com*/ public static boolean isRoot(GrailsDomainClass grailsDomainClass, Collection searchableGrailsDomainClasses) { // TODO log warning when used as both component and non-component Object value = SearchableUtils.getSearchablePropertyValue(grailsDomainClass); if (value instanceof Boolean) { return value.equals(Boolean.TRUE); } if (value == null) { return !SearchableUtils.isEmbeddedPropertyOfOtherDomainClass(grailsDomainClass, searchableGrailsDomainClasses); } return true; }
From source file:net.orpiske.sas.commons.xml.XmlWriterUtils.java
/** * Marshals an object into a formatted XML document * @param element the JAXB element object that represents an 'object' of * type T/*from w w w.jav a2 s . co m*/ * @param object the object to be transformed into XML * @param writer the writer object * @throws JAXBException if unable to transform the object to XML */ public static <T> void marshal(JAXBElement<T> element, T object, Writer writer) throws JAXBException { JAXBContext context = JAXBContext.newInstance(object.getClass().getPackage().getName()); Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); m.marshal(element, writer); }