Open Journal Systems  3.0.0
 All Data Structures Namespaces Functions Variables Groups Pages
DAO Class Reference
Inheritance diagram for DAO:
AccessKeyDAO AnnouncementDAO AnnouncementTypeDAO ArticleReportDAO AuthSourceDAO ContextDAO ControlledVocabDAO ControlledVocabEntryDAO CounterReportDAO CountryDAO CurrencyDAO DataObjectTombstoneDAO DataObjectTombstoneSettingsDAO EditDecisionDAO EmailLogDAO EventLogDAO ExternalFeedDAO FilterGroupDAO GenreDAO IssueDAO IssueGalleyDAO LanguageDAO LibraryFileDAO MetadataDescriptionDAO NoteDAO NotificationDAO NotificationMailListDAO NotificationSettingsDAO NotificationSubscriptionSettingsDAO OJSCompletedPaymentDAO PayPalDAO PKPAuthorDAO PKPEmailTemplateDAO PKPFileDAO PKPGiftDAO PKPMetricsDAO PKPOAIDAO PKPRoleDAO PKPSectionDAO PKPUserDAO PKPUserSettingsDAO PluginGalleryDAO PluginSettingsDAO ProcessDAO QueryDAO QueuedPaymentDAO RepresentationDAO ReviewAssignmentDAO ReviewFilesDAO ReviewFormDAO ReviewFormElementDAO ReviewFormResponseDAO ReviewReportDAO ReviewRoundDAO ScheduledTaskDAO SessionDAO SettingsDAO SiteDAO SiteSettingsDAO StageAssignmentDAO SubEditorsDAO SubmissionCommentDAO SubmissionFileDAODelegate SubmissionSearchDAO SubscriptionDAO SubscriptionTypeDAO TemporaryFileDAO TimeZoneDAO UsageStatsTemporaryRecordDAO UserGroupAssignmentDAO UserGroupDAO VersionDAO ViewsDAO WorkflowStageDAO

Public Member Functions

 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 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)
 
 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)
 

Static Public Member Functions

static getDataChangedEvent ($elementId=null, $parentElementId=null, $content= '')
 

Data Fields

 $_dataSource
 

Protected Member Functions

 _getInsertId ($table= '', $id= '')
 

Detailed Description

Operations for retrieving and modifying objects from a database.

See Also
DAORegistry

Definition at line 30 of file DAO.inc.php.

Member Function Documentation

DAO::concat ( )

Concatenation.

Definition at line 53 of file DAO.inc.php.

References getDataSource().

Referenced by SubscriptionDAO\_generateUserNameSearchSQL().

DAO::DAO (   $dataSource = null,
  $callHooks = true 
)

Constructor. Initialize the database connection.

Definition at line 62 of file DAO.inc.php.

References HookRegistry\call(), DBConnection\getConn(), and setDataSource().

DAO::dateFromDB (   $d)

Return date from DB as ISO date string.

Parameters
$dstring date from DB
Returns
string

Definition at line 323 of file DAO.inc.php.

References getDataSource().

Referenced by SubscriptionDAO\_fromRow().

DAO::datetimeToDB (   $dt)

Return datetime formatted for DB insertion.

Parameters
$dtint/string *nix timestamp or ISO datetime string
Returns
string

Definition at line 293 of file DAO.inc.php.

References getDataSource().

Referenced by SubscriptionDAO\_generateSearchSQL(), SubscriptionDAO\_insertSubscription(), SubscriptionDAO\_updateSubscription(), AccessKeyDAO\deleteExpiredKeys(), AccessKeyDAO\getAccessKey(), AccessKeyDAO\getAccessKeyByKeyHash(), AccessKeyDAO\getAccessKeyByUserId(), OAIDAO\getDateRangeWhereClause(), TemporaryFileDAO\getExpiredFiles(), PKPUserDAO\getFilteredReviewers(), ArticleSearchDAO\getPhraseResults(), OJSCompletedPaymentDAO\insertCompletedPayment(), SubmissionFileDAODelegate\insertObject(), QueuedPaymentDAO\insertObject(), TemporaryFileDAO\insertObject(), PKPGiftDAO\insertObject(), EventLogDAO\insertObject(), AnnouncementDAO\insertObject(), AccessKeyDAO\insertObject(), NotificationDAO\insertObject(), DataObjectTombstoneDAO\insertObject(), EmailLogDAO\insertObject(), LibraryFileDAO\insertObject(), StageAssignmentDAO\insertObject(), SubmissionCommentDAO\insertObject(), NoteDAO\insertObject(), IssueDAO\insertObject(), ReviewAssignmentDAO\insertObject(), PKPUserDAO\insertObject(), PayPalDAO\insertTransaction(), VersionDAO\insertVersion(), NotificationDAO\setDateRead(), EditDecisionDAO\updateEditorDecision(), ScheduledTaskDAO\updateLastRunTime(), OJSCompletedPaymentDAO\updateObject(), TemporaryFileDAO\updateObject(), SubmissionFileDAODelegate\updateObject(), AnnouncementDAO\updateObject(), AccessKeyDAO\updateObject(), DataObjectTombstoneDAO\updateObject(), PKPGiftDAO\updateObject(), LibraryFileDAO\updateObject(), StageAssignmentDAO\updateObject(), NoteDAO\updateObject(), SubmissionCommentDAO\updateObject(), IssueDAO\updateObject(), ReviewAssignmentDAO\updateObject(), PKPUserDAO\updateObject(), and QueuedPaymentDAO\updateQueuedPayment().

DAO::dateToDB (   $d)

Return date formatted for DB insertion.

Parameters
$dint/string *nix timestamp or ISO date string
Returns
string

Definition at line 303 of file DAO.inc.php.

References getDataSource().

Referenced by SubscriptionDAO\_insertSubscription(), SubscriptionDAO\_updateSubscription(), IndividualSubscriptionDAO\isValidIndividualSubscription(), and InstitutionalSubscriptionDAO\isValidInstitutionalSubscription().

DAO::flushCache ( )

Flush the system cache.

Definition at line 282 of file DAO.inc.php.

References getDataSource(), and setCacheDir().

Referenced by ArticleGalleyDAO\deleteAllPubIds().

DAO::formatDateToDB (   $date,
  $defaultNumWeeks = null,
  $acceptPastDate = true 
)

Format a passed date (in English textual datetime) to Y-m-d H:i:s format, used in database.

Parameters
$datestring Any English textual datetime.
$defaultNumWeeksint If passed and date is null, used to calculate a data in future from today.
$acceptPastDateboolean Will not accept past dates, returning today if false and the passed date is in the past.
Returns
string or null

Definition at line 662 of file DAO.inc.php.

Referenced by EditorAction\setDueDates().

DAO::getAdditionalFieldNames ( )

Get a list of additional field names to store in this DAO. This can be used to extend the table with virtual "columns", typically using the ..._settings table.

Returns
array List of strings representing field names.

Definition at line 440 of file DAO.inc.php.

References HookRegistry\call().

Referenced by updateDataObjectSettings().

DAO::getAffectedRows ( )

Return the number of affected rows by the last UPDATE or DELETE.

Returns
int (or false if not supported)

Definition at line 258 of file DAO.inc.php.

References getDataSource().

Referenced by DataObjectTombstoneDAO\deleteById(), EventLogDAO\deleteById(), NotificationDAO\deleteById(), QueryDAO\deleteById(), IssueGalleyDAO\deleteById(), ArticleGalleyDAO\deleteById(), DataObjectTombstoneDAO\deleteOAISetObjects(), and ScheduledTaskDAO\updateLastRunTime().

static DAO::getDataChangedEvent (   $elementId = null,
  $parentElementId = null,
  $content = '' 
)
static

Generate a JSON message with an event that can be sent to the client to refresh itself according to changes in the DB.

Parameters
$elementIdstring (Optional) To refresh a single element give the element ID here. Otherwise all elements will be refreshed.
$parentElementIdstring (Optional) To refresh a single element that is associated with another one give the parent element ID here.
$contentmixed (Optional) Additional content to pass back to the handler of the JSON message.
Returns
JSONMessage

Definition at line 633 of file DAO.inc.php.

Referenced by PKPEditorDecisionHandler\_saveEditorDecision(), IssueGalleyGridHandler\delete(), ManageAnnouncementGridHandler\deleteAnnouncement(), JournalGridHandler\deleteContext(), WebsiteSettingsTabHandler\deleteFile(), AdminSettingsTabHandler\deleteFile(), LibraryFileGridHandler\deleteFile(), GenreGridHandler\deleteGenre(), IssueGridHandler\deleteIssue(), SubmissionChecklistGridHandler\deleteItem(), PluginGridHandler\deletePlugin(), SectionGridHandler\deleteSection(), SubmissionsListGridHandler\deleteSubmission(), PluginGridHandler\disable(), PKPAdminLanguageGridHandler\disableLocale(), UserGridHandler\disableUser(), PluginGridHandler\enable(), FileApiHandler\enableLinkAction(), PKPAdminLanguageGridHandler\enableLocale(), QueryNotesGridHandler\insertNote(), UserGridHandler\mergeUsers(), IssueGridHandler\publishIssue(), PKPAdminLanguageGridHandler\reloadLocale(), WebsiteSettingsTabHandler\reloadLocalizedDefaultSettings(), TocGridHandler\removeArticle(), UserGridHandler\removeUser(), GenreGridHandler\restoreGenres(), EditorDecisionHandler\saveApproveProof(), WebsiteSettingsTabHandler\saveFile(), AdminSettingsTabHandler\saveFile(), LibraryFileGridHandler\saveFile(), PKPAdminLanguageGridHandler\saveInstallLocale(), LanguageGridHandler\saveLanguageSetting(), PluginGridHandler\saveUploadPlugin(), LanguageGridHandler\setContextPrimaryLocale(), PKPAdminLanguageGridHandler\setPrimaryLocale(), RepresentationsGridHandler\setProofFileCompletion(), PKPAdminLanguageGridHandler\uninstallLocale(), IssueGalleyGridHandler\update(), ManageAnnouncementGridHandler\updateAnnouncement(), JournalGridHandler\updateContext(), ManageCopyeditFilesGridHandler\updateCopyeditFiles(), IssueGridHandler\updateCover(), LibraryFileGridHandler\updateFile(), ManageFinalDraftFilesGridHandler\updateFinalDraftFiles(), GenreGridHandler\updateGenre(), IssueGridHandler\updateIssue(), SubmissionChecklistGridHandler\updateItem(), ManageProofFilesGridHandler\updateProofFiles(), QueriesGridHandler\updateQuery(), ManageQueryNoteFilesGridHandler\updateQueryNoteFiles(), ManageReviewFilesGridHandler\updateReviewFiles(), SectionGridHandler\updateSection(), UserGridHandler\updateUser(), and UserGridHandler\updateUserRoles().

DAO::getDataObjectSettings (   $tableName,
  $idFieldName,
  $idFieldValue,
  $dataObject 
)
DAO::getDirectionMapping (   $direction)

Get the driver for this connection.

Parameters
$directionint
Returns
string

Definition at line 607 of file DAO.inc.php.

Referenced by PKPUserDAO\getUsersByField().

DAO::getDriver ( )

Get the driver for this connection.

Returns
string

Definition at line 597 of file DAO.inc.php.

References DBConnection\getInstance().

DAO::getLocaleFieldNames ( )

Get locale field names. Like getAdditionalFieldNames, but for localized (multilingual) fields.

See Also
getAdditionalFieldNames
Returns
array Array of string field names.

Definition at line 457 of file DAO.inc.php.

References HookRegistry\call().

Referenced by updateDataObjectSettings().

DAO::getType (   $value)

Get the type of a value to be stored in the database

Parameters
$valuestring
Returns
string

Definition at line 365 of file DAO.inc.php.

Referenced by convertToDB().

DAO::nullOrInt (   $value)

Cast the given parameter to an int, or leave it null.

Parameters
$valuemixed
Returns
string|null

Definition at line 430 of file DAO.inc.php.

Referenced by StageAssignmentDAO\insertObject(), StageAssignmentDAO\updateObject(), and SectionDAO\updateObject().

DAO::replace (   $table,
  $arrFields,
  $keyCols 
)

Insert a row in a table, replacing an existing row if necessary.

Parameters
$tablestring
$arrFieldsarray Associative array of colName => value
$keyColsarray Array of column names that are keys
Returns
int
See Also
ADODB::Replace

Definition at line 237 of file DAO.inc.php.

References getDataSource().

Referenced by EmailLogDAO\_insertLogUserIds(), IssueDAO\changePubId(), ArticleGalleyDAO\changePubId(), UserGroupAssignmentDAO\insertObject(), ViewsDAO\recordView(), UserGroupDAO\removeGroupFromStage(), updateDataObjectSettings(), NotificationSettingsDAO\updateNotificationSetting(), DataObjectTombstoneSettingsDAO\updateSetting(), SiteSettingsDAO\updateSetting(), PluginSettingsDAO\updateSetting(), and SettingsDAO\updateSetting().

& DAO::retrieve (   $sql,
  $params = false,
  $callHooks = true 
)

Execute a SELECT SQL statement.

Parameters
$sqlstring the SQL statement
$paramsarray parameters for the SQL statement
Returns
ADORecordSet

Definition at line 84 of file DAO.inc.php.

References HookRegistry\call(), getDataSource(), and Core\microtime().

Referenced by CounterReportDAO\_conditionalCreate(), InstitutionalSubscriptionDAO\_fromRow(), StageAssignmentDAO\_getByIds(), ReviewAssignmentDAO\_getReviewAssignmentsArray(), UserStageAssignmentDAO\_getUsersByIds(), PKPEmailTemplateDAO\_returnLocaleEmailTemplateFromRow(), AnnouncementTypeDAO\announcementTypeExistsByTypeId(), EventLogDAO\build(), ReviewFilesDAO\check(), IssueDAO\customIssueOrderingExists(), SectionDAO\customSectionOrderingExists(), PKPEmailTemplateDAO\customTemplateExistsByKey(), UserGroupAssignmentDAO\deleteAssignmentsByContextId(), ReviewAssignmentDAO\deleteBySubmissionId(), SubmissionFileDAODelegate\deleteObject(), UsageStatsTemporaryRecordDAO\deleteRecord(), SubmissionSearchDAO\deleteSubmissionKeywords(), IndividualSubscriptionDAO\deleteSubscriptionsByJournal(), InstitutionalSubscriptionDAO\deleteSubscriptionsByJournal(), IndividualSubscriptionDAO\deleteSubscriptionsByTypeId(), InstitutionalSubscriptionDAO\deleteSubscriptionsByTypeId(), IndividualSubscriptionDAO\deleteSubscriptionsByUserId(), InstitutionalSubscriptionDAO\deleteSubscriptionsByUserId(), IndividualSubscriptionDAO\deleteSubscriptionsByUserIdForJournal(), InstitutionalSubscriptionDAO\deleteSubscriptionsByUserIdForJournal(), SubscriptionTypeDAO\deleteSubscriptionTypesByJournal(), StageAssignmentDAO\editorAssignedToStage(), SubEditorsDAO\editorExists(), ControlledVocabDAO\enumerate(), ContextDAO\existsByPath(), LibraryFileDAO\filenameExists(), AccessKeyDAO\getAccessKey(), AccessKeyDAO\getAccessKeyByKeyHash(), AccessKeyDAO\getAccessKeyByUserId(), PKPUserDAO\getAllReviewers(), SubmissionAgencyDAO\getAllUniqueAgencies(), SubmissionDisciplineDAO\getAllUniqueDisciplines(), SubmissionKeywordDAO\getAllUniqueKeywords(), SubmissionLanguageDAO\getAllUniqueLanguages(), SubmissionSubjectDAO\getAllUniqueSubjects(), AnnouncementDAO\getAnnouncementAssocId(), AnnouncementDAO\getAnnouncementAssocType(), AnnouncementTypeDAO\getAnnouncementTypeAssocId(), AnnouncementTypeDAO\getAnnouncementTypeName(), ArticleReportDAO\getArticleReport(), PKPAuthorDAO\getAuthorCountBySubmissionId(), PKPEmailTemplateDAO\getBaseEmailTemplate(), SectionDAO\getByAbbrev(), QueryDAO\getByAssoc(), NoteDAO\getByAssoc(), LibraryFileDAO\getByContextId(), DataObjectTombstoneDAO\getByDataObjectId(), ContextDAO\getById(), AnnouncementDAO\getById(), StageAssignmentDAO\getById(), GenreDAO\getById(), PKPAuthorDAO\getById(), IssueGalleyDAO\getById(), ReviewFormElementDAO\getById(), LibraryFileDAO\getById(), NotificationDAO\getById(), QueryDAO\getById(), EventLogDAO\getById(), EmailLogDAO\getById(), ReviewFormDAO\getById(), ArticleGalleyDAO\getById(), ControlledVocabDAO\getById(), ControlledVocabEntryDAO\getById(), AnnouncementTypeDAO\getById(), DataObjectTombstoneDAO\getById(), NoteDAO\getById(), SectionDAO\getById(), PKPUserDAO\getById(), IssueDAO\getById(), ReviewAssignmentDAO\getById(), SubmissionCommentDAO\getById(), ReviewRoundDAO\getById(), IssueGalleyDAO\getByIssueId(), SectionDAO\getByIssueId(), ArticleGalleyDAO\getByJournalId(), GenreDAO\getByKey(), ContextDAO\getByPath(), IssueGalleyDAO\getByPubId(), ReviewAssignmentDAO\getByReviewFormId(), SubEditorsDAO\getBySectionId(), ControlledVocabEntryDAO\getBySetting(), IssueDAO\getBySetting(), ContextDAO\getBySetting(), ReviewRoundDAO\getBySubmissionFileId(), PKPAuthorDAO\getBySubmissionId(), LibraryFileDAO\getBySubmissionId(), ArticleGalleyDAO\getBySubmissionId(), ReviewRoundDAO\getBySubmissionId(), ControlledVocabDAO\getBySymbolic(), SectionDAO\getByTitle(), AnnouncementTypeDAO\getByTypeName(), SubmissionCommentDAO\getByUserId(), UserGroupAssignmentDAO\getByUserId(), ReviewAssignmentDAO\getByUserId(), PKPUserDAO\getByUsername(), ReviewAssignmentDAO\getCancelsAndRegrets(), OJSCompletedPaymentDAO\getCompletedPayment(), IssueDAO\getCurrent(), VersionDAO\getCurrentProducts(), ReviewRoundDAO\getCurrentRoundBySubmissionId(), VersionDAO\getCurrentVersion(), IssueDAO\getCustomIssueOrder(), SectionDAO\getCustomSectionOrder(), PKPEmailTemplateDAO\getCustomTemplateKeys(), getDataObjectSettings(), AuthSourceDAO\getDefaultSource(), EditDecisionDAO\getEditorDecisions(), SectionDAO\getEditorSections(), SubEditorsDAO\getEditorsNotInSection(), PKPEmailTemplateDAO\getEmailTemplate(), PKPEmailTemplateDAO\getEmailTemplates(), SectionDAO\getEmptyByJournalId(), TemporaryFileDAO\getExpiredFiles(), OJSCompletedPaymentDAO\getFastTrackCompletedPayment(), PKPUserDAO\getFilteredReviewers(), ArticleGalleyDAO\getGalleysBySetting(), PKPGiftDAO\getGift(), PKPGiftDAO\getGiftAssocId(), PKPGiftDAO\getGiftAssocType(), ReviewAssignmentDAO\getIncompleteReviewAssignments(), IssueDAO\getIssueByArticleId(), CounterReportDAO\getJournalIds(), ReviewRoundDAO\getLastReviewRoundBySubmissionId(), ReviewAssignmentDAO\getLastReviewRoundReviewAssignmentByReviewer(), ScheduledTaskDAO\getLastRunTime(), ViewsDAO\getLastViewDate(), PKPMetricsDAO\getLoadId(), PKPEmailTemplateDAO\getLocaleEmailTemplate(), NotificationMailListDAO\getMailList(), NotificationMailListDAO\getMailListIdByToken(), CounterReportDAO\getMonthlyLogRange(), CounterReportDAO\getMonthlyTotalRange(), AnnouncementDAO\getMostRecentAnnouncementByAssocId(), IssueGalleyDAO\getNextGalleySequence(), ArticleGalleyDAO\getNextGalleySequence(), NotificationDAO\getNotificationCount(), NotificationSettingsDAO\getNotificationSettings(), NotificationSubscriptionSettingsDAO\getNotificationSubscriptionSettings(), IssueDAO\getNumArticles(), ProcessDAO\getNumberOfObjectsByProcessType(), DataObjectTombstoneDAO\getOAISetObjectsIds(), MetadataDescriptionDAO\getObjectById(), FilterGroupDAO\getObjectById(), ProcessDAO\getObjectById(), FilterGroupDAO\getObjectBySymbolic(), QueryDAO\getParticipantIds(), PluginSettingsDAO\getPluginSettings(), PKPAuthorDAO\getPrimaryContact(), OJSCompletedPaymentDAO\getPublicationCompletedPayment(), AuthorDAO\getPublishedArticlesForAuthor(), IssueDAO\getPublishedIssuesByNumber(), QueuedPaymentDAO\getQueuedPayment(), ReviewFormElementDAO\getRequiredReviewFormElementIds(), ReviewAssignmentDAO\getReviewAssignment(), SubmissionCommentDAO\getReviewerCommentsByReviewerId(), PKPUserDAO\getReviewersForSubmission(), PKPUserDAO\getReviewersNotAssignedToSubmission(), ReviewFormResponseDAO\getReviewFormResponse(), ReviewAssignmentDAO\getReviewIndexesForRound(), ReviewReportDAO\getReviewReport(), ReviewRoundDAO\getReviewRound(), NotificationSubscriptionSettingsDAO\getRSSTokenByUserId(), SessionDAO\getSession(), DataObjectTombstoneDAO\getSets(), DataObjectTombstoneSettingsDAO\getSetting(), PKPUserSettingsDAO\getSetting(), PKPUserSettingsDAO\getSettingsByAssoc(), SiteDAO\getSite(), SiteSettingsDAO\getSiteSettings(), AuthSourceDAO\getSource(), IndividualSubscriptionDAO\getStatusCount(), InstitutionalSubscriptionDAO\getStatusCount(), SubmissionCommentDAO\getSubmissionComments(), OJSCompletedPaymentDAO\getSubmissionCompletedPayment(), SubmissionAgencyDAO\getSubmissionIdsByAgency(), SubmissionDisciplineDAO\getSubmissionIdsByDiscipline(), SubmissionKeywordDAO\getSubmissionIdsByKeyword(), SubmissionLanguageDAO\getSubmissionIdsByLanguage(), SubmissionSubjectDAO\getSubmissionIdsBySubject(), IndividualSubscriptionDAO\getSubscription(), InstitutionalSubscriptionDAO\getSubscription(), IndividualSubscriptionDAO\getSubscriptionIdByUser(), SubscriptionDAO\getSubscriptionJournalId(), SubscriptionTypeDAO\getSubscriptionType(), SubscriptionTypeDAO\getSubscriptionTypeDisablePublicDisplay(), SubscriptionTypeDAO\getSubscriptionTypeInstitutional(), SubscriptionTypeDAO\getSubscriptionTypeJournalId(), SubscriptionTypeDAO\getSubscriptionTypeMembership(), SubscriptionTypeDAO\getSubscriptionTypeName(), SubscriptionTypeDAO\getSubscriptionTypeNonExpiring(), ReviewFormDAO\getUseCounts(), PKPUserDAO\getUserByAuthStr(), PKPUserDAO\getUserByCredentials(), PKPUserDAO\getUserByEmail(), PKPUserDAO\getUserEmail(), PKPUserDAO\getUserFullName(), NotificationSubscriptionSettingsDAO\getUserIdByRSSToken(), InterestDAO\getUserIdsByInterest(), PKPUserSettingsDAO\getUsersBySetting(), UserStageAssignmentDAO\getUsersNotAssignedToStageInUserGroup(), VersionDAO\getVersionHistory(), CounterReportDAO\getYears(), OJSCompletedPaymentDAO\hasPaidFastTrack(), OJSCompletedPaymentDAO\hasPaidPublication(), OJSCompletedPaymentDAO\hasPaidPurchaseArticle(), OJSCompletedPaymentDAO\hasPaidPurchaseIssue(), OJSCompletedPaymentDAO\hasPaidSubmission(), PKPMetricsDAO\hasRecord(), SubmissionSearchDAO\insertKeyword(), SubmissionSearchDAO\insertObject(), OpenAIREDAO\isOpenAIREArticle(), OpenAIREDAO\isOpenAIRERecord(), IssueDAO\issueExists(), IssueDAO\issueIdExists(), IndividualSubscriptionDAO\isValidIndividualSubscription(), InstitutionalSubscriptionDAO\isValidInstitutionalSubscription(), SettingsDAO\loadSettings(), IssueDAO\moveCustomIssueOrder(), NoteDAO\notesExistByAssoc(), ArticleGalleyDAO\pubIdExists(), IssueGalleyDAO\pubIdExists(), IssueDAO\pubIdExists(), PKPGiftDAO\recipientHasGift(), PKPGiftDAO\recipientHasNotRedeemedGift(), ControlledVocabEntryDAO\resequence(), ContextDAO\resequence(), QueryDAO\resequence(), IssueGalleyDAO\resequence(), PKPAuthorDAO\resequenceAuthors(), IssueDAO\resequenceCustomIssueOrders(), SectionDAO\resequenceCustomSectionOrders(), ArticleGalleyDAO\resequenceGalleys(), ReviewFormElementDAO\resequenceReviewFormElements(), ReviewFormDAO\resequenceReviewForms(), SectionDAO\resequenceSections(), SubscriptionTypeDAO\resequenceSubscriptionTypes(), retrieveRange(), ReviewAssignmentDAO\reviewerExists(), ReviewFormElementDAO\reviewFormElementExists(), ReviewFormDAO\reviewFormExists(), ReviewFormResponseDAO\reviewFormResponseExists(), SectionDAO\sectionExists(), SessionDAO\sessionExistsById(), SectionDAO\setDefaultCustomSectionOrders(), NotificationMailListDAO\subscribeGuest(), IndividualSubscriptionDAO\subscriptionExists(), InstitutionalSubscriptionDAO\subscriptionExists(), InstitutionalSubscriptionDAO\subscriptionExistsByInstitutionName(), IndividualSubscriptionDAO\subscriptionExistsByUser(), InstitutionalSubscriptionDAO\subscriptionExistsByUser(), IndividualSubscriptionDAO\subscriptionExistsByUserForJournal(), InstitutionalSubscriptionDAO\subscriptionExistsByUserForJournal(), SubscriptionTypeDAO\subscriptionTypeExistsByTypeId(), SubscriptionTypeDAO\subscriptionTypesExistByInstitutional(), PKPEmailTemplateDAO\templateExistsByKey(), PayPalDAO\transactionExists(), NoteDAO\unreadNotesExistByAssoc(), ReviewFormDAO\unusedReviewFormExists(), ScheduledTaskDAO\updateLastRunTime(), PKPEmailTemplateDAO\updateLocaleEmailTemplateData(), PKPUserSettingsDAO\updateSetting(), PKPUserDAO\userExistsByEmail(), PKPUserDAO\userExistsById(), and PKPUserDAO\userExistsByUsername().

& DAO::retrieveCached (   $sql,
  $params = false,
  $secsToCache = 3600,
  $callHooks = true 
)

Execute a cached SELECT SQL statement.

Parameters
$sqlstring the SQL statement
$paramsarray parameters for the SQL statement
Returns
ADORecordSet

Definition at line 113 of file DAO.inc.php.

References HookRegistry\call(), getDataSource(), Core\microtime(), and setCacheDir().

Referenced by ArticleSearchDAO\getPhraseResults().

& DAO::retrieveLimit (   $sql,
  $params = false,
  $numRows = false,
  $offset = false,
  $callHooks = true 
)

Execute a SELECT SQL statement with LIMIT on the rows returned.

Parameters
$sqlstring the SQL statement
$paramsarray parameters for the SQL statement
$numRowsint maximum number of rows to return in the result set
$offsetint row offset in the result set
Returns
ADORecordSet

Definition at line 146 of file DAO.inc.php.

References HookRegistry\call(), getDataSource(), and Core\microtime().

Referenced by PKPMetricsDAO\getMetrics(), SubmissionCommentDAO\getMostRecentSubmissionComment(), and TemporaryFileDAO\getTemporaryFile().

& DAO::retrieveRange (   $sql,
  $params = false,
  $dbResultRange = null,
  $callHooks = true 
)

Execute a SELECT SQL statment, returning rows in the range supplied.

Parameters
$sqlstring the SQL statement
$paramsarray parameters for the SQL statement
$dbResultRangeDBResultRange object describing the desired range

Definition at line 174 of file DAO.inc.php.

References HookRegistry\call(), getDataSource(), Core\microtime(), and retrieve().

Referenced by ReviewFormDAO\getActiveByAssocId(), ContextDAO\getAll(), SectionDAO\getAll(), PKPGiftDAO\getAllGiftsByRecipient(), AnnouncementDAO\getAnnouncementsNotExpiredByAssocId(), AuthorDAO\getAuthorsAlphabetizedByJournal(), ContextDAO\getAvailable(), EventLogDAO\getByAssoc(), NotificationDAO\getByAssoc(), EmailLogDAO\getByAssoc(), AnnouncementTypeDAO\getByAssoc(), AnnouncementDAO\getByAssocId(), ReviewFormDAO\getByAssocId(), GenreDAO\getByContextId(), SectionDAO\getByContextId(), SubmissionSubjectEntryDAO\getByControlledVocabId(), SubmissionLanguageEntryDAO\getByControlledVocabId(), SubmissionAgencyEntryDAO\getByControlledVocabId(), SubmissionDisciplineEntryDAO\getByControlledVocabId(), SubmissionKeywordEntryDAO\getByControlledVocabId(), InterestEntryDAO\getByControlledVocabId(), ControlledVocabEntryDAO\getByControlledVocabId(), GenreDAO\getByDependenceAndContextId(), EmailLogDAO\getByEventType(), ReviewFormElementDAO\getByReviewFormId(), AnnouncementDAO\getByTypeId(), NoteDAO\getByUserId(), NotificationDAO\getByUserId(), OJSCompletedPaymentDAO\getByUserId(), PKPEmailTemplateDAO\getEmailTemplates(), GenreDAO\getEnabledByContextId(), PKPGiftDAO\getGiftsByAssocId(), PKPGiftDAO\getGiftsByRecipient(), PKPGiftDAO\getGiftsByTypeAndRecipient(), IssueDAO\getIssues(), PKPMetricsDAO\getMetrics(), PKPGiftDAO\getNotRedeemedGiftsByRecipient(), PKPGiftDAO\getNotRedeemedGiftsByTypeAndRecipient(), AnnouncementDAO\getNumAnnouncementsByAssocId(), AnnouncementDAO\getNumAnnouncementsNotExpiredByAssocId(), MetadataDescriptionDAO\getObjectsByAssocId(), OJSCompletedPaymentDAO\getPaymentsByJournalId(), IssueDAO\getPublishedIssues(), ReviewFormResponseDAO\getReviewReviewFormResponseValues(), AuthSourceDAO\getSources(), IndividualSubscriptionDAO\getSubscribedUsers(), InstitutionalSubscriptionDAO\getSubscribedUsers(), IndividualSubscriptionDAO\getSubscriptionByUserForJournal(), IndividualSubscriptionDAO\getSubscriptions(), InstitutionalSubscriptionDAO\getSubscriptions(), IndividualSubscriptionDAO\getSubscriptionsByDateEnd(), InstitutionalSubscriptionDAO\getSubscriptionsByDateEnd(), InstitutionalSubscriptionDAO\getSubscriptionsByInstitutionName(), IndividualSubscriptionDAO\getSubscriptionsByJournalId(), InstitutionalSubscriptionDAO\getSubscriptionsByJournalId(), InstitutionalSubscriptionDAO\getSubscriptionsByUser(), IndividualSubscriptionDAO\getSubscriptionsByUser(), InstitutionalSubscriptionDAO\getSubscriptionsByUserForJournal(), SubscriptionTypeDAO\getSubscriptionTypesByInstitutional(), SubscriptionTypeDAO\getSubscriptionTypesByJournalId(), IssueDAO\getUnpublishedIssues(), ReviewFormDAO\getUnusedByAssocId(), ReviewFormDAO\getUsedByAssocId(), InterestDAO\getUserInterestIds(), PKPUserDAO\getUsersByField(), and PKPUserDAO\getUsersWithNoRole().

DAO::setCacheDir ( )

Configure the caching directory for database results NOTE: This is implemented as a GLOBAL setting and cannot be set on a per-connection basis.

Definition at line 268 of file DAO.inc.php.

References CacheManager\getFileCachePath().

Referenced by SubmissionSearchDAO\clearIndex(), flushCache(), and retrieveCached().

DAO::setDataSource (   $dataSource)

Set db conn.

Parameters
$dataSourceADONewConnection

Definition at line 46 of file DAO.inc.php.

Referenced by DAO().

DAO::update (   $sql,
  $params = false,
  $callHooks = true,
  $dieOnError = true 
)

Execute an INSERT, UPDATE, or DELETE SQL statement.

Parameters
$sqlthe SQL statement the execute
$paramsan array of parameters for the SQL statement
$callHooksboolean Whether or not to call hooks
$dieOnErrorboolean Whether or not to die if an error occurs
Returns
boolean

Definition at line 208 of file DAO.inc.php.

References HookRegistry\call(), getDataSource(), and Core\microtime().

Referenced by CounterReportDAO\_conditionalCreate(), InstitutionalSubscriptionDAO\_deleteSubscriptionIPRanges(), SubscriptionDAO\_insertSubscription(), InstitutionalSubscriptionDAO\_insertSubscriptionIPRanges(), SubscriptionDAO\_updateSubscription(), UserGroupDAO\assignGroupToStage(), ProcessDAO\authorizeProcess(), NotificationDAO\build(), EventLogDAO\changeUser(), EmailLogDAO\changeUser(), SubmissionSearchDAO\clearIndex(), NotificationMailListDAO\confirmMailListSubscription(), AccessKeyDAO\deleteAccessKeyById(), ArticleGalleyDAO\deleteAllPubIds(), IssueDAO\deleteAllPubIds(), SessionDAO\deleteAllSessions(), UserStageAssignmentDAO\deleteAssignment(), UserGroupAssignmentDAO\deleteAssignment(), UserGroupAssignmentDAO\deleteAssignmentsByUserGroupId(), StageAssignmentDAO\deleteByAll(), EmailLogDAO\deleteByAssoc(), PluginSettingsDAO\deleteByContextId(), GenreDAO\deleteByContextId(), DataObjectTombstoneDAO\deleteById(), ReviewFormResponseDAO\deleteById(), SessionDAO\deleteById(), EventLogDAO\deleteById(), ReviewFormElementDAO\deleteById(), AnnouncementDAO\deleteById(), NotificationDAO\deleteById(), LibraryFileDAO\deleteById(), SubmissionCommentDAO\deleteById(), ReviewFormDAO\deleteById(), AnnouncementTypeDAO\deleteById(), QueryDAO\deleteById(), ContextDAO\deleteById(), GenreDAO\deleteById(), SectionDAO\deleteById(), SettingsDAO\deleteById(), NoteDAO\deleteById(), PKPAuthorDAO\deleteById(), IssueGalleyDAO\deleteById(), ArticleGalleyDAO\deleteById(), ReviewRoundDAO\deleteById(), ReviewAssignmentDAO\deleteById(), SessionDAO\deleteByLastUsed(), ReviewFormResponseDAO\deleteByReviewFormElementId(), ReviewFormResponseDAO\deleteByReviewId(), SubEditorsDAO\deleteBySectionId(), SubmissionCommentDAO\deleteBySubmissionId(), UserGroupAssignmentDAO\deleteByUserId(), SessionDAO\deleteByUserId(), SubEditorsDAO\deleteByUserId(), TemporaryFileDAO\deleteByUserId(), IssueDAO\deleteCustomIssueOrdering(), SectionDAO\deleteCustomSection(), SectionDAO\deleteCustomSectionOrdering(), EditDecisionDAO\deleteDecisionsBySubmissionId(), PKPEmailTemplateDAO\deleteDefaultEmailTemplatesByLocale(), SubEditorsDAO\deleteEditor(), PKPEmailTemplateDAO\deleteEmailTemplateByKey(), PKPEmailTemplateDAO\deleteEmailTemplatesByAssoc(), PKPEmailTemplateDAO\deleteEmailTemplatesByLocale(), AccessKeyDAO\deleteExpiredKeys(), QueuedPaymentDAO\deleteExpiredQueuedPayments(), ExternalFeedDAO\deleteExternalFeed(), PKPGiftDAO\deleteGiftById(), NotificationSubscriptionSettingsDAO\deleteNotificationSubscriptionSettings(), DataObjectTombstoneDAO\deleteOAISetObjects(), SupplementaryFileDAODelegate\deleteObject(), SubmissionArtworkFileDAODelegate\deleteObject(), FilterGroupDAO\deleteObject(), AuthSourceDAO\deleteObject(), EmailLogDAO\deleteObject(), IssueFileDAO\deleteObject(), SubmissionFileDAODelegate\deleteObject(), IssueDAO\deleteObject(), MetadataDescriptionDAO\deleteObjectById(), ControlledVocabDAO\deleteObjectById(), ControlledVocabEntryDAO\deleteObjectById(), ProcessDAO\deleteObjectById(), QueuedPaymentDAO\deleteQueuedPayment(), DataObjectTombstoneSettingsDAO\deleteSetting(), SiteSettingsDAO\deleteSetting(), PluginSettingsDAO\deleteSetting(), PKPUserSettingsDAO\deleteSetting(), ReviewFormElementDAO\deleteSetting(), SettingsDAO\deleteSetting(), DataObjectTombstoneSettingsDAO\deleteSettings(), PKPUserSettingsDAO\deleteSettings(), GenreDAO\deleteSettingsByLocale(), NotificationSettingsDAO\deleteSettingsByNotificationId(), PluginSettingsDAO\deleteSettingsByPlugin(), SubmissionSearchDAO\deleteSubmissionKeywords(), IndividualSubscriptionDAO\deleteSubscriptionById(), InstitutionalSubscriptionDAO\deleteSubscriptionById(), SubscriptionTypeDAO\deleteSubscriptionTypeById(), TemporaryFileDAO\deleteTemporaryFileById(), PKPUserDAO\deleteUserById(), ViewsDAO\deleteViews(), ProcessDAO\deleteZombies(), VersionDAO\disableVersion(), ReviewFilesDAO\grant(), CounterReportDAO\incrementCount(), PKPEmailTemplateDAO\insertBaseEmailTemplate(), OJSCompletedPaymentDAO\insertCompletedPayment(), IssueDAO\insertCustomIssueOrder(), SectionDAO\insertCustomSectionOrder(), SubEditorsDAO\insertEditor(), SubmissionSearchDAO\insertKeyword(), NotificationSubscriptionSettingsDAO\insertNewRSSToken(), DataObjectTombstoneDAO\insertOAISetObjects(), FilterGroupDAO\insertObject(), MetadataDescriptionDAO\insertObject(), SupplementaryFileDAODelegate\insertObject(), SubmissionArtworkFileDAODelegate\insertObject(), SubmissionFileDAODelegate\insertObject(), QueuedPaymentDAO\insertObject(), SessionDAO\insertObject(), ReviewRoundDAO\insertObject(), ReviewFormResponseDAO\insertObject(), ProcessDAO\insertObject(), TemporaryFileDAO\insertObject(), ContextDAO\insertObject(), SubmissionSearchDAO\insertObject(), ControlledVocabDAO\insertObject(), ReviewFormElementDAO\insertObject(), PKPGiftDAO\insertObject(), EventLogDAO\insertObject(), QueryDAO\insertObject(), AnnouncementDAO\insertObject(), AccessKeyDAO\insertObject(), NotificationDAO\insertObject(), DataObjectTombstoneDAO\insertObject(), EmailLogDAO\insertObject(), ControlledVocabEntryDAO\insertObject(), LibraryFileDAO\insertObject(), StageAssignmentDAO\insertObject(), SubmissionCommentDAO\insertObject(), ReviewFormDAO\insertObject(), AnnouncementTypeDAO\insertObject(), SectionDAO\insertObject(), GenreDAO\insertObject(), NoteDAO\insertObject(), PKPAuthorDAO\insertObject(), IssueGalleyDAO\insertObject(), ArticleGalleyDAO\insertObject(), IssueDAO\insertObject(), ReviewAssignmentDAO\insertObject(), PKPUserDAO\insertObject(), SubmissionSearchDAO\insertObjectKeyword(), QueryDAO\insertParticipant(), PKPMetricsDAO\insertRecord(), SiteDAO\insertSite(), AuthSourceDAO\insertSource(), InstitutionalSubscriptionDAO\insertSubscription(), SubscriptionTypeDAO\insertSubscriptionType(), PayPalDAO\insertTransaction(), VersionDAO\insertVersion(), PKPEmailTemplateDAO\installEmailTemplateData(), PKPEmailTemplateDAO\installEmailTemplates(), IssueDAO\moveCustomIssueOrder(), SectionDAO\moveCustomSectionOrder(), ViewsDAO\moveViews(), PKPMetricsDAO\purgeLoadBatch(), PKPMetricsDAO\purgeRecords(), QueryDAO\removeAllParticipants(), UserGroupDAO\removeAllStagesFromGroup(), QueryDAO\removeParticipant(), ControlledVocabEntryDAO\resequence(), ContextDAO\resequence(), QueryDAO\resequence(), IssueGalleyDAO\resequence(), PKPAuthorDAO\resequenceAuthors(), IssueDAO\resequenceCustomIssueOrders(), SectionDAO\resequenceCustomSectionOrders(), ArticleGalleyDAO\resequenceGalleys(), ReviewFormElementDAO\resequenceReviewFormElements(), ReviewFormDAO\resequenceReviewForms(), SectionDAO\resequenceSections(), SubscriptionTypeDAO\resequenceSubscriptionTypes(), PKPAuthorDAO\resetPrimaryContact(), ReviewFilesDAO\revoke(), ReviewFilesDAO\revokeByReviewId(), NotificationDAO\setDateRead(), AuthSourceDAO\setDefault(), InterestDAO\setUserInterests(), NotificationMailListDAO\subscribeGuest(), AccessKeyDAO\transferAccessKeys(), EditDecisionDAO\transferEditorDecisions(), NotificationDAO\transferNotifications(), NotificationMailListDAO\unsubscribeGuest(), PKPEmailTemplateDAO\updateBaseEmailTemplate(), IssueDAO\updateCurrent(), updateDataObjectSettings(), EditDecisionDAO\updateEditorDecision(), ScheduledTaskDAO\updateLastRunTime(), PKPEmailTemplateDAO\updateLocaleEmailTemplateData(), NotificationSettingsDAO\updateNotificationSetting(), NotificationSubscriptionSettingsDAO\updateNotificationSubscriptionSettings(), DataObjectTombstoneDAO\updateOAISetObjects(), JournalDAO\updateObject(), OJSCompletedPaymentDAO\updateObject(), SubmissionArtworkFileDAODelegate\updateObject(), SessionDAO\updateObject(), MetadataDescriptionDAO\updateObject(), ReviewRoundDAO\updateObject(), SiteDAO\updateObject(), ReviewFormResponseDAO\updateObject(), FilterGroupDAO\updateObject(), TemporaryFileDAO\updateObject(), ContextDAO\updateObject(), ControlledVocabDAO\updateObject(), ReviewFormElementDAO\updateObject(), SubmissionFileDAODelegate\updateObject(), AnnouncementDAO\updateObject(), AuthSourceDAO\updateObject(), AccessKeyDAO\updateObject(), DataObjectTombstoneDAO\updateObject(), PKPGiftDAO\updateObject(), LibraryFileDAO\updateObject(), StageAssignmentDAO\updateObject(), ReviewFormDAO\updateObject(), ControlledVocabEntryDAO\updateObject(), AnnouncementTypeDAO\updateObject(), QueryDAO\updateObject(), GenreDAO\updateObject(), NoteDAO\updateObject(), SectionDAO\updateObject(), SubmissionCommentDAO\updateObject(), PKPAuthorDAO\updateObject(), IssueGalleyDAO\updateObject(), ArticleGalleyDAO\updateObject(), IssueDAO\updateObject(), ReviewAssignmentDAO\updateObject(), PKPUserDAO\updateObject(), QueuedPaymentDAO\updateQueuedPayment(), DataObjectTombstoneSettingsDAO\updateSetting(), SiteSettingsDAO\updateSetting(), PKPUserSettingsDAO\updateSetting(), SettingsDAO\updateSetting(), ReviewRoundDAO\updateStatus(), InstitutionalSubscriptionDAO\updateSubscription(), SubscriptionTypeDAO\updateSubscriptionType(), and UsageStatsTemporaryRecordDAO\UsageStatsTemporaryRecordDAO().

Field Documentation

DAO::$_dataSource

The database connection object

Definition at line 32 of file DAO.inc.php.

Referenced by getDataSource().


The documentation for this class was generated from the following file: