se.js.jesdob.query
Interface IDobQuery

All Known Implementing Classes:
DobQuery

public interface IDobQuery


Method Summary
 IDobQuery bigger(java.lang.String attribute, double value)
          Adds a bigger-than-condition to the query.
 IDobQuery bigger(java.lang.String attribute, int value)
          Adds a bigger-than-condition to the query.
 IDobQuery biggerOrEqual(java.lang.String attribute, double value)
          Adds a bigger-or-equal-to-condition to the query.
 IDobQuery biggerOrEqual(java.lang.String attribute, int value)
          Adds a bigger-or-equal-to-condition to the query.
 IDobQuery contains(java.lang.String attribute, java.lang.String value)
          Adds a contains-condition to the query.
 IDobQuery containsNot(java.lang.String attribute, java.lang.String value)
          Adds a contains-condition to the query.
 IDobQuery equals(java.lang.String attribute, float value)
          Adds a equals-condition to the query.
 IDobQuery equals(java.lang.String attribute, int value)
          Adds a equals-condition to the query.
 IDobQuery equals(java.lang.String attribute, java.lang.String value)
          Adds a equals-condition to the query.
 IDobCollection filter(IDobCollection dobCollection)
          Takes a IDobCollection as an argument, and returns a new IDobCollection with all IDobs that fullfilled the requirements specified in the query.
 IDobQuery hasAttr(java.lang.String attribute)
          Adds a has-attribute-condition to the query.
 IDobQuery hasNotAttr(java.lang.String attribute)
          Adds a has-not-attribute-condition to the query.
 IDobQuery is(java.lang.String attribute)
          Adds a is-condition to the query.
 IDobQuery isNot(java.lang.String attribute)
          Adds a is-not-condition to the query.
 IDobQuery isNotNumeric(java.lang.String attribute)
          Adds a is-not-attribute-numeric-condition to the query.
 IDobQuery isNumeric(java.lang.String attribute)
          Adds a is-attribute-numeric-condition to the query.
 boolean isTrue(IDob dob)
          Takes a specific IDob as an argument, and returns true if the IDob fullfills all requirements specified in the query.
 IDobQuery lesser(java.lang.String attribute, double value)
          Adds a lesser-than-condition to the query.
 IDobQuery lesser(java.lang.String attribute, int value)
          Adds a lesser-than-condition to the query.
 IDobQuery lesserOrEqual(java.lang.String attribute, double value)
          Adds a lesser-or-equal-to-condition to the query.
 IDobQuery lesserOrEqual(java.lang.String attribute, int value)
          Adds a lesser-or-equal-to-condition to the query.
 IDobQuery notEquals(java.lang.String attribute, float value)
          Adds a not-equals-condition to the query.
 IDobQuery notEquals(java.lang.String attribute, int value)
          Adds a not-equals-condition to the query.
 IDobQuery notEquals(java.lang.String attribute, java.lang.String value)
          Adds a not-equals-condition to the query.
 

Method Detail

is

IDobQuery is(java.lang.String attribute)
Adds a is-condition to the query. This condition will check if a Dob contains a specific boolean attribute, and if this attribute is true. If the dob does not contain the attribute, the condition will return false. If the dob contains the attribute, but the attribute is not true, the condition will return false. If the dob contains the attribute, and the attribute is true, the condition will return true.

Parameters:
attribute - The boolean attribute we want to check for.
Returns:
Self; the IDobQuery-object, to enable chaining.

isNumeric

IDobQuery isNumeric(java.lang.String attribute)
Adds a is-attribute-numeric-condition to the query. This will check if a specific attribute is numeric or not. If the dob has not the attribute, the condition will return false. If the dob has the attribute, but the attribute is not numeric, the condition will return false. If the dob has the attribute and the attribute is numeric, the condition will return true.

Parameters:
attribute - The attribute we want to check type for.
Returns:
Self; the IDobQuery-object, to enable chaining.

isNotNumeric

IDobQuery isNotNumeric(java.lang.String attribute)
Adds a is-not-attribute-numeric-condition to the query. This will check if a specific attribute is not numeric or if it is. If the dob has not the attribute, the condition will return false. If the dob has the attribute, but the attribute is not numeric, the condition will return true. If the dob has the attribute and the attribute is numeric, the condition will return false.

Parameters:
attribute - The attribute we want to check type for.
Returns:
Self; the IDobQuery-object, to enable chaining.

isNot

IDobQuery isNot(java.lang.String attribute)
Adds a is-not-condition to the query. This condition will check if a Dob contains a specific boolean attribute, and if this attribute is false. If the dob does not contain the attribute, the condition will return true. If the dob contains the attribute, but the attribute is not true, the condition will return true. If the dob contains the attribute, and the attribute is true, the condition will return false.

Parameters:
attribute - The boolean attribute we want to check for.
Returns:
Self; the IDobQuery-object, to enable chaining.

hasAttr

IDobQuery hasAttr(java.lang.String attribute)
Adds a has-attribute-condition to the query. This will check if a Dob has a specific attribute or not. If the dob has the attribute, the condition will return true. If the dob has not the attribute, the condition will return false.

Parameters:
attribute - The attribute we want to check for.
Returns:
Self; the IDobQuery-object, to enable chaining.

hasNotAttr

IDobQuery hasNotAttr(java.lang.String attribute)
Adds a has-not-attribute-condition to the query. This will check if a Dob lacks a specific attribute, or not. If the dob has the attribute, the condition will return false. If the dob has not the attribute, the condition will return true.

Parameters:
attribute - The attribute we want to check for.
Returns:
Self; the IDobQuery-object, to enable chaining.

equals

IDobQuery equals(java.lang.String attribute,
                 java.lang.String value)
Adds a equals-condition to the query. This will check if the dob has a specific attribute, and if this attribute has got a specific value or not. If the dob has not the attribute, the condition will return false. If the dob has the attribute, but the value of the attribute is not the supplied value, the condition will return false. If the dob has the attribute, and the value equals the supplied value, the condition will return true.

Parameters:
attribute - The attribute we want to examine.
value - The value we expect the attribute to have.
Returns:
Self; the IDobQuery-object, to enable chaining.

equals

IDobQuery equals(java.lang.String attribute,
                 int value)
Adds a equals-condition to the query. This will check if the dob has a specific attribute, and if this attribute has got a specific value or not. If the dob has not the attribute, the condition will return false. If the dob has the attribute, but the value of the attribute is not the supplied value, the condition will return false. If the dob has the attribute, and the value equals the supplied value, the condition will return true.

Parameters:
attribute - The attribute we want to examine.
value - The value we expect the attribute to have.
Returns:
Self; the IDobQuery-object, to enable chaining.

equals

IDobQuery equals(java.lang.String attribute,
                 float value)
Adds a equals-condition to the query. This will check if the dob has a specific attribute, and if this attribute has got a specific value or not. If the dob has not the attribute, the condition will return false. If the dob has the attribute, but the value of the attribute is not the supplied value, the condition will return false. If the dob has the attribute, and the value equals the supplied value, the condition will return true.

Parameters:
attribute - The attribute we want to examine.
value - The value we expect the attribute to have.
Returns:
Self; the IDobQuery-object, to enable chaining.

notEquals

IDobQuery notEquals(java.lang.String attribute,
                    java.lang.String value)
Adds a not-equals-condition to the query. This will check if the dob if dob hasn't a specific value for a specific attribute. If the dob has not the attribute, the condition will return true. If the dob has the attribute, but the value of the attribute is not the supplied value, the condition will return true. If the dob has the attribute, and the value equals the supplied value, the condition will return false.

Parameters:
attribute - The attribute we want to examine.
value - The value we expect the attribute to not have.
Returns:
Self; the IDobQuery-object, to enable chaining.

notEquals

IDobQuery notEquals(java.lang.String attribute,
                    int value)
Adds a not-equals-condition to the query. This will check if the dob if dob hasn't a specific value for a specific attribute. If the dob has not the attribute, the condition will return true. If the dob has the attribute, but the value of the attribute is not the supplied value, the condition will return true. If the dob has the attribute, and the value equals the supplied value, the condition will return false.

Parameters:
attribute - The attribute we want to examine.
value - The value we expect the attribute to not have.
Returns:
Self; the IDobQuery-object, to enable chaining.

notEquals

IDobQuery notEquals(java.lang.String attribute,
                    float value)
Adds a not-equals-condition to the query. This will check if the dob if dob hasn't a specific value for a specific attribute. If the dob has not the attribute, the condition will return true. If the dob has the attribute, but the value of the attribute is not the supplied value, the condition will return true. If the dob has the attribute, and the value equals the supplied value, the condition will return false.

Parameters:
attribute - The attribute we want to examine.
value - The value we expect the attribute to not have.
Returns:
Self; the IDobQuery-object, to enable chaining.

contains

IDobQuery contains(java.lang.String attribute,
                   java.lang.String value)
Adds a contains-condition to the query. This will check if the dob has a specific attribute, and if this attribute contains a specific char sequence. If the dob has not the attribute, the condition will return false. If the dob has the attribute, but the value of the attribute is not the supplied value, the condition will return false. If the dob has the attribute, and the value equals the supplied value, the condition will return true. If the dob has the attribute, and the value contains the supplied value, the condition will return true. The dob-attribute-values doesn't have to equal the supplied value exactly, but can contain the value. Example: value = "def" "abcdefghijklm" - true, contains "def". "def" - true, contains "def". "abcde" - false, does not contain "def".

Parameters:
attribute - The attribute we want to examine.
value - The value we expect the attribute to have.
Returns:
Self; the IDobQuery-object, to enable chaining.

containsNot

IDobQuery containsNot(java.lang.String attribute,
                      java.lang.String value)
Adds a contains-condition to the query. This will check if the dob has a specific attribute, and if this attribute doesn't contains a specific char sequence. If the dob has not the attribute, the condition will return true. If the dob has the attribute, but the value of the attribute is not the supplied value, the condition will return true. If the dob has the attribute, and the value equals the supplied value, the condition will return false. If the dob has the attribute, and the value contains the supplied value, the condition will return false. Example: value = "def" "abcdefghijklm" - false, contains "def". "def" - false, contains "def". "abcde" - true, does not contain "def".

Parameters:
attribute - The attribute we want to examine.
value - The value we expect the attribute to not have.
Returns:
Self; the IDobQuery-object, to enable chaining.

bigger

IDobQuery bigger(java.lang.String attribute,
                 int value)
Adds a bigger-than-condition to the query. This will check if a specific numerical attribute is bigger than a specific value. If the dob has not the attribute, the condition will return false. If the dob has the attribute, and the value is lesser than supplied value, the condition will return false. If the dob has the attribute, and the value equals the supplied value, the condition will return false. If the dob has the attribute, and the value is bigger the supplied value, the condition will return true.

Parameters:
attribute - The attribute we want to examine.
value - The value we want to compare with.
Returns:
Self; the IDobQuery-object, to enable chaining.

lesser

IDobQuery lesser(java.lang.String attribute,
                 int value)
Adds a lesser-than-condition to the query. This will check if a specific numerical attribute is lesser than a specific value. If the dob has not the attribute, the condition will return false. If the dob has the attribute, and the value is lesser than supplied value, the condition will return true. If the dob has the attribute, and the value equals the supplied value, the condition will return false. If the dob has the attribute, and the value is bigger the supplied value, the condition will return false.

Parameters:
attribute - The attribute we want to examine.
value - The value we want to compare with.
Returns:
Self; the IDobQuery-object, to enable chaining.

biggerOrEqual

IDobQuery biggerOrEqual(java.lang.String attribute,
                        int value)
Adds a bigger-or-equal-to-condition to the query. This will check if a specific numerical attribute is bigger than, or equal to, specific value. If the dob has not the attribute, the condition will return false. If the dob has the attribute, and the value is lesser than supplied value, the condition will return false. If the dob has the attribute, and the value equals the supplied value, the condition will return true. If the dob has the attribute, and the value is bigger the supplied value, the condition will return true.

Parameters:
attribute - The attribute we want to examine.
value - The value we want to compare with.
Returns:
Self; the IDobQuery-object, to enable chaining.

lesserOrEqual

IDobQuery lesserOrEqual(java.lang.String attribute,
                        int value)
Adds a lesser-or-equal-to-condition to the query. This will check if a specific numerical attribute is lesser than, or equal to, a specific value. If the dob has not the attribute, the condition will return false. If the dob has the attribute, and the value is lesser than supplied value, the condition will return true. If the dob has the attribute, and the value equals the supplied value, the condition will return true. If the dob has the attribute, and the value is bigger the supplied value, the condition will return false.

Parameters:
attribute - The attribute we want to examine.
value - The value we want to compare with.
Returns:
Self; the IDobQuery-object, to enable chaining.

bigger

IDobQuery bigger(java.lang.String attribute,
                 double value)
Adds a bigger-than-condition to the query. This will check if a specific numerical attribute is bigger than a specific value. If the dob has not the attribute, the condition will return false. If the dob has the attribute, and the value is lesser than supplied value, the condition will return false. If the dob has the attribute, and the value equals the supplied value, the condition will return false. If the dob has the attribute, and the value is bigger the supplied value, the condition will return true.

Parameters:
attribute - The attribute we want to examine.
value - The value we want to compare with.
Returns:
Self; the IDobQuery-object, to enable chaining.

lesser

IDobQuery lesser(java.lang.String attribute,
                 double value)
Adds a lesser-than-condition to the query. This will check if a specific numerical attribute is lesser than a specific value. If the dob has not the attribute, the condition will return false. If the dob has the attribute, and the value is lesser than supplied value, the condition will return true. If the dob has the attribute, and the value equals the supplied value, the condition will return false. If the dob has the attribute, and the value is bigger the supplied value, the condition will return false.

Parameters:
attribute - The attribute we want to examine.
value - The value we want to compare with.
Returns:
Self; the IDobQuery-object, to enable chaining.

biggerOrEqual

IDobQuery biggerOrEqual(java.lang.String attribute,
                        double value)
Adds a bigger-or-equal-to-condition to the query. This will check if a specific numerical attribute is bigger than, or equal to, specific value. If the dob has not the attribute, the condition will return false. If the dob has the attribute, and the value is lesser than supplied value, the condition will return false. If the dob has the attribute, and the value equals the supplied value, the condition will return true. If the dob has the attribute, and the value is bigger the supplied value, the condition will return true.

Parameters:
attribute - The attribute we want to examine.
value - The value we want to compare with.
Returns:
Self; the IDobQuery-object, to enable chaining.

lesserOrEqual

IDobQuery lesserOrEqual(java.lang.String attribute,
                        double value)
Adds a lesser-or-equal-to-condition to the query. This will check if a specific numerical attribute is lesser than, or equal to, a specific value. If the dob has not the attribute, the condition will return false. If the dob has the attribute, and the value is lesser than supplied value, the condition will return true. If the dob has the attribute, and the value equals the supplied value, the condition will return true. If the dob has the attribute, and the value is bigger the supplied value, the condition will return false.

Parameters:
attribute - The attribute we want to examine.
value - The value we want to compare with.
Returns:
Self; the IDobQuery-object, to enable chaining.

filter

IDobCollection filter(IDobCollection dobCollection)
Takes a IDobCollection as an argument, and returns a new IDobCollection with all IDobs that fullfilled the requirements specified in the query.

Parameters:
dobCollection - The collection we want to filter, with the requirements/conditions specified in the query.
Returns:
The new filtered IDobCollection.

isTrue

boolean isTrue(IDob dob)
Takes a specific IDob as an argument, and returns true if the IDob fullfills all requirements specified in the query.

Parameters:
dob - The Dob we want to test.
Returns:
True or false, depening of if the dob fullfills all requirements in the query, or not.