Open Journal Systems
3.3.0
|
Public Member Functions | |
_fromRow ($primaryRow) | |
deleteById ($objectId) | |
deleteObject ($object) | |
getById ($objectId) | |
getInsertId () | |
insertObject ($object) | |
newDataObject () | |
updateObject ($object) | |
![]() | |
__construct ($dataSource=null, $callHooks=true) | |
concat () | |
convertFromDB ($value, $type) | |
convertToDB ($value, &$type) | |
dateFromDB ($d) | |
datetimeFromDB ($dt) | |
datetimeToDB ($dt) | |
dateToDB ($d) | |
flushCache () | |
formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true) | |
getAdditionalFieldNames () | |
getAffectedRows () | |
getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject) | |
getDataSource () | |
getDirectionMapping ($direction) | |
getDriver () | |
getLocaleFieldNames () | |
getType ($value) | |
handleError ($dataSource, $sql) | |
nullOrInt ($value) | |
replace ($table, $arrFields, $keyCols) | |
& | retrieve ($sql, $params=false, $callHooks=true) |
& | retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true) |
& | retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true) |
& | retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true) |
setCacheDir () | |
setDataSource ($dataSource) | |
update ($sql, $params=false, $callHooks=true, $dieOnError=true) | |
updateDataObjectSettings ($tableName, $dataObject, $idArray) | |
Data Fields | |
$primaryKeyColumn | |
$primaryTableColumns = array() | |
$schemaName | |
$settingsTableName | |
$tableName | |
![]() | |
$_dataSource | |
Additional Inherited Members | |
![]() | |
static | getDataChangedEvent ($elementId=null, $parentElementId=null, $content='') |
![]() | |
_getInsertId ($table='', $id='') | |
A base class for DAOs which rely on a json-schema file to define the data object.
Definition at line 18 of file SchemaDAO.inc.php.
SchemaDAO::_fromRow | ( | $primaryRow | ) |
Return a DataObject from a result row
$primaryRow | array The result row from the primary table lookup |
Reimplemented in ReviewerSubmissionDAO, PKPSubmissionDAO, PKPAuthorDAO, EmailTemplateDAO, PKPPublicationDAO, and PublicationDAO.
Definition at line 240 of file SchemaDAO.inc.php.
References PKPServices\get().
Referenced by ArticleGalleyDAO\getByBestGalleyId(), getById(), AnnouncementDAO\getById(), ContextDAO\getByPath(), and AnnouncementDAO\getMostRecentAnnouncementByAssocId().
SchemaDAO::deleteById | ( | $objectId | ) |
Delete an object by its ID
$objectId | int |
Reimplemented in PKPSubmissionDAO, SubmissionDAO, and PKPPublicationDAO.
Definition at line 223 of file SchemaDAO.inc.php.
Referenced by AnnouncementDAO\deleteByAssoc().
SchemaDAO::deleteObject | ( | $object | ) |
Delete an object
A wrapper function for SchemaDAO::deleteObjectById().
$object | DataObject The object to insert into the database |
Reimplemented in PKPSubmissionDAO.
Definition at line 214 of file SchemaDAO.inc.php.
Referenced by PKPAuthorDAO\deleteBySubmissionId(), and AnnouncementDAO\deleteByTypeId().
SchemaDAO::getById | ( | $objectId | ) |
Retrieve an object by ID
$objectId | int |
Reimplemented in PKPAuthorDAO.
Definition at line 61 of file SchemaDAO.inc.php.
References _fromRow(), and DAO\retrieve().
Referenced by PKPSubmissionDAO\_cacheMiss(), PKPSubmissionDAO\deleteById(), ArticleGalleyDAO\getByBestGalleyId(), and PKPSubmissionDAO\getByPubId().
SchemaDAO::getInsertId | ( | ) |
Get the ID of the last inserted context.
Reimplemented in AnnouncementDAO, PKPSubmissionDAO, and PKPAuthorDAO.
Definition at line 282 of file SchemaDAO.inc.php.
Referenced by insertObject().
SchemaDAO::insertObject | ( | $object | ) |
Insert a new object
DataObject | $object | The object to insert into the database |
Reimplemented in PKPPublicationDAO, and EmailTemplateDAO.
Definition at line 81 of file SchemaDAO.inc.php.
References PKPServices\get(), getInsertId(), and DAO\update().
|
abstract |
Create a new DataObject of the appropriate class
Reimplemented in AnnouncementDAO, ReviewerSubmissionDAO, JournalDAO, EmailTemplateDAO, ArticleGalleyDAO, PKPAuthorDAO, PKPPublicationDAO, and SubmissionDAO.
SchemaDAO::updateObject | ( | $object | ) |
Update an object
When updating an object, we remove table rows for any settings which are no longer present.
Multilingual fields are an exception to this. When a locale key is missing from the object, it is not removed from the database. This is to ensure that data from a locale which is later disabled is not automatically removed from the database, and will appear if the locale is re-enabled.
To delete a value for a locale key, a null value must be passed.
$object | DataObject The object to insert into the database |
Reimplemented in PKPPublicationDAO, and EmailTemplateDAO.
Definition at line 145 of file SchemaDAO.inc.php.
References PKPServices\get().
Referenced by PKPAuthorDAO\changePublicationLocale().
string SchemaDAO::$primaryKeyColumn |
The column name for the object id in primary and settings tables
Definition at line 41 of file SchemaDAO.inc.php.
array SchemaDAO::$primaryTableColumns = array() |
Maps schema properties for the primary table to their column names
Definition at line 47 of file SchemaDAO.inc.php.
string SchemaDAO::$schemaName |
One of the SCHEMA_... constants
Definition at line 23 of file SchemaDAO.inc.php.
string SchemaDAO::$settingsTableName |
The name of the settings table for this object
Definition at line 35 of file SchemaDAO.inc.php.
string SchemaDAO::$tableName |
The name of the primary table for this object
Definition at line 29 of file SchemaDAO.inc.php.