Package org.springframework.data.mongodb.core.mapping

Examples of org.springframework.data.mongodb.core.mapping.MongoPersistentProperty


    for (Object arg : expr.getArgs()) {

      if (arg instanceof Path) {

        MongoPersistentProperty property = getPropertyFor((Path<?>) arg);
        Object constant = ((Constant<?>) expr.getArg(constIndex)).getConstant();

        return converter.toDBRef(constant, property);
      }
    }
View Full Code Here


    if (isGeoNearQuery && part.getType().equals(Type.NEAR)) {
      return null;
    }

    PersistentPropertyPath<MongoPersistentProperty> path = context.getPersistentPropertyPath(part.getProperty());
    MongoPersistentProperty property = path.getLeafProperty();
    Criteria criteria = from(part, property, where(path.toDotPath()), (PotentiallyConvertingIterator) iterator);

    return criteria;
  }
View Full Code Here

    if (base == null) {
      return create(part, iterator);
    }

    PersistentPropertyPath<MongoPersistentProperty> path = context.getPersistentPropertyPath(part.getProperty());
    MongoPersistentProperty property = path.getLeafProperty();

    return from(part, property, base.and(path.toDotPath()), (PotentiallyConvertingIterator) iterator);
  }
View Full Code Here

        public String language() {
          return null;
        }
      };

      MongoPersistentProperty propertyMock = mock(MongoPersistentProperty.class);
      when(propertyMock.isEntity()).thenReturn(true);
      when(propertyMock.getOwner()).thenReturn(
          (PersistentEntity) MongoPersistentEntityDummyBuilder.forClass(Object.class).build());
      when(propertyMock.getActualType()).thenThrow(
          new MongoPersistentEntityIndexResolver.CyclicPropertyReferenceException("foo", Object.class, "bar"));

      MongoPersistentEntity<SelfCyclingViaCollectionType> dummy = MongoPersistentEntityDummyBuilder
          .forClass(SelfCyclingViaCollectionType.class).withCollection("foo").and(propertyMock).and(documentDummy)
          .build();
View Full Code Here

TOP

Related Classes of org.springframework.data.mongodb.core.mapping.MongoPersistentProperty

Copyright © 2018 www.massapicom. 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.