// Path: spring-data-querydsl-demo/src/main/java/org/springframework/data/querydsl/demo/data/GroupInfo.java
// @Entity
// @QueryEntity
// @org.springframework.data.mongodb.core.mapping.Document
// @Data
// @EqualsAndHashCode(of = "groupName")
// public class GroupInfo {
//     @NotNull
//     @Indexed(unique = true)
//     @Column(unique = true)
//     private String groupName;
//     @NotNull
//     @ManyToOne
//     @DBRef
//     private UserInfo groupOwner;
//     // Using a string id for use in both MongoDB and JPA.
//     @Id
//     @GeneratedValue(strategy = GenerationType.AUTO)
//     private BigInteger id;
// 
//     public GroupInfo() {
//         super();
//     }
// 
//     public GroupInfo(String groupName, UserInfo groupOwner) {
//         super();
//         this.groupName = groupName;
//         this.groupOwner = groupOwner;
//     }
// }
// 
// Path: spring-data-querydsl-demo/src/main/java/org/springframework/data/querydsl/demo/data/GroupMember.java
// @Entity
// @QueryEntity
// @org.springframework.data.mongodb.core.mapping.Document
// @Data
// @EqualsAndHashCode(of = {"member", "memberOfgroup"})
// public class GroupMember {
//     @NotNull
//     private Boolean enabled;
//     // Using a string id for use in both MongoDB and JPA.
//     @Id
//     @GeneratedValue(strategy = GenerationType.AUTO)
//     private BigInteger id;
//     @NotNull
//     @ManyToOne
//     @DBRef
//     private UserInfo member;
//     @NotNull
//     @ManyToOne
//     @DBRef
//     private GroupInfo memberOfgroup;
// 
//     public GroupMember() {
//         super();
//     }
// 
//     public GroupMember(GroupInfo memberOfgroup, UserInfo member, Boolean enabled) {
//         super();
//         this.memberOfgroup = memberOfgroup;
//         this.member = member;
//         this.enabled = enabled;
//     }
// }
// 
// Path: spring-data-querydsl-demo/src/main/java/org/springframework/data/querydsl/demo/data/UserInfo.java
// @Entity
// @QueryEntity
// @org.springframework.data.mongodb.core.mapping.Document
// @Data
// @EqualsAndHashCode(of = "userId")
// public class UserInfo {
//     @Temporal(TemporalType.DATE)
//     @DateTimeFormat(style = "M-")
//     private Date dateOfBirth;
//     private String emailAddress;
//     @NotNull
//     private String fullName;
//     // Using a string id for use in both MongoDB and JPA.
//     @Id
//     @GeneratedValue(strategy = GenerationType.AUTO)
//     private BigInteger id;
//     @NotNull
//     @Column(unique = true)
//     @Indexed(unique = true)
//     private String userId;
// 
//     public UserInfo() {
//     }
// 
//     public UserInfo(String userId, String fullName) {
//         this.userId = userId;
//         this.fullName = fullName;
//     }
// }


import org.springframework.data.querydsl.demo.data.GroupInfo;
import org.springframework.data.querydsl.demo.data.GroupMember;
import org.springframework.data.querydsl.demo.data.UserInfo;
import javax.validation.Valid;
import java.util.List;
package org.springframework.data.querydsl.demo.service;



public interface UserGroupDataService {
    // Added for testing
    public void deleteAllData();

    public void deleteGroupInfo(GroupInfo groupInfo);

    public void deleteGroupMember(GroupMember groupMember);

    public void deleteUserInfo(UserInfo userInfo);

    public GroupInfo findGroup(String name);

    public UserInfo findUser(String userId);

    public List<UserInfo> listActiveUsersInGroup(String groupName);

    public List<UserInfo> listAllUsers();

    public List<UserInfo> listAllUsersInGroup(String groupName);

    public List<GroupInfo> listGroupsForUser(String userId);

    public void saveGroupInfo(@Valid GroupInfo groupInfo);

// Path: spring-data-querydsl-demo/src/main/java/org/springframework/data/querydsl/demo/data/GroupInfo.java
// @Entity
// @QueryEntity
// @org.springframework.data.mongodb.core.mapping.Document
// @Data
// @EqualsAndHashCode(of = "groupName")
// public class GroupInfo {
//     @NotNull
//     @Indexed(unique = true)
//     @Column(unique = true)
//     private String groupName;
//     @NotNull
//     @ManyToOne
//     @DBRef
//     private UserInfo groupOwner;
//     // Using a string id for use in both MongoDB and JPA.
//     @Id
//     @GeneratedValue(strategy = GenerationType.AUTO)
//     private BigInteger id;
// 
//     public GroupInfo() {
//         super();
//     }
// 
//     public GroupInfo(String groupName, UserInfo groupOwner) {
//         super();
//         this.groupName = groupName;
//         this.groupOwner = groupOwner;
//     }
// }
// 
// Path: spring-data-querydsl-demo/src/main/java/org/springframework/data/querydsl/demo/data/GroupMember.java
// @Entity
// @QueryEntity
// @org.springframework.data.mongodb.core.mapping.Document
// @Data
// @EqualsAndHashCode(of = {"member", "memberOfgroup"})
// public class GroupMember {
//     @NotNull
//     private Boolean enabled;
//     // Using a string id for use in both MongoDB and JPA.
//     @Id
//     @GeneratedValue(strategy = GenerationType.AUTO)
//     private BigInteger id;
//     @NotNull
//     @ManyToOne
//     @DBRef
//     private UserInfo member;
//     @NotNull
//     @ManyToOne
//     @DBRef
//     private GroupInfo memberOfgroup;
// 
//     public GroupMember() {
//         super();
//     }
// 
//     public GroupMember(GroupInfo memberOfgroup, UserInfo member, Boolean enabled) {
//         super();
//         this.memberOfgroup = memberOfgroup;
//         this.member = member;
//         this.enabled = enabled;
//     }
// }
// 
// Path: spring-data-querydsl-demo/src/main/java/org/springframework/data/querydsl/demo/data/UserInfo.java
// @Entity
// @QueryEntity
// @org.springframework.data.mongodb.core.mapping.Document
// @Data
// @EqualsAndHashCode(of = "userId")
// public class UserInfo {
//     @Temporal(TemporalType.DATE)
//     @DateTimeFormat(style = "M-")
//     private Date dateOfBirth;
//     private String emailAddress;
//     @NotNull
//     private String fullName;
//     // Using a string id for use in both MongoDB and JPA.
//     @Id
//     @GeneratedValue(strategy = GenerationType.AUTO)
//     private BigInteger id;
//     @NotNull
//     @Column(unique = true)
//     @Indexed(unique = true)
//     private String userId;
// 
//     public UserInfo() {
//     }
// 
//     public UserInfo(String userId, String fullName) {
//         this.userId = userId;
//         this.fullName = fullName;
//     }
// }


// Path: spring-data-querydsl-demo/src/main/java/org/springframework/data/querydsl/demo/service/UserGroupDataService.java
import org.springframework.data.querydsl.demo.data.GroupInfo;
import org.springframework.data.querydsl.demo.data.GroupMember;
import org.springframework.data.querydsl.demo.data.UserInfo;
import javax.validation.Valid;
import java.util.List;

package org.springframework.data.querydsl.demo.service;



public interface UserGroupDataService {
    // Added for testing
    public void deleteAllData();

    public void deleteGroupInfo(GroupInfo groupInfo);

    public void deleteGroupMember(GroupMember groupMember);

    public void deleteUserInfo(UserInfo userInfo);

    public GroupInfo findGroup(String name);

    public UserInfo findUser(String userId);

    public List<UserInfo> listActiveUsersInGroup(String groupName);

    public List<UserInfo> listAllUsers();

    public List<UserInfo> listAllUsersInGroup(String groupName);

    public List<GroupInfo> listGroupsForUser(String userId);

    public void saveGroupInfo(@Valid GroupInfo groupInfo);

    public void saveGroupMember(@Valid GroupMember groupMember);