Let’s be honest: the amount of data collected by applications nowadays is growing at a scary pace. Many of them need to handle billions of users generating and consuming data at an incredible speed. Maybe you are wondering how to create an application like this? What is needed? What benefits can you take from this reality to your project? This session shows how Jakarta EE can meet these needs when you’re working with NoSQL databases in the cloud. It's the same approach used by some of the biggest companies in the world to store, analyze, and get results from really crazy amounts of data. No matter your project size, you can take it to the next level today.
33. We have Query by Text
List<Movie> movies = documentTemplate.query("select * from Movie
where year > 2012");
List<Person> people = columnTemplate.query("select * from Person
where age = 25");
Optional<God> god = keyValueTemplate.query("get 'Diana'");
List<City> cities = graphTemplate.query("g.V().hasLabel('City')");
34. We have Query by Text
PreparedStatement preparedStatement = template.prepare("select * from Person
where name = @name");
preparedStatement.bind("name", "Ada");
List<Person> adas = preparedStatement.getResultList();
//to graph just keep using gremlin
PreparedStatement prepare = graphTemplate().prepare("g.V().hasLabel(param)");
prepare.bind("param", "Person");
List<Person> people = preparedStatement.getResultList();
35. We have Query by Text
interface PersonRepository extends Repository<Person, Long> {
@Query("select * from Person")
Optional<Person> findByQuery();
@Query("select * from Person where id = @id")
Optional<Person> findByQuery(@Param("id") String id);
}