This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @author Emil Forslund | |
* @since 1.0.0 | |
*/ | |
public final class Main { | |
@SuppressWarnings("unchecked") | |
public static void main(String... param) | |
throws InterruptedException, ExecutionException, IOException { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"config" : { | |
"name" : "sales", | |
"dbmses" : [{ | |
"name" : "db0", | |
"typeName" : "MySQL", | |
"ipAddress" : "127.0.0.1", | |
"username" : "root", | |
"schemas" : [{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class TableEnumPlugin { | |
@ExecuteBefore(INITIALIZED) | |
void install(CodeGenerationComponent codeGen) { | |
codeGen.put(Project.class, TABLES_ENUM_KEY, TableEnumTranslator::new); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE "region" ( | |
"id" SERIAL PRIMARY KEY NOT NULL, | |
"abbrevation" CHAR(2) UNIQUE NOT NULL, | |
"name" VARCHAR(32) UNIQUE NOT NULL | |
); | |
CREATE TABLE "country" ( | |
"id" SERIAL PRIMARY KEY NOT NULL, | |
"abbrevation" CHAR(2) UNIQUE NOT NULL, | |
"name" VARCHAR(64) NOT NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.pyknic.variant; | |
import com.speedment.codegen.lang.models.Generic; | |
import com.speedment.codegen.lang.models.Type; | |
import static com.speedment.codegen.lang.models.constants.DefaultType.DOUBLE_PRIMITIVE; | |
import static com.speedment.codegen.lang.models.constants.DefaultType.INT_PRIMITIVE; | |
import static com.speedment.codegen.lang.models.constants.DefaultType.LONG_PRIMITIVE; | |
import static com.speedment.codegen.lang.models.constants.DefaultType.OBJECT; | |
import java.util.Optional; | |
import java.util.OptionalDouble; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Write some documentation here. | |
*/ | |
package com.speedment.steam.action; | |
import java.util.stream.Stream; | |
import java.util.function.Function; | |
import com.speedment.stream.StreamAction; | |
import static java.util.Objects.requireNonNull; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MapStream.fromKeys( | |
actors.stream(), // Stream<Actor> | |
actor -> actor.findActorFilms() // Stream<ActorFilm> | |
.map(ActorFilm::findFilm), // Stream<Film> | |
.collect(groupBy(film -> film.getRating())) // MapStream<Rating, List<Film>> | |
.mapValue(List::size) // MapStream<Rating, Integer> | |
); // MapStream<Actor, MapStream<Rating, Integer>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.speedment.example.Alphabetic; | |
import java.util.stream.Collectors; | |
import java.util.stream.IntStream; | |
import java.util.stream.Stream; | |
/** | |
* An example of a method that can generate an infinite stream of | |
* column names like AA, AB, AC... | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class CollectorUtil { | |
/** | |
* Returns a new {@link MapStream} where the elements have been grouped together using | |
* the specified function. | |
* | |
* @param <T> the stream element type | |
* @param <C> the type of the key to group by | |
* @param grouper the function to use for grouping | |
* @return a {@link MapStream} grouped by key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test2.operators; | |
import java.util.function.Predicate; | |
/** | |
* | |
* @author Emil Forslund | |
*/ | |
public enum StandardBinaryOperator { | |
NewerOlder