Package org.springframework.data.repository.query.parser

Examples of org.springframework.data.repository.query.parser.Part


    @Override
    @Test
    public void createsQueryForMultipleStartClauses() {
        this.trsSpecificExpectedQuery = "START `person`=node:`Person`(`name2`={0}), `person_group`=node:`Group`(`name2`={1}) MATCH (`person`)<-[:`members`]-(`person_group`) RETURN `person`";
        query.addRestriction(new Part("name2", Person.class));
        query.addRestriction(new Part("group.name2", Person.class));
        assertThat(query.toString(), is( trsSpecificExpectedQuery));
    }
View Full Code Here


    }

    @Override
    @Test
    public void createsQueryForPropertyOnRelationShipReference() {
        Part part = new Part("group.name", Person.class);
        query.addRestriction(part);
        assertThat(query.toString(), is( "MATCH (`person`)<-[:`members`]-(`person_group`) WHERE `person_group`.`name` = {0} RETURN `person`"));
    }
View Full Code Here

    this.source = source;
   
    if (source != null && source.length() > 0) {
      try {
        Part part = new Part(source, domainType);
        this.path = part.getProperty();
        this.seed = null;
        this.type = part.getType();
      } catch (PropertyReferenceException e) {
        this.path = e.getBaseProperty();
        this.seed = e.getPropertyName();
        this.type = null;
      }
View Full Code Here

TOP

Related Classes of org.springframework.data.repository.query.parser.Part

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.