Speedment Stream is a Java ORM toolkit and runtime which fills the void of a modern alternative to Hibernate. The toolkit analyzes the metadata of an existing SQL database and automatically creates a Java representation of the data model. Queries are then expressed as standard Java Streams instead of a sequences of SQL constructs.
SQL |
JAVA STREAM |
---|---|
Carina DreifeldtFounder and CEO of Speedment
Speedment Stream analyses the underlying data sources’ metadata and automatically creates code which directly reflects the structure (i.e. the “domain model”) of the underlying data sources.
The graphical interface allows many custom configurations and optimizations.
Speedment leverages the standard Java Stream API to enable database querying using lambdas without a single line of SQL. A custom delegator is used to optimize the resulting SQL queries for reduced database load, latency, and network load.
SELECT
COUNT(*)
FROM
(
SELECT
`film_id`,`title`,`description`,`release_year`,`language_id`,`original_language_id`,
`rental_duration`,`rental_rate`,`length`,`replacement_cost`,`rating`,`special_features`,`last_update`
FROM
`sakila`.`film`
WHERE
(`sakila`.`film`.`length` > ?)
) AS A, values:[120]
long noLongFilms = films.stream()
.filter(Film.LENGTH.greaterThan(120))
.count();
SELECT
`film_id`,`title`,`description`,`release_year`,`language_id`,`original_language_id`,
`rental_duration`,`rental_rate`,`length`,`replacement_cost`,`rating`,`special_features`,`last_update`
FROM
`sakila`.`film`
ORDER BY
`sakila`.`film`.`title` ASC
LIMIT
?, values:[10]
films.stream()
.sorted(Film.TITLE)
.limit(3)
.forEachOrdered(System.out::println);
SELECT
`film_id`,`title`,`description`,`release_year`,`language_id`,`original_language_id`,
`rental_duration`,`rental_rate`,`length`,`replacement_cost`,`rating`,`special_features`,`last_update`
FROM
`sakila`.`film`
ORDER BY
`sakila`.`film`.`title` ASC
LIMIT
?, values:[10]
films.stream()
.sorted(Film.TITLE)
.limit(3)
.forEachOrdered(System.out::println);
SELECT
`film_id`,`title`,`description`,`release_year`,`language_id`,`original_language_id`,
`rental_duration`,`rental_rate`,`length`,`replacement_cost`,`rating`,`special_features`,`last_update`
FROM
`sakila`.`film`
WHERE
(`sakila`.`film`.`length` > ?), values:[120]
films.stream()
.filter(Film.LENGTH.greaterThan(120))
.forEachOrdered(System.out::println);
SELECT
`film_id`,`title`,`description`,`release_year`,`language_id`,`original_language_id`,
`rental_duration`,`rental_rate`,`length`,`replacement_cost`,`rating`,`special_features`,`last_update`
FROM
`sakila`.`film`
ORDER BY
`sakila`.`film`.`title` ASC
LIMIT
?, values:[10]
films.stream()
.sorted(Film.TITLE)
.limit(3)
.forEachOrdered(System.out::println);
SELECT
`film_id`,`title`,`description`,`release_year`,`language_id`,`original_language_id`,
`rental_duration`,`rental_rate`,`length`,`replacement_cost`,`rating`,`special_features`,`last_update`
FROM
`sakila`.`film`
ORDER BY
`sakila`.`film`.`length` ASC
List filmsInLengthOrder = films.stream()
.sorted(Film.LENGTH)
.collect(Collectors.toList());
The generated code that reflects the data source in combination with Java as the query language enables full type-safety. Syntax errors are discovered in real time rather than weeks into the testing phase or even worse, in production.
Unsure what tables or columns that are available in the data source? You can trust tab-completion to fill in any gaps.
Speedment Stream coexists nicely with the current backend and works for any RDBMS; MySQL, DB2, Microsoft SQL Server, Oracle, AS/400, PostgreSQL, MariaDB, SQLite, Informix or Snowflake.
Speedment Stream is now capable of generating a complete Spring Boot REST API (including all CRUD operators) for your database. It is ready for deployment in minutes.