You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Moldachev Sergey (Jira)" <ji...@apache.org> on 2020/06/08 16:22:00 UTC

[jira] [Updated] (IGNITE-13133) Add integration with QuerydslPredicateExecutor for spring-data integrations

     [ https://issues.apache.org/jira/browse/IGNITE-13133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Moldachev Sergey updated IGNITE-13133:
--------------------------------------
    Description: 
We have a pretty ignite-spring-data integration but we don't have a support of *QuerydslPredicateExecutor* which provide ability to filter cache entities by dynamic criterias. 

Example of usage:

{code:java}
/**
* Simple entity.
*/
@QueryEntity
public class Person {
    /** First name. */
    @QuerySqlField(index = true)
    private String firstName;

    /** Second name. */
    @QuerySqlField(index = true)
    private String secondName;

    /** Age. **/
    @QuerySqlField(index = true)
    private int age;
}

/**
* Implement QuerydslPredicateExecutor interface.
*/
public interface PersonRepository extends IgniteRepository<Person, Integer>, QuerydslPredicateExecutor<Person> {

}

/**
* Now we can filter our entites by firstName prdicate.
*/
List<Person> persons = (List<Person>) repo.findAll(
        QPerson.person.firstName.eq(firstName_1)
            .or(QPerson.person.firstName.eq(firstName_2))
);
{code}


  was:
We have a pretty ignite-spring-data integration but we don't have a support of *QuerydslPredicateExecutor *which provide ability to filter cache entities by dynamic criterias. 

Example of usage:

{code:java}
/**
* Simple entity.
*/
@QueryEntity
public class Person {
    /** First name. */
    @QuerySqlField(index = true)
    private String firstName;

    /** Second name. */
    @QuerySqlField(index = true)
    private String secondName;

    /** Age. **/
    @QuerySqlField(index = true)
    private int age;
}

/**
* Implement QuerydslPredicateExecutor interface.
*/
public interface PersonRepository extends IgniteRepository<Person, Integer>, QuerydslPredicateExecutor<Person> {

}

/**
* Now we can filter our entites by firstName prdicate.
*/
List<Person> persons = (List<Person>) repo.findAll(
        QPerson.person.firstName.eq(firstName_1)
            .or(QPerson.person.firstName.eq(firstName_2))
);
{code}



> Add integration with QuerydslPredicateExecutor for spring-data integrations
> ---------------------------------------------------------------------------
>
>                 Key: IGNITE-13133
>                 URL: https://issues.apache.org/jira/browse/IGNITE-13133
>             Project: Ignite
>          Issue Type: New Feature
>          Components: springdata
>            Reporter: Moldachev Sergey
>            Assignee: Moldachev Sergey
>            Priority: Major
>
> We have a pretty ignite-spring-data integration but we don't have a support of *QuerydslPredicateExecutor* which provide ability to filter cache entities by dynamic criterias. 
> Example of usage:
> {code:java}
> /**
> * Simple entity.
> */
> @QueryEntity
> public class Person {
>     /** First name. */
>     @QuerySqlField(index = true)
>     private String firstName;
>     /** Second name. */
>     @QuerySqlField(index = true)
>     private String secondName;
>     /** Age. **/
>     @QuerySqlField(index = true)
>     private int age;
> }
> /**
> * Implement QuerydslPredicateExecutor interface.
> */
> public interface PersonRepository extends IgniteRepository<Person, Integer>, QuerydslPredicateExecutor<Person> {
> }
> /**
> * Now we can filter our entites by firstName prdicate.
> */
> List<Person> persons = (List<Person>) repo.findAll(
>         QPerson.person.firstName.eq(firstName_1)
>             .or(QPerson.person.firstName.eq(firstName_2))
> );
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)