Skip to content

Instantly share code, notes, and snippets.

@littlebeeper
Last active May 23, 2018 05:34
Show Gist options
  • Save littlebeeper/c0cc51ed2f9ae4c56b9b49dd69a2d586 to your computer and use it in GitHub Desktop.
Save littlebeeper/c0cc51ed2f9ae4c56b9b49dd69a2d586 to your computer and use it in GitHub Desktop.
public List<EntityDate> findTodaysEntries() {
LocalDateTime now = LocalDateTime.now();
return entity.findByEntityDateBetween(now.with(LocalTime.MIN), now.with(LocalTime.MAX));
}
//Spring data retreive first 50 results with pageable;
public List<AnEntity> retrieveFirst50() {
Pageable pageable = new PageRequest(0, 50, Sort.Direction.DESC, "matchcode");
Page<AnEntity> all = anEntityRepository.findAll(pageable);
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment