Class IdentifierRule
java.lang.Object
org.apache.openjpa.lib.identifier.IdentifierRule
- Direct Known Subclasses:
DBIdentifierRule
The standard identifier rule. Rules are used for specific configuration
of identifier types. For example. A rule could be used to indicate that
an identifier type should not be delimited or has a max length of 255
characters.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanintbooleangetName()booleanbooleanbooleanbooleanbooleanisReservedWord(String identifier) booleanrequiresDelimiters(String identifier) SQL identifier rules: 1) Can be up to 128 characters long 2) Must begin with a letter 3) Can contain letters, digits, and underscores 4) Can't contain spaces or special characters such as #, $, &, %, or punctuation. 5) Can't be reserved wordsvoidsetAllowCompaction(boolean allowCompaction) voidsetAllowTruncation(boolean allowTruncation) voidsetCanDelimit(boolean canDelimit) voidsetDelimitReservedWords(boolean delimitReservedWords) voidsetMaxLength(int maxLength) voidsetMustBeginWithLetter(boolean mustBeginWithLetter) voidsetMustDelimit(boolean mustDelimit) voidvoidsetNullable(boolean nullable) voidsetOnlyLettersDigitsUnderscores(boolean onlyLettersDigitsUnderscores) voidsetReservedWords(Set<String> reservedWords) voidsetSpecialCharacters(String specialCharacters)
-
Field Details
-
EMPTY_SET
-
DEFAULT_RULE
- See Also:
-
UNDERSCORE
public static char UNDERSCORE
-
-
Constructor Details
-
IdentifierRule
public IdentifierRule()
-
-
Method Details
-
setName
-
getName
-
setMaxLength
public void setMaxLength(int maxLength) -
getMaxLength
public int getMaxLength() -
setAllowTruncation
public void setAllowTruncation(boolean allowTruncation) -
isAllowTruncation
public boolean isAllowTruncation() -
setNullable
public void setNullable(boolean nullable) -
isNullable
public boolean isNullable() -
setAllowCompaction
public void setAllowCompaction(boolean allowCompaction) -
getAllowCompaction
public boolean getAllowCompaction() -
setCanDelimit
public void setCanDelimit(boolean canDelimit) -
getCanDelimit
public boolean getCanDelimit() -
setMustDelimit
public void setMustDelimit(boolean mustDelimit) -
getMustDelimit
public boolean getMustDelimit() -
setMustBeginWithLetter
public void setMustBeginWithLetter(boolean mustBeginWithLetter) -
isMustBeginWithLetter
public boolean isMustBeginWithLetter() -
setOnlyLettersDigitsUnderscores
public void setOnlyLettersDigitsUnderscores(boolean onlyLettersDigitsUnderscores) -
isOnlyLettersDigitsUnderscores
public boolean isOnlyLettersDigitsUnderscores() -
setReservedWords
-
getReservedWords
-
setSpecialCharacters
-
getSpecialCharacters
-
setDelimitReservedWords
public void setDelimitReservedWords(boolean delimitReservedWords) -
getDelimitReservedWords
public boolean getDelimitReservedWords() -
requiresDelimiters
SQL identifier rules: 1) Can be up to 128 characters long 2) Must begin with a letter 3) Can contain letters, digits, and underscores 4) Can't contain spaces or special characters such as #, $, &, %, or punctuation. 5) Can't be reserved words -
isReservedWord
-