Examples of lower()


Examples of java.util.NavigableSet.lower()

        if (entrySet instanceof NavigableSet) {
            ascendingSubMapEntrySet = (NavigableSet) entrySet;
            iterator = ascendingSubMapEntrySet.iterator();
            while (iterator.hasNext()) {
                entry = (Entry) iterator.next();
                lowerEntry = (Entry) ascendingSubMapEntrySet.lower(entry);
                value = (Integer) entry.getValue();
                if (value > 101) {
                    assertEquals(value - 1, lowerEntry.getValue());
                } else {
                    assertNull(lowerEntry);
View Full Code Here

Examples of java.util.NavigableSet.lower()

        if (entrySet instanceof NavigableSet) {
            ascendingSubMapEntrySet = (NavigableSet) entrySet;
            iterator = ascendingSubMapEntrySet.iterator();
            while (iterator.hasNext()) {
                entry = (Entry) iterator.next();
                lowerEntry = (Entry) ascendingSubMapEntrySet.lower(entry);
                value = (Integer) entry.getValue();
                if (value > 100) {
                    assertEquals(value - 1, lowerEntry.getValue());
                } else {
                    assertNull(lowerEntry);
View Full Code Here

Examples of java.util.NavigableSet.lower()

        if (entrySet instanceof NavigableSet) {
            ascendingSubMapEntrySet = (NavigableSet) entrySet;
            iterator = ascendingSubMapEntrySet.iterator();
            while (iterator.hasNext()) {
                entry = (Entry) iterator.next();
                lowerEntry = (Entry) ascendingSubMapEntrySet.lower(entry);
                value = (Integer) entry.getValue();
                if (value > 100) {
                    assertEquals(value - 1, lowerEntry.getValue());
                } else {
                    assertNull(lowerEntry);
View Full Code Here

Examples of java.util.NavigableSet.lower()

        if (entrySet instanceof NavigableSet) {
            ascendingSubMapEntrySet = (NavigableSet) entrySet;
            iterator = entrySet.iterator();
            Entry expectedEntry = (Entry) iterator.next();
            entry = (Entry) iterator.next();
            assertEquals(expectedEntry, ascendingSubMapEntrySet.lower(entry));
        }

        // With Comparator

        entrySet = subMap_startExcluded_endExcluded_comparator.entrySet();
View Full Code Here

Examples of java.util.NavigableSet.lower()

        if (entrySet instanceof NavigableSet) {
            ascendingSubMapEntrySet = (NavigableSet) entrySet;
            iterator = ascendingSubMapEntrySet.iterator();
            while (iterator.hasNext()) {
                entry = (Entry) iterator.next();
                lowerEntry = (Entry) ascendingSubMapEntrySet.lower(entry);
                value = (Integer) entry.getValue();
                if (value > 101) {
                    assertEquals(value - 1, lowerEntry.getValue());
                } else {
                    assertNull(lowerEntry);
View Full Code Here

Examples of java.util.NavigableSet.lower()

        if (entrySet instanceof NavigableSet) {
            ascendingSubMapEntrySet = (NavigableSet) entrySet;
            iterator = ascendingSubMapEntrySet.iterator();
            while (iterator.hasNext()) {
                entry = (Entry) iterator.next();
                lowerEntry = (Entry) ascendingSubMapEntrySet.lower(entry);
                value = (Integer) entry.getValue();
                if (value > 101) {
                    assertEquals(value - 1, lowerEntry.getValue());
                } else {
                    assertNull(lowerEntry);
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.lower()

    em.getTransaction().begin();
    CriteriaBuilder cb = em.getCriteriaBuilder();
    // lower
    CriteriaQuery<Client> cq = cb.createQuery( Client.class );
    Root<Client> root = cq.from( Client.class );
    cq.where( cb.equal( cb.lower( root.get( Client_.name ).get( Name_.lastName ) ),"test" ) );
    em.createQuery( cq ).getResultList();
    // upper
    cq = cb.createQuery( Client.class );
    root = cq.from( Client.class );
    cq.where( cb.equal( cb.upper( root.get( Client_.name ).get( Name_.lastName ) ),"test" ) );
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.lower()

  @WebMethod
  public void insertEventTask(@WebParam(name = "eventUri") String eventUri) {
    CriteriaBuilder cb = em.getCriteriaBuilder();
    CriteriaQuery<IntEvent> cq = cb.createQuery(IntEvent.class);
    Root<IntEvent> evta = cq.from(IntEvent.class);
    cq.where(cb.equal(cb.lower(evta.get(IntEvent_.eventUri)), eventUri.toLowerCase()));
    List<IntEvent> list = em.createQuery(cq).getResultList();
    if (list.size() == 0) {
      IntEvent intEvent = new IntEvent();
      intEvent.setEventUri(eventUri);
      intEvent.getFingerprint().setInsertDate(new Date());
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.lower()

    @Override
    public MetadataCategory findOneByNameIgnoreCase(@Nonnull String name) {
        final CriteriaBuilder cb = _entityManager.getCriteriaBuilder();
        final CriteriaQuery<MetadataCategory> cbQuery = cb.createQuery(MetadataCategory.class);
        final Root<MetadataCategory> root = cbQuery.from(MetadataCategory.class);
        final Expression<String> lowerName = cb.lower(root.get(MetadataCategory_.name));
        final Expression<String> lowerRequiredName = cb.lower(cb.literal(name));
        cbQuery.where(cb.equal(lowerName, lowerRequiredName));
        return _entityManager.createQuery(cbQuery).getSingleResult();
    }
View Full Code Here

Examples of javax.persistence.criteria.CriteriaBuilder.lower()

    public MetadataCategory findOneByNameIgnoreCase(@Nonnull String name) {
        final CriteriaBuilder cb = _entityManager.getCriteriaBuilder();
        final CriteriaQuery<MetadataCategory> cbQuery = cb.createQuery(MetadataCategory.class);
        final Root<MetadataCategory> root = cbQuery.from(MetadataCategory.class);
        final Expression<String> lowerName = cb.lower(root.get(MetadataCategory_.name));
        final Expression<String> lowerRequiredName = cb.lower(cb.literal(name));
        cbQuery.where(cb.equal(lowerName, lowerRequiredName));
        return _entityManager.createQuery(cbQuery).getSingleResult();
    }

    @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.