org.codehaus.modello.db

Class SQLReservedWords

Implemented Interfaces:
Initializable

public class SQLReservedWords
extends AbstractLogEnabled
implements Initializable

SQLReservedWords - utility object to test against SQL Keywords.
Version:
$Id: SQLReservedWords.java 817 2007-03-12 16:53:29Z joakime $
Author:
Joakim Erdfelt

Nested Class Summary

class
SQLReservedWords.KeywordSource

Method Summary

List
getKeywordSourceList(String word)
Obtain the list of SQLReservedWords.KeywordSource objects that the specified (potential) keyword (might) belong to.
String
getKeywordSourceString(String word)
Obtain the comma delimited string of keyword sources that the specified (potential) word (might) belong to.
void
initialize()
boolean
isKeyword(String word)
Tests the provided word to see if it is a keyword.

Method Details

getKeywordSourceList

public List getKeywordSourceList(String word)
Obtain the list of SQLReservedWords.KeywordSource objects that the specified (potential) keyword (might) belong to.
Parameters:
word - the word to test.
Returns:
the List of SQLReservedWords.KeywordSource objects, or null if specified word is not a reserved word.

getKeywordSourceString

public String getKeywordSourceString(String word)
Obtain the comma delimited string of keyword sources that the specified (potential) word (might) belong to.
Parameters:
word - the wor to test.
Returns:
the String of keyword source names seperated by commas, or null if word is not a reserved word.

initialize

public void initialize()
            throws InitializationException

isKeyword

public boolean isKeyword(String word)
Tests the provided word to see if it is a keyword.
Parameters:
word - the word to test.
Returns:
true if the provided word is a keyword.