Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-112857

Add DSLQuery integration for generated services and persistences

    Details

      Description

      Add DSLQuery integration for generated services and persistences.

      Return type is detected by the DSLQuery projection. Here are some examples:

      long count = fooPersistence.dslQuery(
      	DSLQueryFactoryUtil.count(
      	).from(
      		FooTable.INSTANCE
      	));
      
      List<Foo> foos = fooPersistence.dslQuery(
      	DSLQueryFactoryUtil.select(
      	).from(
      		FooTable.INSTANCE
      	));
      
      List<Long> fooIds = fooPersistence.dslQuery(
      	DSLQueryFactoryUtil.select(
      		FooTable.INSTANCE.fooId
      	).from(
      		FooTable.INSTANCE
      	));
      
      List<Object[]> columnValues = fooPersistence.dslQuery(
      	DSLQueryFactoryUtil.select(
      		FooTable.INSTANCE.fooId, FooTable.INSTANCE.barId
      	).from(
      		FooTable.INSTANCE
      	));
      

      Methods are also generated in the local services to delegate from other services.

      Note that calling:

      List<Foo> foos = barPersistence.dslQuery(
      	DSLQueryFactoryUtil.select(
      	).from(
      		FooTable.INSTANCE
      	));

      Will cause an exception since only FooPersistence will return a list of Foo.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kyle.miho Kyle Miho
              Reporter:
              preston.crary Preston Crary
              Engineering Assignee:
              Preston Crary
              Recent user:
              Kiyoshi Lee
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  7.0.X
                  7.1.X
                  7.2.X
                  Master