Top Description Inners Methods
org.eclipse.persistence.jpa.jpql.tools.model

public Interface IJPQLQueryFormatter

Known Direct Implementers
org.eclipse.persistence.jpa.jpql.tools.model.BaseJPQLQueryFormatter
Imports
java.util.Locale, .StringTokenizer, org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject

A IJPQLQueryFormatter helps to write a string representation of a StateObject.
Author
Pascal Filion
Since
2.4
Version
2.4

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
IJPQLQueryFormatter.IdentifierStyle

This enumeration determines how the JPQL identifiers are formatted when written out.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The string representation of the given StateObject
toString
(StateObject
The StateObject that represents a complete or incomplete JPQL query
stateObject
)

Creates a string representation of the given StateObject.

Method Detail

toStringback to summary
public String toString(StateObject stateObject)

Creates a string representation of the given StateObject.

Parameters
stateObject:StateObject

The StateObject that represents a complete or incomplete JPQL query

Returns:String

The string representation of the given StateObject

org.eclipse.persistence.jpa.jpql.tools.model back to summary

public final Enum IJPQLQueryFormatter.IdentifierStyle

extends Enum<IJPQLQueryFormatter.IdentifierStyle>
Class Inheritance

This enumeration determines how the JPQL identifiers are formatted when written out.

Field Summary

Modifier and TypeField and Description
public static final IJPQLQueryFormatter.IdentifierStyle
CAPITALIZE_EACH_WORD

The JPQL identifiers are written out the first letter being uppercase and the rest being lower case.

public static final IJPQLQueryFormatter.IdentifierStyle
LOWERCASE

The JPQL identifiers are written out with lowercase letters.

public static final IJPQLQueryFormatter.IdentifierStyle
UPPERCASE

The JPQL identifiers are written out with uppercase letters.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The formatted JPQL identifier
capitalizeEachWord
(String
The JPQL identifier to format
identifier
)

Returns the given JPQL identifier with the first letter of each word capitalized and the rest being lower case.

public String

Returns:

By default the given identifier is returned
formatIdentifier
(String
JPQL identifier to format
identifier
)

Formats the given JPQL identifier, if it needs to be decorated with more information.

public static IJPQLQueryFormatter.IdentifierStyle
public static IJPQLQueryFormatter.IdentifierStyle[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CAPITALIZE_EACH_WORDback to summary
public static final IJPQLQueryFormatter.IdentifierStyle CAPITALIZE_EACH_WORD

The JPQL identifiers are written out the first letter being uppercase and the rest being lower case.

LOWERCASEback to summary
public static final IJPQLQueryFormatter.IdentifierStyle LOWERCASE

The JPQL identifiers are written out with lowercase letters.

UPPERCASEback to summary
public static final IJPQLQueryFormatter.IdentifierStyle UPPERCASE

The JPQL identifiers are written out with uppercase letters.

Constructor Detail

IdentifierStyleback to summary
private IdentifierStyle()

Method Detail

capitalizeEachWordback to summary
public String capitalizeEachWord(String identifier)

Returns the given JPQL identifier with the first letter of each word capitalized and the rest being lower case.

Parameters
identifier:String

The JPQL identifier to format

Returns:String

The formatted JPQL identifier

formatIdentifierback to summary
public String formatIdentifier(String identifier)

Formats the given JPQL identifier, if it needs to be decorated with more information. Which depends on how the string is created.

Parameters
identifier:String

JPQL identifier to format

Returns:String

By default the given identifier is returned

valueOfback to summary
public static IJPQLQueryFormatter.IdentifierStyle valueOf(String name)
valuesback to summary
public static IJPQLQueryFormatter.IdentifierStyle[] values()