net.ajaest.jdk.data.auxi.database
Class QAbout

java.lang.Object
  extended by net.ajaest.jdk.data.auxi.database.QAbout
Direct Known Subclasses:
QueryExpression

public class QAbout
extends java.lang.Object

Generic class that stores information about a domain query.

Author:
Luis Alfonso Arce González

Field Summary
protected  java.util.List<ConnectorEnum> previousBConnector
          previusBConector.get(i) contains relation between queryAbout.get(i) and queryAbout.get(i-1)
protected  java.util.List<QAbout> queryDomains
          It contains the domain query classes.
 
Constructor Summary
  QAbout()
           
protected QAbout(java.util.List<ConnectorEnum> booleanConnector, java.util.List<QAbout> domains)
          Constructor for superclass.
 
Method Summary
protected  void addDomain(ConnectorEnum bool, QAbout qa)
          Adds a domain domain and the boolean operand that append it to the expression to the current domain query.
 boolean equals(java.lang.Object obj)
           
 java.util.List<ConnectorEnum> getBooleanCases()
          Returns an unmodifiable list of boolean connector where previusBConector.get(i) contains relation between queryAbout.get(i) and queryAbout.get(i-1)
 java.util.List<QAbout> getDomains()
          It returns an unmodifiable list of objects that inherits from QAbout.
 int hashCode()
           
 int size()
          Returns an int representing the size of the criteria.
 java.lang.String toString()
          Inhrited methods should override this.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

queryDomains

protected java.util.List<QAbout> queryDomains
It contains the domain query classes. It can't contain itself(risk of infinite loop lock)


previousBConnector

protected java.util.List<ConnectorEnum> previousBConnector
previusBConector.get(i) contains relation between queryAbout.get(i) and queryAbout.get(i-1)

Constructor Detail

QAbout

public QAbout()

QAbout

protected QAbout(java.util.List<ConnectorEnum> booleanConnector,
                 java.util.List<QAbout> domains)
Constructor for superclass. It does not check self-containing, so be careful.

Parameters:
booleanConnector -
domains -
Method Detail

addDomain

protected void addDomain(ConnectorEnum bool,
                         QAbout qa)
Adds a domain domain and the boolean operand that append it to the expression to the current domain query. This class cannot to itself be added in order to preserve query consistency.

Parameters:
bool - boolean operator
qa - domain criteria
Throws:
java.lang.RuntimeException - if domains contains this class

getDomains

public java.util.List<QAbout> getDomains()
It returns an unmodifiable list of objects that inherits from QAbout.

Returns:
The sorted list of objects containing domain classes

getBooleanCases

public java.util.List<ConnectorEnum> getBooleanCases()
Returns an unmodifiable list of boolean connector where previusBConector.get(i) contains relation between queryAbout.get(i) and queryAbout.get(i-1)

Returns:
The sorted list of boolean connectors

size

public int size()
Returns an int representing the size of the criteria.

Returns:
the size of the criteria

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Inhrited methods should override this.

Overrides:
toString in class java.lang.Object