Changeset 1318
- Timestamp:
- 01/31/08 22:21:40 (7 months ago)
- Files:
-
- trunk/src/main/php/net/stubbles/rdbms/criteria/stubAbstractCompositeCriterion.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/rdbms/criteria/stubCriterion.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/rdbms/criteria/stubCriterionException.php (deleted)
- trunk/src/main/php/net/stubbles/rdbms/criteria/stubGreaterEqualCriterion.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/rdbms/criteria/stubGreaterThanCriterion.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/rdbms/criteria/stubInCriterion.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/rdbms/criteria/stubLessEqualCriterion.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/rdbms/criteria/stubLessThanCriterion.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/rdbms/criteria/stubLikeCriterion.php (modified) (2 diffs)
- trunk/src/test/php/net/stubbles/rdbms/criteria/stubAndCriterionTestCase.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/rdbms/criteria/stubGreaterEqualCriterionTestCase.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/rdbms/criteria/stubGreaterThanCriterionTestCase.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/rdbms/criteria/stubInCriterionTestCase.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/rdbms/criteria/stubLessEqualCriterionTestCase.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/rdbms/criteria/stubLessThanCriterionTestCase.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/rdbms/criteria/stubLikeCriterionTestCase.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/rdbms/criteria/stubOrCriterionTestCase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/rdbms/criteria/stubAbstractCompositeCriterion.php
r1225 r1318 7 7 * @subpackage rdbms_criteria 8 8 */ 9 stubClassLoader::load('net::stubbles::rdbms::criteria::stubCompositeCriterion'); 9 stubClassLoader::load('net::stubbles::lang::exceptions::stubIllegalStateException', 10 'net::stubbles::rdbms::criteria::stubCompositeCriterion' 11 ); 10 12 /** 11 13 * Base class for a composition of several criteria. … … 47 49 * 48 50 * @return string 49 * @throws stub CriterionException51 * @throws stubIllegalStateException 50 52 */ 51 53 public function toSQL() 52 54 { 53 55 if (count($this->criteria) == 0) { 54 throw new stub CriterionException('Can not translate to sql: criterion does not have any criteria to connect.');56 throw new stubIllegalStateException('Can not translate to sql: criterion does not have any criteria to connect.'); 55 57 } 56 58 trunk/src/main/php/net/stubbles/rdbms/criteria/stubCriterion.php
r1225 r1318 7 7 * @subpackage rdbms_criteria 8 8 */ 9 stubClassLoader::load('net::stubbles::rdbms::criteria::stubCriterionException');10 9 /** 11 10 * interface for criteria … … 14 13 * @subpackage rdbms_criteria 15 14 */ 16 interface stubCriterion 15 interface stubCriterion extends stubObject 17 16 { 18 17 /** trunk/src/main/php/net/stubbles/rdbms/criteria/stubGreaterEqualCriterion.php
r1225 r1318 7 7 * @subpackage rdbms_criteria 8 8 */ 9 stubClassLoader::load('net::stubbles::rdbms::criteria::stubAbstractCriterion'); 9 stubClassLoader::load('net::stubbles::lang::exceptions::stubIllegalArgumentException', 10 'net::stubbles::rdbms::criteria::stubAbstractCriterion' 11 ); 10 12 /** 11 13 * Criterion to check for values equal to or greater than the search value. … … 22 24 * @param string $searchValue the value to search for 23 25 * @param string $tableName optional the name of the table where the field is in 24 * @throws stub CriterionException26 * @throws stubIllegalArgumentException 25 27 */ 26 28 public function __construct($fieldName, $searchValue, $tableName = null) 27 29 { 28 30 if (null === $searchValue) { 29 throw new stub CriterionException('SeachValue for GREATER EQUAL criteria can not be NULL.');31 throw new stubIllegalArgumentException('SeachValue for GREATER EQUAL criteria can not be NULL.'); 30 32 } 31 33 trunk/src/main/php/net/stubbles/rdbms/criteria/stubGreaterThanCriterion.php
r1225 r1318 7 7 * @subpackage rdbms_criteria 8 8 */ 9 stubClassLoader::load('net::stubbles::rdbms::criteria::stubAbstractCriterion'); 9 stubClassLoader::load('net::stubbles::lang::exceptions::stubIllegalArgumentException', 10 'net::stubbles::rdbms::criteria::stubAbstractCriterion' 11 ); 10 12 /** 11 13 * Criterion to check for values greater than the search value. … … 22 24 * @param string $searchValue the value to search for 23 25 * @param string $tableName optional the name of the table where the field is in 24 * @throws stub CriterionException26 * @throws stubIllegalArgumentException 25 27 */ 26 28 public function __construct($fieldName, $searchValue, $tableName = null) 27 29 { 28 30 if (null === $searchValue) { 29 throw new stub CriterionException('SeachValue for GREATER THEN criteria can not be NULL.');31 throw new stubIllegalArgumentException('SeachValue for GREATER THEN criteria can not be NULL.'); 30 32 } 31 33 trunk/src/main/php/net/stubbles/rdbms/criteria/stubInCriterion.php
r1225 r1318 7 7 * @subpackage rdbms_criteria 8 8 */ 9 stubClassLoader::load('net::stubbles::rdbms::criteria::stubAbstractCriterion'); 9 stubClassLoader::load('net::stubbles::lang::exceptions::stubIllegalArgumentException', 10 'net::stubbles::rdbms::criteria::stubAbstractCriterion' 11 ); 10 12 /** 11 13 * Criterion to check if something is one of a list of expected values. … … 22 24 * @param array $searchValue the values to search for 23 25 * @param string $tableName optional the name of the table where the field is in 24 * @throws stub CriterionException26 * @throws stubIllegalArgumentException 25 27 */ 26 28 public function __construct($fieldName, $searchValue, $tableName = null) 27 29 { 28 30 if (is_array($searchValue) == false) { 29 throw new stub CriterionException('SeachValue for IN criteria must be of type array.');31 throw new stubIllegalArgumentException('SeachValue for IN criteria must be of type array.'); 30 32 } 31 33 trunk/src/main/php/net/stubbles/rdbms/criteria/stubLessEqualCriterion.php
r1225 r1318 7 7 * @subpackage rdbms_criteria 8 8 */ 9 stubClassLoader::load('net::stubbles::rdbms::criteria::stubAbstractCriterion'); 9 stubClassLoader::load('net::stubbles::lang::exceptions::stubIllegalArgumentException', 10 'net::stubbles::rdbms::criteria::stubAbstractCriterion' 11 ); 10 12 /** 11 13 * Criterion to check for values equal to or lesser than the search value. … … 22 24 * @param string $searchValue the value to search for 23 25 * @param string $tableName optional the name of the table where the field is in 24 * @throws stub CriterionException26 * @throws stubIllegalArgumentException 25 27 */ 26 28 public function __construct($fieldName, $searchValue, $tableName = null) 27 29 { 28 30 if (null === $searchValue) { 29 throw new stub CriterionException('SeachValue for LESS EQUAL criteria can not be NULL.');31 throw new stubIllegalArgumentException('SeachValue for LESS EQUAL criteria can not be NULL.'); 30 32 } 31 33 trunk/src/main/php/net/stubbles/rdbms/criteria/stubLessThanCriterion.php
r1225 r1318 7 7 * @subpackage rdbms_criteria 8 8 */ 9 stubClassLoader::load('net::stubbles::rdbms::criteria::stubAbstractCriterion'); 9 stubClassLoader::load('net::stubbles::lang::exceptions::stubIllegalArgumentException', 10 'net::stubbles::rdbms::criteria::stubAbstractCriterion' 11 ); 10 12 /** 11 13 * Criterion to check for values lesser than the search value. … … 22 24 * @param string $searchValue the value to search for 23 25 * @param string $tableName optional the name of the table where the field is in 24 * @throws stub CriterionException26 * @throws stubIllegalArgumentException 25 27 */ 26 28 public function __construct($fieldName, $searchValue, $tableName = null) 27 29 { 28 30 if (null === $searchValue) { 29 throw new stub CriterionException('SeachValue for LESS THEN criteria can not be NULL.');31 throw new stubIllegalArgumentException('SeachValue for LESS THEN criteria can not be NULL.'); 30 32 } 31 33 trunk/src/main/php/net/stubbles/rdbms/criteria/stubLikeCriterion.php
r1225 r1318 7 7 * @subpackage rdbms_criteria 8 8 */ 9 stubClassLoader::load('net::stubbles::rdbms::criteria::stubAbstractCriterion'); 9 stubClassLoader::load('net::stubbles::lang::exceptions::stubIllegalArgumentException', 10 'net::stubbles::rdbms::criteria::stubAbstractCriterion' 11 ); 10 12 /** 11 13 * Criterion to check if something is like an expected value. … … 25 27 * @param string $searchValue the value to search for 26 28 * @param string $tableName optional the name of the table where the field is in 27 * @throws stub CriterionException29 * @throws stubIllegalArgumentException 28 30 */ 29 31 public function __construct($fieldName, $searchValue, $tableName = null) 30 32 { 31 33 if (null === $searchValue) { 32 throw new stub CriterionException('SeachValue for LIKE criteria can not be NULL.');34 throw new stubIllegalArgumentException('SeachValue for LIKE criteria can not be NULL.'); 33 35 } 34 36 trunk/src/test/php/net/stubbles/rdbms/criteria/stubAndCriterionTestCase.php
r1298 r1318 32 32 33 33 /** 34 * check that no criterion added triggers a stub CriterionException34 * check that no criterion added triggers a stubIllegalStateException 35 35 * 36 36 * @test 37 * @expectedException stub CriterionException37 * @expectedException stubIllegalStateException 38 38 */ 39 39 public function zero() trunk/src/test/php/net/stubbles/rdbms/criteria/stubGreaterEqualCriterionTestCase.php
r1298 r1318 17 17 { 18 18 /** 19 * check that a null value throws a stub CriterionException19 * check that a null value throws a stubIllegalArgumentException 20 20 * 21 21 * @test 22 * @expectedException stub CriterionException22 * @expectedException stubIllegalArgumentException 23 23 */ 24 24 public function equalsNull() trunk/src/test/php/net/stubbles/rdbms/criteria/stubGreaterThanCriterionTestCase.php
r1298 r1318 17 17 { 18 18 /** 19 * check that a null value throws a stub CriterionException19 * check that a null value throws a stubIllegalArgumentException 20 20 * 21 21 * @test 22 * @expectedException stub CriterionException22 * @expectedException stubIllegalArgumentException 23 23 */ 24 24 public function equalsNull() trunk/src/test/php/net/stubbles/rdbms/criteria/stubInCriterionTestCase.php
r1298 r1318 17 17 { 18 18 /** 19 * check that a n ull value throws a stubCriterionException19 * check that a non-array value throws a stubIllegalArgumentException 20 20 * 21 21 * @test 22 * @expectedException stub CriterionException22 * @expectedException stubIllegalArgumentException 23 23 */ 24 24 public function nonArray() trunk/src/test/php/net/stubbles/rdbms/criteria/stubLessEqualCriterionTestCase.php
r1298 r1318 17 17 { 18 18 /** 19 * check that a null value throws a stub CriterionException19 * check that a null value throws a stubIllegalArgumentException 20 20 * 21 21 * @test 22 * @expectedException stub CriterionException22 * @expectedException stubIllegalArgumentException 23 23 */ 24 24 public function equalsNull() trunk/src/test/php/net/stubbles/rdbms/criteria/stubLessThanCriterionTestCase.php
r1298 r1318 17 17 { 18 18 /** 19 * check that a null value throws a stub CriterionException19 * check that a null value throws a stubIllegalArgumentException 20 20 * 21 21 * @test 22 * @expectedException stub CriterionException22 * @expectedException stubIllegalArgumentException 23 23 */ 24 24 public function equalsNull() trunk/src/test/php/net/stubbles/rdbms/criteria/stubLikeCriterionTestCase.php
r1298 r1318 17 17 { 18 18 /** 19 * check that a null value throws a stub CriterionException19 * check that a null value throws a stubIllegalArgumentException 20 20 * 21 21 * @test 22 * @expectedException stub CriterionException22 * @expectedException stubIllegalArgumentException 23 23 */ 24 24 public function equalsNull() trunk/src/test/php/net/stubbles/rdbms/criteria/stubOrCriterionTestCase.php
r1298 r1318 32 32 33 33 /** 34 * check that no criterion added triggers a stub CriterionException34 * check that no criterion added triggers a stubIllegalStateException 35 35 * 36 36 * @test 37 * @expectedException stub CriterionException37 * @expectedException stubIllegalStateException 38 38 */ 39 39 public function zero()
