Speedment Stream

A Java ORM That the Java Community Deserves.

Write Database Applications While Remaining in a Pure Java World

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
FROM stream()
COUNT count()
LIMIT limit()
SELECT map()
WHERE filter() (before collecting)
HAVING filter() (after collecting)
JOIN flatmap()
UNION concat(s0, s1).distinct()
ORDER BY sorted()
OFFSET skip()
GROUP BY collect(groupingBY())

”Speedment was originally developed by researchers and engineers based in Palo Alto with the purpose to simplify and streamline the development of Java database applications by leveraging the Java Stream API.”

Carina Dreifeldt
Founder and CEO of Speedment

Powerful Code Generator

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.

Generator

Queries Expressed as Standard Java Streams

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.

SQL query

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]
                                        
Corresponding Java Stream

long noLongFilms = films.stream()
    .filter(Film.LENGTH.greaterThan(120))
    .count();
                                       
SQL query

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]
                                        
Corresponding Java Stream

films.stream()
    .sorted(Film.TITLE)
    .limit(3)
    .forEachOrdered(System.out::println);
                                       
SQL query

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]
                                        
Corresponding Java Stream

films.stream()
    .sorted(Film.TITLE)
    .limit(3)
    .forEachOrdered(System.out::println);
                                       
SQL query

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]
                                        
Corresponding Java Stream

films.stream()
    .filter(Film.LENGTH.greaterThan(120))
    .forEachOrdered(System.out::println);
                                       
SQL query

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]
                                        
Corresponding Java Stream

films.stream()
    .sorted(Film.TITLE)
    .limit(3)
    .forEachOrdered(System.out::println);
                                       
SQL query

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
                                        
Corresponding Java Stream

List filmsInLengthOrder = films.stream()
    .sorted(Film.LENGTH)
    .collect(Collectors.toList());
                                       

Full Type-safety

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.

Type-safety

Utilize Tab Completion

Unsure what tables or columns that are available in the data source? You can trust tab-completion to fill in any gaps.

Tab Completion

Integrates with Any RDBMS

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.

WHATS NEW

Generate a Complete Spring REST API

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.