Package com.jk.data.dynamic.query
Class Keyword
java.lang.Object
com.jk.data.dynamic.query.Keyword
- All Implemented Interfaces:
 QueryComponent
This class represents a query component that defines common keywords used in
 query construction.
 
 It implements the QueryComponent interface.
- Version:
 - 1.0
 - Author:
 - Dr. Jalal H. Kiswani
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final QueryComponentRepresents the AND keyword.static final QueryComponentRepresents the comma keyword.static final QueryComponentRepresents the FROM keyword.static final QueryComponentRepresents the INSERT keyword.static final QueryComponentRepresents the INTO keyword.static final QueryComponentRepresents the LEFT JOIN keyword.static final QueryComponentRepresents the left parentheses keyword.static final QueryComponentRepresents the OR keyword.static final QueryComponentRepresents the RIGHT JOIN keyword.static final QueryComponentRepresents the right parentheses keyword.static final QueryComponentRepresents the SELECT keyword.static final QueryComponentRepresents the semicolon keyword.static final QueryComponentRepresents the VALUES keyword.static final QueryComponentRepresents the variable keyword.static final QueryComponentRepresents the WHERE keyword. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiongetName()This method gets the name of the keyword.booleanisInline()This method determines whether the query component should be rendered in-line in the query structure (true) or not (false).voidsetInline(boolean inline) This method sets whether the keyword should be rendered in-line in the query or not.voidThis method sets the keyword name to the provided one.This method converts the query component into a query element that can be included in the query structure. 
- 
Field Details
- 
SELECT
Represents the SELECT keyword. - 
FROM
Represents the FROM keyword. - 
AND
Represents the AND keyword. - 
OR
Represents the OR keyword. - 
LEFT_JOIN
Represents the LEFT JOIN keyword. - 
RIGHT_JOIN
Represents the RIGHT JOIN keyword. - 
WHERE
Represents the WHERE keyword. - 
INSERT
Represents the INSERT keyword. - 
VALUES
Represents the VALUES keyword. - 
INTO
Represents the INTO keyword. - 
COMMA
Represents the comma keyword. - 
VARIABLE
Represents the variable keyword. - 
LEFT_PARENTHESES
Represents the left parentheses keyword. - 
RIGHT_PARENTHESES
Represents the right parentheses keyword. - 
SEMICOLON
Represents the semicolon keyword. 
 - 
 - 
Constructor Details
- 
Keyword
public Keyword()This method constructs a newKeyword. - 
Keyword
This method constructs a newKeywordwith the specified name.- Parameters:
 name- Specifies the name of the keyword.
 - 
Keyword
This method constructs a newKeywordwith the specified name and in-line setting.- Parameters:
 name- Specifies the name of the keyword.inline- Indicates whether the keyword should be rendered in-line in the query or not.
 
 - 
 - 
Method Details
- 
getName
This method gets the name of the keyword.- Returns:
 - the keyword name.
 
 - 
isInline
public boolean isInline()This method determines whether the query component should be rendered in-line in the query structure (true) or not (false).- Specified by:
 isInlinein interfaceQueryComponent- Returns:
 - true, if the component is in-line, false otherwise.
 
 - 
setInline
public void setInline(boolean inline) This method sets whether the keyword should be rendered in-line in the query or not.- Parameters:
 inline- Indicates whether the keyword should be rendered in-line in the query (true) or not (false).
 - 
setName
This method sets the keyword name to the provided one.- Parameters:
 name- Specifies the new keyword name.
 - 
toQueryElement
This method converts the query component into a query element that can be included in the query structure.- Specified by:
 toQueryElementin interfaceQueryComponent- Returns:
 - the query element, which can be a string or any appropriate object representation.
 
 
 -