/*
 * Copyright 2012-2019 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.data.mybatis.samples.repository;

import java.util.Collection;
import java.util.List;

import org.springframework.data.mybatis.repository.Modifying;
import org.springframework.data.mybatis.repository.MybatisRepository;
import org.springframework.data.mybatis.repository.Query;
import org.springframework.data.mybatis.samples.domain.Shop;
import org.springframework.data.repository.query.Param;

/**
 * Repository interface for {@code Shop}.
 *
 * @author JARVIS SONG
 * @since 2.0.0
 */
public interface ShopRepository extends MybatisRepository<Shop, Long>, ShopRepositoryCustom {

	List<Shop> findByNameLike(String name);

	@Modifying
	@Query("update #{#entityName} set active = :activeState where id in :ids")
	void updateActiveState(@Param("activeState") boolean activeState, @Param("ids") Long... ids);

	List<Shop> findByActiveTrue();

	List<Shop> findByActiveFalse();

	void removeByNameAndActiveOrEmailAddressNotLike(String name, Boolean active, String email);

	Collection<Shop> findByIdIn(@Param("ids") Long... ids);

	@Query("select * from #{#entityName} u where u.id in ?1")
	Collection<Shop> findByIdsCustomWithPositionalVarArgs(Long... ids);

	@Query("select * from #{#entityName} u where u.id in :ids")
	Collection<Shop> findByIdsCustomWithNamedVarArgs(@Param("ids") Long... ids);

}

@@ -981,16 +981,84 @@
 n.Shop;%0A
+import org.springframework.data.querydsl.QuerydslPredicateExecutor;%0A
 import o
@@ -1105,16 +1105,16 @@
 .Param;%0A
-
 %0A/**%0A * 
@@ -1229,17 +1229,19 @@
 pository
- 
+%0A%09%09
 extends 
@@ -1291,16 +1291,49 @@
 ryCustom
+, QuerydslPredicateExecutor%3CShop%3E
  %7B%0A%0A%09Lis

add querydsl