Spring Data JPA Example Code

The following source code was automatically generated by the Inferno DAO Code Generator.

Entity Class

@Table(name = "groups")
public class Groups {

  @Column(name = "id")
  private Integer id;
  @Column(name = "name")
  private String name;
  @Column(name = "user")
  private String user;
  protected Groups() {}
  public void setId(Integer id) {
    this.id = id;
  public Integer getId() {
    return this.id;
  public void setName(String name) {
    this.name = name;
  public String getName() {
    return this.name;
  public void setUser(String user) {
    this.user = user;
  public String getUser() {
    return this.user;

Repository Class

public interface GroupsRepository extends CrudRepository<Groups, Integer> {
  Optional<Groups> findById(Integer id);
  List<Groups> findByName(String name);
  List<Groups> findByUser(String user);