diff --git a/analytics/pom.xml b/analytics/pom.xml
index 0652469f2..369b13e3f 100644
--- a/analytics/pom.xml
+++ b/analytics/pom.xml
@@ -19,7 +19,7 @@
com.speedment.jpastreamerjpastreamer-parent
- 1.1.2
+ 1.1.3-SNAPSHOT4.0.0
diff --git a/announcer/pom.xml b/announcer/pom.xml
index dda2d66dc..388196572 100644
--- a/announcer/pom.xml
+++ b/announcer/pom.xml
@@ -19,7 +19,7 @@
com.speedment.jpastreamerjpastreamer-parent
- 1.1.2
+ 1.1.3-SNAPSHOT4.0.0
diff --git a/appinfo/pom.xml b/appinfo/pom.xml
index 7016a435e..00684f055 100644
--- a/appinfo/pom.xml
+++ b/appinfo/pom.xml
@@ -19,7 +19,7 @@
com.speedment.jpastreamerjpastreamer-parent
- 1.1.2
+ 1.1.3-SNAPSHOT4.0.0
diff --git a/application/pom.xml b/application/pom.xml
index 02e8c7f87..9e954fcd3 100644
--- a/application/pom.xml
+++ b/application/pom.xml
@@ -19,7 +19,7 @@
com.speedment.jpastreamerjpastreamer-parent
- 1.1.2
+ 1.1.3-SNAPSHOT4.0.0
diff --git a/autoclose/pom.xml b/autoclose/pom.xml
index dd2e2f66c..0dbefc6cd 100644
--- a/autoclose/pom.xml
+++ b/autoclose/pom.xml
@@ -19,7 +19,7 @@
com.speedment.jpastreamerjpastreamer-parent
- 1.1.2
+ 1.1.3-SNAPSHOT4.0.0
diff --git a/builder/pom.xml b/builder/pom.xml
index 4ba7060c5..9d62fea95 100644
--- a/builder/pom.xml
+++ b/builder/pom.xml
@@ -19,7 +19,7 @@
com.speedment.jpastreamerjpastreamer-parent
- 1.1.2
+ 1.1.3-SNAPSHOT4.0.0
diff --git a/core/pom.xml b/core/pom.xml
index d60235fc4..68751b8ce 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -19,7 +19,7 @@
com.speedment.jpastreamerjpastreamer-parent
- 1.1.2
+ 1.1.3-SNAPSHOT4.0.0
diff --git a/criteria/pom.xml b/criteria/pom.xml
index b429480ca..e7e13761c 100644
--- a/criteria/pom.xml
+++ b/criteria/pom.xml
@@ -19,7 +19,7 @@
com.speedment.jpastreamerjpastreamer-parent
- 1.1.2
+ 1.1.3-SNAPSHOT4.0.0
diff --git a/docs/antora.yml b/docs/antora.yml
index ea66d0f5b..20b160d19 100644
--- a/docs/antora.yml
+++ b/docs/antora.yml
@@ -13,7 +13,7 @@
name: jpa-streamer
title: JPAStreamer Docs
-version: 1.1.2
+version: 1.1.3-SNAPSHOT
start_page: introduction:introduction.adoc
nav:
- modules/ROOT/nav.adoc
diff --git a/docs/modules/how-it-works/pages/how-it-works.adoc b/docs/modules/how-it-works/pages/how-it-works.adoc
index dde4838ce..94761a551 100644
--- a/docs/modules/how-it-works/pages/how-it-works.adoc
+++ b/docs/modules/how-it-works/pages/how-it-works.adoc
@@ -78,7 +78,8 @@ long nrOfFilmsStartingWithA = jpaStreamer.stream(Film.class)
You can read more about the use of fields and predicates xref:predicates:predicates.adoc[here].
-NOTE: The metamodel is stored in the projects target-folder and does not need to be checked-in with your source code, nor does it need testing.
+NOTE: The metamodel is stored in the projects target-folder and does not need to be checked-in with your source code, nor needs testing.
+NOTE: The package where generated entities are placed, as well as the name of the generated entities can be configured. Learn more xref:jpa-streamer:quick-start:quick-start.adoc#_code_generator_settings[here].
== The Stream renderer
Most JPA providers, by default, have the ability to provide the query result as a `Stream`. That makes it possible to e.g. select all rows of a table and then use Stream operators to narrow down the results. Although, that process requires every object of the table to be materialized by the JVM, which is not desired as it impedes the performance.
diff --git a/docs/modules/quick-start/pages/quick-start.adoc b/docs/modules/quick-start/pages/quick-start.adoc
index e12b7e4bc..2bf632d64 100644
--- a/docs/modules/quick-start/pages/quick-start.adoc
+++ b/docs/modules/quick-start/pages/quick-start.adoc
@@ -168,12 +168,51 @@ Film {filmId=5, title='AFRICAN EGG', ...
NOTE: To release any resources potentially held by JPAstreamer, simply close the streamer using the command `jpaStreamer.close()`;
-== Next Steps
-Now that you have access to JPAstreamer it's time to put the expressiveness of Java Streams to work. If you are not yet familiar with the `Stream` API, you may find our guide on xref:stream-fundamentals:stream_basics.adoc[Stream Fundamentals] helpful.
-
-Otherwise, feel free to check out the xref:fetching-data:stream-examples.adoc[collection of examples] of JPAStreamer usage.
-
[source, java]
----
jpaStreamer.close();
----
+
+[#_code_generator_settings]
+== Code Generator Settings
+You can configure where the annotation processor generates entities and how they are named using the link:https://maven.apache.org/plugins/maven-compiler-plugin/[Maven Compiler Plugin]. This section describes how that is done.
+
+=== Package name
+By default, all generated classes will be placed under `target/generated-sources/annotations` in a package that matches that of the original entity. Thus, a `com.foo.Film.class` entity will yield a `target/generated-sources/annotations/com/foo/Film$.class`.
+
+You can change the package name for all entities by setting the compiler argument `jpaStreamerPackage`.
+
+NOTE: If your entities have package private fields, they may not be accessible to the generated Entities. Therefore, take caution when deciding to place the generated entities in a separate package.
+
+=== Generated entity name
+As shown in examples throughout the user guide, generated entities are by default given the name of the original entity with an extra `$` at the end. Meaning an entity `Foo.class` will yield a `Foo$.class`. You can change the naming convention by setting the compiler argument `jpaStreamerPrefix` and `jpaStreamerSuffix`. The prefix will be added at the start of the original entity name and the suffix will be appended at the end.
+
+NOTE: The default suffix `$` applies if no custom values are provided via the compiler arguments. If just one of `jpaStreamerPrefix` and `jpaStreamerSuffix` is set, the other will automatically default to an empty string. For example, just setting the prefix to `A` will result in entities with the name `AFoo.class`. Take note that the naming pattern must adhere to link:https://www.oracle.com/java/technologies/javase/codeconventions-namingconventions.html[Java's naming conventions].
+
+Here is a complete example configuration of the plugin that sets both the package name, prefix, and suffix.
+
+[source,xml]
+----
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.10.1
+
+
+ -AjpaStreamerPackage=com.speedment.jpastreamer.test <1>
+ -AjpaStreamerPrefix=A <2>
+ -AjpaStreamerSuffix=B <3>
+
+
+
+----
+<1> Package name is set to `com.speedment.jpastreamer.test`
+<2> Entity prefix is set to A (start)
+<3> Entity suffix is set to B (ending)
+
+In the above example, all generated entities will be placed in `/target/generated-sources/annotations/com.speedment.jpastreamer.test`. An original entity with the name `Film` will yeild a generated entity called `AFilmB`.
+
+== Next Steps
+Now that you have access to JPAstreamer it's time to put the expressiveness of Java Streams to work. If you are not yet familiar with the `Stream` API, you may find our guide on xref:stream-fundamentals:stream_basics.adoc[Stream Fundamentals] helpful.
+
+Otherwise, feel free to check out the xref:fetching-data:stream-examples.adoc[collection of examples] of JPAStreamer usage.
diff --git a/docs/site.yml b/docs/site.yml
index 0320de27d..de5b04cf0 100644
--- a/docs/site.yml
+++ b/docs/site.yml
@@ -20,7 +20,7 @@ content:
# only generate from git tags (and not branches)
branches: []
start_path: docs
- tags: [0.1*, 1.0*, '!1.0.3', 1.1*]
+ tags: [0.1*, 1.0*, '!1.0.3', 1.1*, '!1.1.1']
ui:
bundle:
url: ui-bundle.zip
diff --git a/exception/pom.xml b/exception/pom.xml
index 39d2d29c8..d2d5e0e2b 100644
--- a/exception/pom.xml
+++ b/exception/pom.xml
@@ -19,7 +19,7 @@
com.speedment.jpastreamerjpastreamer-parent
- 1.1.2
+ 1.1.3-SNAPSHOT4.0.0
diff --git a/field/pom.xml b/field/pom.xml
index e322fd8dc..c6492d515 100644
--- a/field/pom.xml
+++ b/field/pom.xml
@@ -19,7 +19,7 @@
com.speedment.jpastreamerjpastreamer-parent
- 1.1.2
+ 1.1.3-SNAPSHOT4.0.0
diff --git a/fieldgenerator/fieldgenerator-component/pom.xml b/fieldgenerator/fieldgenerator-component/pom.xml
index 70b949fd2..71e2f438d 100644
--- a/fieldgenerator/fieldgenerator-component/pom.xml
+++ b/fieldgenerator/fieldgenerator-component/pom.xml
@@ -19,7 +19,7 @@
fieldgeneratorcom.speedment.jpastreamer
- 1.1.2
+ 1.1.3-SNAPSHOT4.0.0
diff --git a/fieldgenerator/fieldgenerator-standard/pom.xml b/fieldgenerator/fieldgenerator-standard/pom.xml
index 2908957f3..07a55251c 100644
--- a/fieldgenerator/fieldgenerator-standard/pom.xml
+++ b/fieldgenerator/fieldgenerator-standard/pom.xml
@@ -19,7 +19,7 @@
fieldgeneratorcom.speedment.jpastreamer
- 1.1.2
+ 1.1.3-SNAPSHOT4.0.0
diff --git a/fieldgenerator/fieldgenerator-standard/src/main/java/com/speedment/jpastreamer/fieldgenerator/StandardFieldGeneratorProcessor.java b/fieldgenerator/fieldgenerator-standard/src/main/java/com/speedment/jpastreamer/fieldgenerator/StandardFieldGeneratorProcessor.java
index a48cd563b..6a15bc0ab 100644
--- a/fieldgenerator/fieldgenerator-standard/src/main/java/com/speedment/jpastreamer/fieldgenerator/StandardFieldGeneratorProcessor.java
+++ b/fieldgenerator/fieldgenerator-standard/src/main/java/com/speedment/jpastreamer/fieldgenerator/StandardFieldGeneratorProcessor.java
@@ -29,6 +29,7 @@
*/
@SupportedAnnotationTypes("javax.persistence.Entity")
+@SupportedOptions({"jpaStreamerPackage", "jpaStreamerPrefix", "jpaStreamerSuffix"})
@SupportedSourceVersion(SourceVersion.RELEASE_8)
@AutoService(Processor.class)
public final class StandardFieldGeneratorProcessor extends AbstractProcessor {
diff --git a/fieldgenerator/fieldgenerator-standard/src/main/java/com/speedment/jpastreamer/fieldgenerator/internal/InternalFieldGeneratorProcessor.java b/fieldgenerator/fieldgenerator-standard/src/main/java/com/speedment/jpastreamer/fieldgenerator/internal/InternalFieldGeneratorProcessor.java
index c6fb79db3..049d696a9 100644
--- a/fieldgenerator/fieldgenerator-standard/src/main/java/com/speedment/jpastreamer/fieldgenerator/internal/InternalFieldGeneratorProcessor.java
+++ b/fieldgenerator/fieldgenerator-standard/src/main/java/com/speedment/jpastreamer/fieldgenerator/internal/InternalFieldGeneratorProcessor.java
@@ -98,10 +98,30 @@ public boolean process(Set extends TypeElement> annotations, RoundEnvironment
.filter(ae -> ae.getKind() == ElementKind.CLASS)
.forEach(ae -> {
try {
- String qualifiedGenEntityName = ae.asType().toString() + "$";
+ final String entityName = ae.asType().toString();
+ final String shortEntityName = shortName(entityName);
+
+ final String prefix = processingEnv.getOptions().getOrDefault("jpaStreamerPrefix", "");
+ final String suffix = processingEnv.getOptions().getOrDefault("jpaStreamerSuffix", "");
+
+ final String genEntityName = (!prefix.equals("") || !suffix.equals("")) ?
+ prefix + shortEntityName + suffix : shortEntityName + "$";
+
+ String annotatedElementPackageName = "";
+ final PackageElement packageElement = processingEnvironment.getElementUtils().getPackageOf(ae);
+ if (packageElement.isUnnamed()) {
+ messager.printMessage(Diagnostic.Kind.WARNING, "Class " + entityName + " has an unnamed package.");
+ annotatedElementPackageName = "";
+ } else {
+ annotatedElementPackageName = packageElement.getQualifiedName().toString();
+ }
+
+ String packageName = processingEnv.getOptions().getOrDefault("jpaStreamerPackage", annotatedElementPackageName);
+
+ String qualifiedGenEntityName = packageName + "." + genEntityName;
JavaFileObject builderFile = processingEnv.getFiler().createSourceFile(qualifiedGenEntityName);
Writer writer = builderFile.openWriter();
- generateFields(ae, writer);
+ generateFields(ae, entityName, genEntityName, packageName, writer);
writer.close();
} catch (IOException e) {
e.printStackTrace();
@@ -111,10 +131,7 @@ public boolean process(Set extends TypeElement> annotations, RoundEnvironment
return true;
}
- void generateFields(final Element annotatedElement, final Writer writer) throws IOException {
-
- final String entityName = shortName(annotatedElement.asType().toString());
- final String genEntityName = entityName + "$";
+ void generateFields(final Element annotatedElement, final String entityName, final String genEntityName, final String packageName, final Writer writer) throws IOException {
final Map getters = annotatedElement.getEnclosedElements().stream()
.filter(ee -> ee.getKind() == ElementKind.METHOD)
@@ -131,7 +148,7 @@ void generateFields(final Element annotatedElement, final Writer writer) throws
.map(n -> n.substring(2))
.map(Formatting::lcfirst)
.collect(toSet());
-
+
// Retrieve all declared non-final instance fields of the annotated class
Map extends Element, String> enclosedFields = annotatedElement.getEnclosedElements().stream()
.filter(ee -> ee.getKind().isField()
@@ -140,25 +157,9 @@ void generateFields(final Element annotatedElement, final Writer writer) throws
.collect(
toMap(
Function.identity(),
- ee -> findGetter(ee, getters, isGetters, entityName, lombokGetterAvailable(annotatedElement, ee)))
+ ee -> findGetter(ee, getters, isGetters, shortName(entityName), lombokGetterAvailable(annotatedElement, ee)))
);
-/* if (annotatedElement.getSimpleName().toString().contains("User")) {
- messager.printMessage(Diagnostic.Kind.NOTE, " "+ isGetters.size());
- messager.printMessage(Diagnostic.Kind.NOTE, " "+ isGetters.iterator().next());
- messager.printMessage(Diagnostic.Kind.NOTE, enclosedFields.toString());
- throw new UnsupportedEncodingException(isGetters.toString());
- }*/
-
- final PackageElement packageElement = processingEnvironment.getElementUtils().getPackageOf(annotatedElement);
- String packageName;
- if (packageElement.isUnnamed()) {
- messager.printMessage(Diagnostic.Kind.WARNING, "Class " + entityName + " has an unnamed package.");
- packageName = "";
- } else {
- packageName = packageElement.getQualifiedName().toString();
- }
-
final File file = generatedEntity(enclosedFields, entityName, genEntityName, packageName);
writer.write(generator.on(file).orElseThrow(NoSuchElementException::new));
}
@@ -179,7 +180,7 @@ private String findGetter(final Element field,
final String standardJavaName = javaNameFromExternal(fieldName);
final String standardGetterName = getterPrefix + standardJavaName;
-
+
if (getters.get(standardGetterName) != null || isGetters.contains(standardGetterName)) {
// We got lucky because the user elected to conform
// to the standard JavaBean notation.
@@ -210,23 +211,25 @@ private String findGetter(final Element field,
}
- private File generatedEntity(Map extends Element, String> enclosedFields, String entityName, String genEntityName, String packageName) {
+ private File generatedEntity(final Map extends Element, String> enclosedFields, final String entityName, final String genEntityName, final String packageName) {
final File file = packageName.isEmpty() ?
File.of(genEntityName + ".java") :
File.of(packageName + "/" + genEntityName + ".java");
+ final String shortEntityName = shortName(entityName);
+
final Class clazz = Class.of(genEntityName)
.public_()
.final_()
.set(Javadoc.of(
- "The generated base for entity {@link " + entityName + "} representing entities of the"
- + " {@code " + lcfirst(entityName) + "}-table in the database." +
+ "The generated base for entity {@link " + shortEntityName + "} representing entities of the"
+ + " {@code " + lcfirst(shortEntityName) + "}-table in the database." +
nl() + "
This file has been automatically generated by JPAStreamer."
).author("JPAStreamer"));
enclosedFields
.forEach((field, getter) -> {
- addFieldToClass(field, getter, clazz, entityName);
+ addFieldToClass(field, getter, clazz, shortEntityName);
// Name magic...
if (getter.contains(IllegalJavaBeanException.class.getSimpleName())) {
file.add(Import.of(IllegalJavaBeanException.class));
@@ -235,6 +238,8 @@ private File generatedEntity(Map extends Element, String> enclosedFields, Stri
file.add(clazz);
file.call(new AutoImports(generator.getDependencyMgr())).call(new AlignTabs<>());
+ file.imports(SimpleType.create(entityName));
+
return file;
}
@@ -328,11 +333,11 @@ private Type fieldType(Element field) {
}
private String trimAnnotations(Element field) {
- final String fieldType = field.asType().toString();
+ final String fieldType = field.asType().toString();
final int index = fieldType.lastIndexOf(' ');
- return index < 0 ? fieldType : fieldType.substring(index + 1);
+ return index < 0 ? fieldType : fieldType.substring(index + 1);
}
-
+
private Type primitiveFieldType(Type fieldType, Type entityType) {
Type primitiveFieldType;
switch (fieldType.getTypeName()) {
diff --git a/fieldgenerator/fieldgenerator-test-package/pom.xml b/fieldgenerator/fieldgenerator-test-package/pom.xml
new file mode 100644
index 000000000..be1ca206f
--- /dev/null
+++ b/fieldgenerator/fieldgenerator-test-package/pom.xml
@@ -0,0 +1,129 @@
+
+
+
+
+ fieldgenerator
+ com.speedment.jpastreamer
+ 1.1.3-SNAPSHOT
+
+ 4.0.0
+
+ fieldgenerator-test-package
+
+
+ jpastreamer.fieldgenerator.test.renaming
+ true
+
+
+ FieldGenerator - Test Package Renaming
+
+ Standard field generator tests with package renaming
+
+
+
+
+
+ javax.persistence
+ javax.persistence-api
+
+
+
+ com.speedment.jpastreamer
+ fieldgenerator-standard
+
+
+
+ com.speedment.jpastreamer
+ field
+
+
+
+ org.projectlombok
+ lombok
+ 1.18.24
+ provided
+
+
+
+ javax.validation
+ validation-api
+ 2.0.0.Final
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.10.1
+
+
+ -AjpaStreamerPackage=com.speedment.jpastreamer.fieldgenerator.test.renaming.inner
+ -AjpaStreamerSuffix=B
+
+
+
+
+
+ maven-deploy-plugin
+
+ true
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+ 3.2.0
+
+
+ generate-sources
+
+ add-source
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ release
+
+
+
+ maven-javadoc-plugin
+
+ false
+
+
+
+
+
+
+
+
diff --git a/fieldgenerator/fieldgenerator-test-package/src/main/java/com/speedment/jpastreamer/fieldgenerator/renaming/Actor.java b/fieldgenerator/fieldgenerator-test-package/src/main/java/com/speedment/jpastreamer/fieldgenerator/renaming/Actor.java
new file mode 100644
index 000000000..0cc92f192
--- /dev/null
+++ b/fieldgenerator/fieldgenerator-test-package/src/main/java/com/speedment/jpastreamer/fieldgenerator/renaming/Actor.java
@@ -0,0 +1,51 @@
+/*
+ * JPAstreamer - Express JPA queries with Java Streams
+ * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved.
+ *
+ * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE
+ */
+package com.speedment.jpastreamer.fieldgenerator.renaming;
+
+import lombok.AccessLevel;
+import lombok.Data;
+import lombok.Getter;
+
+import javax.persistence.*;
+import java.util.ArrayList;
+import java.util.List;
+
+@Entity
+@Data
+@Table(name = "actor", schema = "sakila")
+public class Actor {
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "actor_id", nullable = false, updatable = false, columnDefinition = "smallint(5)")
+ private Integer actorId;
+
+ @Column(name = "first_name", nullable = false, columnDefinition = "varchar(45)")
+ private String firstName;
+
+ @Column(name = "last_name", nullable = false, columnDefinition = "varchar(45)")
+ private String lastName;
+
+ @Getter(value = AccessLevel.PRIVATE)
+ @ManyToMany(mappedBy = "actors")
+ private List films = new ArrayList<>();
+
+ @Override
+ public String toString() {
+ return "Actor{" +
+ "actorId=" + actorId +
+ ", firstName='" + firstName + '\'' +
+ ", lastName='" + lastName + '\'' +
+ '}';
+ }
+}
diff --git a/fieldgenerator/fieldgenerator-test-package/src/main/java/com/speedment/jpastreamer/fieldgenerator/renaming/Film.java b/fieldgenerator/fieldgenerator-test-package/src/main/java/com/speedment/jpastreamer/fieldgenerator/renaming/Film.java
new file mode 100644
index 000000000..34ea68706
--- /dev/null
+++ b/fieldgenerator/fieldgenerator-test-package/src/main/java/com/speedment/jpastreamer/fieldgenerator/renaming/Film.java
@@ -0,0 +1,297 @@
+/*
+ * JPAstreamer - Express JPA queries with Java Streams
+ * Copyright (c) 2020-2022, Speedment, Inc. All Rights Reserved.
+ *
+ * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * See: https://github.com/speedment/jpa-streamer/blob/master/LICENSE
+ */
+package com.speedment.jpastreamer.fieldgenerator.renaming;
+
+import javax.persistence.*;
+import java.sql.Time;
+import java.time.LocalDateTime;
+import java.util.*;
+
+@Entity
+@Table(name = "film", schema = "sakila")
+public class Film {
+
+ // Reproduce #58
+ private static final Map, List> A = new HashMap<>();
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ @Column(name = "film_id", nullable = false, unique = true, updatable = false, columnDefinition = "smallint(5)")
+ // Make this field package private just for good measure...
+ int filmId;
+
+ @Column(name = "title", nullable = false, columnDefinition = "varchar(255)")
+ private String title;
+
+ @Column(name = "description", nullable = false, columnDefinition = "text")
+ private String description;
+
+ @Column(name = "audienceScore", nullable = true, columnDefinition = "decimal(4,2)")
+ private Double audienceScore;
+
+ @Lob
+ @Column(name = "cover", nullable = true)
+ private byte[] cover;
+
+ @Lob
+ @Column(name = "long_description", nullable = true)
+ private String long_description;
+
+ /**
+ * DATE AND TIME
+ */
+ @Column(name = "release_date", nullable = false, columnDefinition = "DATE")
+ @Temporal(TemporalType.DATE)
+ private java.util.Date releaseDate;
+
+ @Column(name = "release_timestamp", nullable = false, columnDefinition = "TIMESTAMP")
+ @Temporal(TemporalType.TIMESTAMP)
+ private Calendar releaseTimestamp;
+
+ @Column(name = "release_time", nullable = false, columnDefinition = "TIME")
+ private Time releaseTime;
+
+ @ManyToOne
+ @JoinColumn(name = "language_id")
+ private Language language;
+
+ @ManyToOne
+ @JoinColumn(name = "original_language_id")
+ private Language originalLanguage;
+
+ @Column(name = "complex_column")
+ private Map