Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public interface CrudRepository<E, K>

Base contract for generated repositories. The caller owns the Session and transaction. save returns the managed merge result; insert schedules a new instance for persistence.

Methods

public abstract E findById(K id)
public abstract E save(E entity)
public abstract void insert(E entity)
public abstract void deleteById(K id)
public abstract List<E> findAll()
public abstract long count()
public abstract boolean existsById(K id)

Method details

findById

public abstract E findById(K id)

save

public abstract E save(E entity)

insert

public abstract void insert(E entity)

deleteById

public abstract void deleteById(K id)

findAll

public abstract List<E> findAll()

count

public abstract long count()

existsById

public abstract boolean existsById(K id)