// Path: src/main/java/com/idugalic/security/domain/User.java
// @Entity
// @Table(name = "app_user")
// public class User {
//     @Id
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     @Column(name = "id")
//     private Long id;
// 
//     @Column(name = "username")
//     private String username;
// 
//     @Column(name = "password")
//     private String password;
// 
//     @Column(name = "first_name")
//     private String firstName;
// 
//     @Column(name = "last_name")
//     private String lastName;
// 
//     /**
//      * Roles are being eagerly loaded here because
//      * they are a fairly small collection of items for this example.
//      */
//     @ManyToMany(fetch = FetchType.EAGER)
//     @JoinTable(name = "user_role", joinColumns
//             = @JoinColumn(name = "user_id",
//             referencedColumnName = "id"),
//             inverseJoinColumns = @JoinColumn(name = "role_id",
//                     referencedColumnName = "id"))
//     private List<Role> roles;
// 
//     public Long getId() {
//         return id;
//     }
// 
//     public void setId(Long id) {
//         this.id = id;
//     }
// 
//     public String getUsername() {
//         return username;
//     }
// 
//     public void setUsername(String username) {
//         this.username = username;
//     }
// 
//     public String getPassword() {
//         return password;
//     }
// 
//     public void setPassword(String password) {
//         this.password = password;
//     }
// 
//     public String getFirstName() {
//         return firstName;
//     }
// 
//     public void setFirstName(String firstName) {
//         this.firstName = firstName;
//     }
// 
//     public String getLastName() {
//         return lastName;
//     }
// 
//     public void setLastName(String lastName) {
//         this.lastName = lastName;
//     }
// 
//     public List<Role> getRoles() {
//         return roles;
//     }
// 
//     public void setRoles(List<Role> roles) {
//         this.roles = roles;
//     }
// }


import org.springframework.beans.factory.ObjectFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.convert.ConversionService;
import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter;
import org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration;
import com.idugalic.queryside.blog.domain.BlogPost;
import com.idugalic.queryside.project.domain.Project;
import com.idugalic.queryside.team.domain.Member;
import com.idugalic.queryside.team.domain.Team;
import com.idugalic.security.domain.User;
package com.idugalic.configuration;



/**
 * A configuration of rest data respositories for {@link BlogPost} and
 * {@link Project}.
 * 
 * @author idugalic
 *
 */
@Configuration
public class RestConfiguration extends RepositoryRestMvcConfiguration {

	public RestConfiguration(ApplicationContext context, ObjectFactory<ConversionService> conversionService) {
		super(context, conversionService);
	}

	@Configuration
	static class RestConfigurationExposeId extends RepositoryRestConfigurerAdapter {
		@Override
		public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) {
// Path: src/main/java/com/idugalic/security/domain/User.java
// @Entity
// @Table(name = "app_user")
// public class User {
//     @Id
//     @GeneratedValue(strategy = GenerationType.IDENTITY)
//     @Column(name = "id")
//     private Long id;
// 
//     @Column(name = "username")
//     private String username;
// 
//     @Column(name = "password")
//     private String password;
// 
//     @Column(name = "first_name")
//     private String firstName;
// 
//     @Column(name = "last_name")
//     private String lastName;
// 
//     /**
//      * Roles are being eagerly loaded here because
//      * they are a fairly small collection of items for this example.
//      */
//     @ManyToMany(fetch = FetchType.EAGER)
//     @JoinTable(name = "user_role", joinColumns
//             = @JoinColumn(name = "user_id",
//             referencedColumnName = "id"),
//             inverseJoinColumns = @JoinColumn(name = "role_id",
//                     referencedColumnName = "id"))
//     private List<Role> roles;
// 
//     public Long getId() {
//         return id;
//     }
// 
//     public void setId(Long id) {
//         this.id = id;
//     }
// 
//     public String getUsername() {
//         return username;
//     }
// 
//     public void setUsername(String username) {
//         this.username = username;
//     }
// 
//     public String getPassword() {
//         return password;
//     }
// 
//     public void setPassword(String password) {
//         this.password = password;
//     }
// 
//     public String getFirstName() {
//         return firstName;
//     }
// 
//     public void setFirstName(String firstName) {
//         this.firstName = firstName;
//     }
// 
//     public String getLastName() {
//         return lastName;
//     }
// 
//     public void setLastName(String lastName) {
//         this.lastName = lastName;
//     }
// 
//     public List<Role> getRoles() {
//         return roles;
//     }
// 
//     public void setRoles(List<Role> roles) {
//         this.roles = roles;
//     }
// }


// Path: src/main/java/com/idugalic/configuration/RestConfiguration.java
import org.springframework.beans.factory.ObjectFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.convert.ConversionService;
import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter;
import org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration;
import com.idugalic.queryside.blog.domain.BlogPost;
import com.idugalic.queryside.project.domain.Project;
import com.idugalic.queryside.team.domain.Member;
import com.idugalic.queryside.team.domain.Team;
import com.idugalic.security.domain.User;

package com.idugalic.configuration;



/**
 * A configuration of rest data respositories for {@link BlogPost} and
 * {@link Project}.
 * 
 * @author idugalic
 *
 */
@Configuration
public class RestConfiguration extends RepositoryRestMvcConfiguration {

	public RestConfiguration(ApplicationContext context, ObjectFactory<ConversionService> conversionService) {
		super(context, conversionService);
	}

	@Configuration
	static class RestConfigurationExposeId extends RepositoryRestConfigurerAdapter {
		@Override
		public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) {
			config.exposeIdsFor(BlogPost.class, Project.class, Team.class, Member.class, User.class);