net.ajaest.jdk.data.dict.auxi
Class QueryExpression<E extends QAbout>

java.lang.Object
  extended by net.ajaest.jdk.data.dict.auxi.QAbout
      extended by net.ajaest.jdk.data.dict.auxi.QueryExpression<E>
Type Parameters:
E - class which is the beginning step in order to build a consistent expression
Direct Known Subclasses:
KanjiExpression

public abstract class QueryExpression<E extends QAbout>
extends QAbout

Class that represents a consistent and finished expression about related fields. Using methods AND and OR will increase this kanji expression, but this won't be consistent until the successive call of processes does not returns a new kanji Expression.
Expressions can be used to define an object or a group of objects using almost natural language, or to build a user friendly comprehensible query about an object.

Author:
Luis Alfonso Arce González

Field Summary
 
Fields inherited from class net.ajaest.jdk.data.dict.auxi.QAbout
previousBConnector, queryDomains
 
Constructor Summary
  QueryExpression()
           
protected QueryExpression(java.util.List<ConnectorEnum> booleanConnector, java.util.List<QAbout> domains)
           
 
Method Summary
 E AND()
          Appends a new domain condition using boolean AND operator to this expression.
protected abstract  E createBeginInstance()
          Creates an instance of the objects which is the first step in order to build a consistent expression.
 E OR()
          Appends a new domain condition using boolean OR operator to this expression.
 
Methods inherited from class net.ajaest.jdk.data.dict.auxi.QAbout
addDomain, equals, getBooleanCases, getDomains, hashCode, size, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryExpression

public QueryExpression()

QueryExpression

protected QueryExpression(java.util.List<ConnectorEnum> booleanConnector,
                          java.util.List<QAbout> domains)
Method Detail

AND

public E AND()
Appends a new domain condition using boolean AND operator to this expression.

Returns:
an object inheriting QAbout representing the beginning step in order to append a domain condition to this expression.

OR

public E OR()
Appends a new domain condition using boolean OR operator to this expression.

Returns:
an object inheriting QAbout representing the beginning step in order to append a domain condition to this expression.

createBeginInstance

protected abstract E createBeginInstance()
Creates an instance of the objects which is the first step in order to build a consistent expression.

Returns:
An object of the class that represents the first step in order to build a consistent expression