public class IdentifierRule extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_RULE |
static Set<String> |
EMPTY_SET |
static char |
UNDERSCORE |
Constructor and Description |
---|
IdentifierRule() |
Modifier and Type | Method and Description |
---|---|
boolean |
getAllowCompaction() |
boolean |
getCanDelimit() |
boolean |
getDelimitReservedWords() |
int |
getMaxLength() |
boolean |
getMustDelimit() |
String |
getName() |
Set<String> |
getReservedWords() |
String |
getSpecialCharacters() |
boolean |
isAllowTruncation() |
boolean |
isMustBeginWithLetter() |
boolean |
isNullable() |
boolean |
isOnlyLettersDigitsUnderscores() |
boolean |
isReservedWord(String identifier) |
boolean |
requiresDelimiters(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.
|
void |
setAllowCompaction(boolean allowCompaction) |
void |
setAllowTruncation(boolean allowTruncation) |
void |
setCanDelimit(boolean canDelimit) |
void |
setDelimitReservedWords(boolean delimitReservedWords) |
void |
setMaxLength(int maxLength) |
void |
setMustBeginWithLetter(boolean mustBeginWithLetter) |
void |
setMustDelimit(boolean mustDelimit) |
void |
setName(String name) |
void |
setNullable(boolean nullable) |
void |
setOnlyLettersDigitsUnderscores(boolean onlyLettersDigitsUnderscores) |
void |
setReservedWords(Set<String> reservedWords) |
void |
setSpecialCharacters(String specialCharacters) |
public static final String DEFAULT_RULE
public static char UNDERSCORE
public void setName(String name)
public String getName()
public void setMaxLength(int maxLength)
public int getMaxLength()
public void setAllowTruncation(boolean allowTruncation)
public boolean isAllowTruncation()
public void setNullable(boolean nullable)
public boolean isNullable()
public void setAllowCompaction(boolean allowCompaction)
public boolean getAllowCompaction()
public void setCanDelimit(boolean canDelimit)
public boolean getCanDelimit()
public void setMustDelimit(boolean mustDelimit)
public boolean getMustDelimit()
public void setMustBeginWithLetter(boolean mustBeginWithLetter)
public boolean isMustBeginWithLetter()
public void setOnlyLettersDigitsUnderscores(boolean onlyLettersDigitsUnderscores)
public boolean isOnlyLettersDigitsUnderscores()
public void setSpecialCharacters(String specialCharacters)
public String getSpecialCharacters()
public void setDelimitReservedWords(boolean delimitReservedWords)
public boolean getDelimitReservedWords()
public boolean requiresDelimiters(String identifier)
public boolean isReservedWord(String identifier)
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.