Package com.mckoi.database.interpret
Class SearchExpression
- java.lang.Object
-
- com.mckoi.database.interpret.SearchExpression
-
- All Implemented Interfaces:
StatementTreeObject
,java.io.Serializable
,java.lang.Cloneable
public final class SearchExpression extends java.lang.Object implements java.io.Serializable, StatementTreeObject, java.lang.Cloneable
Search expression is a form of an Expression that is split up into component parts that can be easily formed into a search query.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Expression
search_expression
The originating expression.(package private) static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description SearchExpression()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.util.List
allElements()
Returns all the Elements from all expressions in this condition tree.(package private) void
appendExpression(Expression expression)
Concatinates a new expression to the end of this expression and uses the 'AND' operator to seperate the expressions.java.lang.Object
clone()
Performs a DEEP clone of this object if it is mutable, or a deep clone of its mutable members.Expression
getFromExpression()
Returns the search expression as an Expression object.void
prepare(ExpressionPreparer preparer)
Prepares the expression.void
prepareExpressions(ExpressionPreparer preparer)
Prepares all expressions in this statement tree object by passing the ExpressionPreparer object to the 'prepare' method of the expression.void
setFromExpression(Expression expression)
Sets this search expression from the given expression.java.lang.String
toString()
-
-
-
Field Detail
-
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
-
search_expression
private Expression search_expression
The originating expression.
-
-
Method Detail
-
setFromExpression
public void setFromExpression(Expression expression)
Sets this search expression from the given expression.
-
getFromExpression
public Expression getFromExpression()
Returns the search expression as an Expression object.
-
appendExpression
void appendExpression(Expression expression)
Concatinates a new expression to the end of this expression and uses the 'AND' operator to seperate the expressions. This is very useful for adding new logical conditions to the expression at runtime.
-
prepare
public void prepare(ExpressionPreparer preparer) throws DatabaseException
Prepares the expression.- Throws:
DatabaseException
-
allElements
java.util.List allElements()
Returns all the Elements from all expressions in this condition tree.
-
prepareExpressions
public void prepareExpressions(ExpressionPreparer preparer) throws DatabaseException
Description copied from interface:StatementTreeObject
Prepares all expressions in this statement tree object by passing the ExpressionPreparer object to the 'prepare' method of the expression.- Specified by:
prepareExpressions
in interfaceStatementTreeObject
- Throws:
DatabaseException
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Description copied from interface:StatementTreeObject
Performs a DEEP clone of this object if it is mutable, or a deep clone of its mutable members. If the object is immutable then it may return 'this'.- Specified by:
clone
in interfaceStatementTreeObject
- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-