Package org.springframework.data.mongodb.repository

Examples of org.springframework.data.mongodb.repository.Address


  @Test
  public void bindsComplexPropertyCorrectly() throws Exception {

    StringBasedMongoQuery mongoQuery = createQueryForMethod("findByAddress", Address.class);

    Address address = new Address("Foo", "0123", "Bar");
    ConvertingParameterAccessor accesor = StubParameterAccessor.getAccessor(converter, address);

    DBObject dbObject = new BasicDBObject();
    converter.write(address, dbObject);
    dbObject.removeField(DefaultMongoTypeMapper.DEFAULT_TYPE_KEY);
View Full Code Here


  @Test
  public void bindsMultipleParametersCorrectly() throws Exception {

    StringBasedMongoQuery mongoQuery = createQueryForMethod("findByLastnameAndAddress", String.class, Address.class);

    Address address = new Address("Foo", "0123", "Bar");
    ConvertingParameterAccessor accesor = StubParameterAccessor.getAccessor(converter, "Matthews", address);

    DBObject addressDbObject = new BasicDBObject();
    converter.write(address, addressDbObject);
    addressDbObject.removeField(DefaultMongoTypeMapper.DEFAULT_TYPE_KEY);
View Full Code Here

TOP

Related Classes of org.springframework.data.mongodb.repository.Address

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.