Skip to content

Commit

Permalink
PHPCR: Ported a first batch of Query Object Model interfaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
kdambekalns committed Jul 24, 2008
1 parent 4e08e2f commit 3ab6a6f
Show file tree
Hide file tree
Showing 11 changed files with 787 additions and 9 deletions.
37 changes: 37 additions & 0 deletions Classes/Query/QOM/F3_PHPCR_Query_QOM_ConstraintInterface.php
@@ -0,0 +1,37 @@
<?php
declare(ENCODING = 'utf-8');

/* *
* This script is part of the TYPO3 project - inspiring people to share! *
* *
* TYPO3 is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License version 2 as published by *
* the Free Software Foundation. *
* *
* This script is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
* Public License for more details. *
* */

/**
* @package PHPCR
* @subpackage Query
* @version $Id$
*/

/**
* Filters the set of node-tuples formed by evaluating the query's selectors and
* the joins between them.
*
* To be included in the query results, a node-tuple must satisfy the constraint.
*
* @package PHPCR
* @subpackage Query
* @version $Id$
* @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
*/
interface F3_PHPCR_Query_QOM_ConstraintInterface {
}

?>
34 changes: 34 additions & 0 deletions Classes/Query/QOM/F3_PHPCR_Query_QOM_DynamicOperandInterface.php
@@ -0,0 +1,34 @@
<?php
declare(ENCODING = 'utf-8');

/* *
* This script is part of the TYPO3 project - inspiring people to share! *
* *
* TYPO3 is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License version 2 as published by *
* the Free Software Foundation. *
* *
* This script is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
* Public License for more details. *
* */

/**
* @package PHPCR
* @subpackage Query
* @version $Id$
*/

/**
* An operand whose value can only be determined in evaluating the query.
*
* @package PHPCR
* @subpackage Query
* @version $Id$
* @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
*/
interface F3_PHPCR_Query_QOM_DynamicOperandInterface extends F3_PHPCR_Query_QOM_OperandInterface {
}

?>
34 changes: 34 additions & 0 deletions Classes/Query/QOM/F3_PHPCR_Query_QOM_OperandInterface.php
@@ -0,0 +1,34 @@
<?php
declare(ENCODING = 'utf-8');

/* *
* This script is part of the TYPO3 project - inspiring people to share! *
* *
* TYPO3 is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License version 2 as published by *
* the Free Software Foundation. *
* *
* This script is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
* Public License for more details. *
* */

/**
* @package PHPCR
* @subpackage Query
* @version $Id$
*/

/**
* An operand to a binary operation specified by a Comparison.
*
* @package PHPCR
* @subpackage Query
* @version $Id$
* @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
*/
interface F3_PHPCR_Query_QOM_OperandInterface {
}

?>
57 changes: 57 additions & 0 deletions Classes/Query/QOM/F3_PHPCR_Query_QOM_PropertyValueInterface.php
@@ -0,0 +1,57 @@
<?php
declare(ENCODING = 'utf-8');

/* *
* This script is part of the TYPO3 project - inspiring people to share! *
* *
* TYPO3 is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License version 2 as published by *
* the Free Software Foundation. *
* *
* This script is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
* Public License for more details. *
* */

/**
* @package PHPCR
* @subpackage Query
* @version $Id$
*/

/**
* Evaluates to the value (or values, if multi-valued) of a property.
*
* If, for a node-tuple, the selector node does not have a property named property,
* the operand evaluates to null.
*
* The query is invalid if:
*
* selector is not the name of a selector in the query, or
* property is not a syntactically valid JCR name.
*
* @package PHPCR
* @subpackage Query
* @version $Id$
* @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
*/
interface F3_PHPCR_Query_QOM_PropertyValueInterface extends F3_PHPCR_Query_QOM_DynamicOperandInterface {

/**
* Gets the name of the selector against which to evaluate this operand.
*
* @return string the selector name; non-null
*/
public function getSelectorName();

/**
* Gets the name of the property.
*
* @return string the property name; non-null
*/
public function getPropertyName();

}

?>
@@ -0,0 +1,59 @@
<?php
declare(ENCODING = 'utf-8');

/* *
* This script is part of the TYPO3 project - inspiring people to share! *
* *
* TYPO3 is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License version 2 as published by *
* the Free Software Foundation. *
* *
* This script is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
* TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
* Public License for more details. *
* */

/**
* @package PHPCR
* @subpackage Query
* @version $Id$
*/

/**
* Defines constants used in the query object model.
*
* @package PHPCR
* @subpackage Query
* @version $Id$
* @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
*/
interface F3_PHPCR_Query_QOM_QueryObjectModelConstantsInterface {

/**
* Join types
*/
const JOIN_TYPE_INNER = 101;
const JOIN_TYPE_LEFT_OUTER = 102;
const JOIN_TYPE_RIGHT_OUTER = 103;

/**
* Operators
*/
const OPERATOR_EQUAL_TO = 201;
const OPERATOR_GREATER_THAN = 205;
const OPERATOR_GREATER_THAN_OR_EQUAL_TO = 206;
const OPERATOR_LESS_THAN = 203;
const OPERATOR_LESS_THAN_OR_EQUAL_TO = 204;
const OPERATOR_LIKE = 207;
const OPERATOR_NOT_EQUAL_TO = 202;

/**
* Ordering
*/
const ORDER_ASCENDING = 301;
const ORDER_DESCENDING = 302;

}

?>

0 comments on commit 3ab6a6f

Please sign in to comment.