Top Description Inners Constructors Methods
org.jooq

public final Class Stringly

extends Object
Class Inheritance
Static Imports
java.lang.annotation.ElementType.PARAMETER, .RetentionPolicy.SOURCE

A container for annotations on stringly typed API.

When working with SQL, strings are ubiquitous. They can have different meanings, in the jOOQ API. A string can be:

While the jOOQ API applies conventions consistently, it may not always be clear which convention applies. Keywords are hardly a problem, but beginners often confuse when jOOQ offers plain SQL templates for convenience (arbitrary SQL fragments, usually not case-sensitive, SQL injection prone), or identifiers (often case-sensitive, depending on the dialect).

The annotations in this class are used to document each of these stringly typed API elements to make the semantics more clear. For increased clarity, the stringly-typed convenience API can always be avoided in favour of the more strongly-typed API.

Author
Lukas Eder
See Also
https://blog.jooq.org/whats-a-string-in-the-jooq-api/

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static @interface
Stringly.Comment

The annotated string type represents a keyword org.jooq.Comment, which will be wrapped by DSL#comment(String).

public static @interface
Stringly.Keyword

The annotated string type represents a keyword org.jooq.Keyword, which will be wrapped by DSL#keyword(String).

public static @interface
Stringly.Name

The annotated string type represents an identifier, i.e. a org.jooq.Name, which will be wrapped by DSL#name(String).

public static @interface
Stringly.Param

The annotated string type represents a bind variable, i.e. a org.jooq.Param.

public static @interface
Stringly.SQL

The annotated string type represents a plain SQL template, i.e. a org.jooq.SQL, which will be wrapped by DSL#sql(String).

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Stringlyback to summary
public Stringly()
org.jooq back to summary

public @Interface Stringly.Comment

extends Annotation
Annotations
@Target:PARAMETER
@Retention:SOURCE
@Documented
@Inherited

The annotated string type represents a keyword org.jooq.Comment, which will be wrapped by DSL#comment(String).

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString
org.jooq back to summary

public @Interface Stringly.Keyword

extends Annotation
Annotations
@Target:PARAMETER
@Retention:SOURCE
@Documented
@Inherited

The annotated string type represents a keyword org.jooq.Keyword, which will be wrapped by DSL#keyword(String).

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString
org.jooq back to summary

public @Interface Stringly.Name

extends Annotation
Annotations
@Target:PARAMETER
@Retention:SOURCE
@Documented
@Inherited

The annotated string type represents an identifier, i.e. a org.jooq.Name, which will be wrapped by DSL#name(String).

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString
org.jooq back to summary

public @Interface Stringly.Param

extends Annotation
Annotations
@Target:PARAMETER
@Retention:SOURCE
@Documented
@Inherited

The annotated string type represents a bind variable, i.e. a org.jooq.Param.

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString
org.jooq back to summary

public @Interface Stringly.SQL

extends Annotation
Annotations
@Target:PARAMETER
@Retention:SOURCE
@Documented
@Inherited

The annotated string type represents a plain SQL template, i.e. a org.jooq.SQL, which will be wrapped by DSL#sql(String).

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString