Open Journal Systems  3.0.0
 All Classes Namespaces Functions Variables Groups Pages
DAO Class Reference
Inheritance diagram for DAO:
AccessKeyDAO ArticleGalleyDAO ArticleReportDAO AuthSourceDAO BookForReviewAuthorDAO BookForReviewDAO CommentDAO ContextDAO ControlledVocabDAO ControlledVocabEntryDAO CounterReportDAO CurrencyDAO DataObjectTombstoneDAO DataObjectTombstoneSettingsDAO EditDecisionDAO EmailLogDAO EventLogDAO ExternalFeedDAO FilterGroupDAO FooterCategoryDAO FooterLinkDAO GenreDAO IssueDAO IssueGalleyDAO LanguageDAO LibraryFileDAO MetadataDescriptionDAO MetricsDAO NotificationDAO NotificationMailListDAO NotificationSettingsDAO NotificationSubscriptionSettingsDAO OJSCompletedPaymentDAO PayPalDAO PKPAnnouncementDAO PKPAnnouncementTypeDAO PKPAuthorDAO PKPEmailTemplateDAO PKPFileDAO PKPGiftDAO PKPMetricsDAO PKPOAIDAO PKPRoleDAO PKPSectionDAO PKPSocialMediaDAO PKPUserSettingsDAO PluginSettingsDAO ProcessDAO QueuedPaymentDAO ReferralDAO RepresentationDAO ReviewAssignmentDAO ReviewFilesDAO ReviewFormDAO ReviewFormElementDAO ReviewFormResponseDAO ReviewReportDAO ReviewRoundDAO RTDAO ScheduledTaskDAO SectionEditorsDAO SessionDAO SettingsDAO SignoffDAO SiteDAO SiteSettingsDAO StageAssignmentDAO StaticPagesDAO SubmissionCommentDAO SubmissionFileDAODelegate SubmissionSearchDAO SubscriptionDAO SubscriptionTypeDAO TemporaryFileDAO TimedViewReportDAO UsageStatsTemporaryRecordDAO UsageStatsTemporaryRecordDAO UserGroupAssignmentDAO UserGroupDAO VersionDAO ViewsDAO

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)
 
 getAffectedRows ()
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getType ($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)
 

Public Attributes

 $_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::_getInsertId (   $table = '',
  $id = '' 
)
protected

Return the last ID inserted in an autonumbered field.

Parameters
$tablestring table name
$idstring the ID/key column in the table
Returns
int

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

References getDataSource().

Referenced by OJSCompletedPaymentDAO\getInsertId(), QueuedPaymentDAO\getInsertId(), SubscriptionDAO\getInsertId(), NotificationMailListDAO\getInsertId(), ContextDAO\getInsertId(), TemporaryFileDAO\getInsertId(), DataObjectTombstoneDAO\getInsertId(), EventLogDAO\getInsertId(), SubmissionCommentDAO\getInsertId(), CommentDAO\getInsertId(), EmailLogDAO\getInsertId(), StageAssignmentDAO\getInsertId(), AccessKeyDAO\getInsertId(), FooterLinkDAO\getInsertId(), ReferralDAO\getInsertId(), LibraryFileDAO\getInsertId(), ReviewRoundDAO\getInsertId(), NotificationDAO\getInsertId(), PKPSocialMediaDAO\getInsertId(), GenreDAO\getInsertId(), PKPAnnouncementTypeDAO\getInsertId(), FooterCategoryDAO\getInsertId(), ReviewFormElementDAO\getInsertId(), PKPAnnouncementDAO\getInsertId(), IssueDAO\getInsertId(), ArticleFileDAO\getInsertId(), PKPAuthorDAO\getInsertId(), IssueGalleyDAO\getInsertId(), ArticleGalleyDAO\getInsertId(), SubscriptionTypeDAO\getInsertId(), SectionDAO\getInsertId(), ReviewFormDAO\getInsertId(), PKPGiftDAO\getInsertId(), PKPEmailTemplateDAO\getInsertId(), ReviewAssignmentDAO\getInsertId(), RTDAO\insertContext(), SubmissionSearchDAO\insertKeyword(), SubmissionFileDAODelegate\insertObject(), SubmissionSearchDAO\insertObject(), RTDAO\insertSearch(), AuthSourceDAO\insertSource(), and RTDAO\insertVersion().

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\_returnSubscriptionFromRow().

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(), TimedViewReportDAO\clearLogs(), AccessKeyDAO\deleteExpiredKeys(), TimedViewReportDAO\getAbstractViewCount(), AccessKeyDAO\getAccessKey(), AccessKeyDAO\getAccessKeyByKeyHash(), AccessKeyDAO\getAccessKeyByUserId(), OAIDAO\getDateRangeWhereClause(), TimedViewReportDAO\getGalleyViewCountsForArticle(), ArticleSearchDAO\getPhraseResults(), TimedViewReportDAO\incrementViewCount(), ArticleFileDAO\insertArticleFile(), OJSCompletedPaymentDAO\insertCompletedPayment(), SubmissionFileDAODelegate\insertObject(), QueuedPaymentDAO\insertObject(), TemporaryFileDAO\insertObject(), PKPGiftDAO\insertObject(), EventLogDAO\insertObject(), PKPAnnouncementDAO\insertObject(), AccessKeyDAO\insertObject(), NotificationDAO\insertObject(), DataObjectTombstoneDAO\insertObject(), EmailLogDAO\insertObject(), LibraryFileDAO\insertObject(), SignoffDAO\insertObject(), StageAssignmentDAO\insertObject(), CommentDAO\insertObject(), SubmissionCommentDAO\insertObject(), IssueDAO\insertObject(), ReviewAssignmentDAO\insertObject(), PayPalDAO\insertTransaction(), VersionDAO\insertVersion(), ReferralDAO\replaceReferral(), NotificationDAO\setDateRead(), ArticleFileDAO\updateArticleFile(), EditDecisionDAO\updateEditorDecision(), ScheduledTaskDAO\updateLastRunTime(), TemporaryFileDAO\updateObject(), SubmissionFileDAODelegate\updateObject(), PKPAnnouncementDAO\updateObject(), AccessKeyDAO\updateObject(), DataObjectTombstoneDAO\updateObject(), PKPGiftDAO\updateObject(), LibraryFileDAO\updateObject(), SignoffDAO\updateObject(), SubmissionCommentDAO\updateObject(), CommentDAO\updateObject(), IssueDAO\updateObject(), ReviewAssignmentDAO\updateObject(), QueuedPaymentDAO\updateQueuedPayment(), and ReferralDAO\updateReferral().

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 635 of file DAO.inc.php.

Referenced by AnnouncementForm\setDateExpire(), and EditorAction\setDueDates().

DAO::getAffectedRows ( )
static DAO::getDataChangedEvent (   $elementId = null,
  $parentElementId = null 
)
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 To refresh a single element give the element ID here. Otherwise all elements will be refreshed.
$parentElementIdstring To refresh a single element that is associated with another one give the parent element ID here.
Returns
string A rendered JSON message.

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

Referenced by CopyeditingFilesGridHandler\approveCopyedit(), IssueGalleyGridHandler\delete(), JournalGridHandler\deleteContext(), ContributorGridHandler\deleteContributor(), PreparedEmailsGridHandler\deleteCustomEmail(), PKPManageFileApiHandler\deleteFile(), WebsiteSettingsTabHandler\deleteFile(), AdminSettingsTabHandler\deleteFile(), LibraryFileGridHandler\deleteFile(), GenreGridHandler\deleteGenre(), IssueGridHandler\deleteIssue(), SubmissionChecklistGridHandler\deleteItem(), AdminCategoriesGridHandler\deleteItem(), NotificationsGridHandler\deleteNotification(), PluginGridHandler\deletePlugin(), SectionGridHandler\deleteSection(), SponsorGridHandler\deleteSponsor(), SubmissionsListGridHandler\deleteSubmission(), PreparedEmailsGridHandler\disableEmail(), UserGridHandler\disableUser(), PreparedEmailsGridHandler\enableEmail(), FileApiHandler\enableLinkAction(), UserGridHandler\mergeUsers(), PluginGridHandler\plugin(), WebsiteSettingsTabHandler\reloadLocalizedDefaultSettings(), TocGridHandler\removeArticle(), UserGridHandler\removeUser(), PreparedEmailsGridHandler\resetAllEmails(), PreparedEmailsGridHandler\resetEmail(), GenreGridHandler\restoreGenres(), EditorDecisionHandler\saveApproveProof(), WebsiteSettingsTabHandler\saveFile(), AdminSettingsTabHandler\saveFile(), LibraryFileGridHandler\saveFile(), LanguageGridHandler\saveLanguageSetting(), PluginGridHandler\saveUploadPlugin(), LanguageGridHandler\setContextPrimaryLocale(), IssueGalleyGridHandler\update(), JournalGridHandler\updateContext(), ContributorGridHandler\updateContributor(), IssueGridHandler\updateCover(), LibraryFileGridHandler\updateFile(), ManageFinalDraftFilesGridHandler\updateFinalDraftFiles(), GenreGridHandler\updateGenre(), IssueGridHandler\updateIssue(), SubmissionChecklistGridHandler\updateItem(), AdminCategoriesGridHandler\updateItem(), PreparedEmailsGridHandler\updatePreparedEmail(), ManageReviewFilesGridHandler\updateReviewFiles(), SectionGridHandler\updateSection(), SponsorGridHandler\updateSponsor(), UserGridHandler\updateUser(), and UserGridHandler\updateUserRoles().

DAO::getDirectionMapping (   $direction)

Get the driver for this connection.

Parameters
$directionint
Returns
string

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

DAO::getDriver ( )

Get the driver for this connection.

Returns
string

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

References DBConnection\getInstance().

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::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(), ViewsDAO\recordView(), UserGroupDAO\removeGroupFromStage(), ReferralDAO\replaceReferral(), 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(), SignoffDAO\_getAllInternally(), StageAssignmentDAO\_getByIds(), ReviewAssignmentDAO\_getReviewAssignmentsArray(), PKPEmailTemplateDAO\_returnLocaleEmailTemplateFromRow(), InstitutionalSubscriptionDAO\_returnSubscriptionFromRow(), PKPAnnouncementTypeDAO\announcementTypeExistsByTypeId(), CommentDAO\attributedCommentsExistForUser(), EventLogDAO\build(), FooterCategoryDAO\categoryExistsByPath(), 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(), SectionEditorsDAO\editorExists(), ControlledVocabDAO\enumerate(), ContextDAO\existsByPath(), LibraryFileDAO\filenameExists(), IssueGalleyDAO\galleyExistsByFileId(), ArticleGalleyDAO\galleyExistsByFileId(), TimedViewReportDAO\getAbstractViewCount(), AccessKeyDAO\getAccessKey(), AccessKeyDAO\getAccessKeyByKeyHash(), AccessKeyDAO\getAccessKeyByUserId(), SubmissionFileSignoffDAO\getAllBySubmission(), SubmissionAgencyDAO\getAllUniqueAgencies(), SubmissionDisciplineDAO\getAllUniqueDisciplines(), SubmissionKeywordDAO\getAllUniqueKeywords(), SubmissionLanguageDAO\getAllUniqueLanguages(), SubmissionSubjectDAO\getAllUniqueSubjects(), PKPAnnouncementDAO\getAnnouncementAssocId(), PKPAnnouncementDAO\getAnnouncementAssocType(), PKPAnnouncementTypeDAO\getAnnouncementTypeAssocId(), PKPAnnouncementTypeDAO\getAnnouncementTypeName(), ReviewAssignmentDAO\getAnonymousReviewerStatistics(), ArticleFileDAO\getArticleFile(), ArticleFileDAO\getArticleFileRevisions(), ArticleFileDAO\getArticleFileRevisionsInRange(), ArticleFileDAO\getArticleFilesByArticle(), ArticleFileDAO\getArticleFilesByAssocId(), ArticleReportDAO\getArticleReport(), PKPAuthorDAO\getAuthorCountBySubmissionId(), PKPEmailTemplateDAO\getBaseEmailTemplate(), SectionDAO\getByAbbrev(), LibraryFileDAO\getByContextId(), DataObjectTombstoneDAO\getByDataObjectId(), SignoffDAO\getByFileRevision(), ContextDAO\getById(), PKPAnnouncementDAO\getById(), StageAssignmentDAO\getById(), ControlledVocabEntryDAO\getById(), PKPSocialMediaDAO\getById(), FooterCategoryDAO\getById(), SignoffDAO\getById(), FooterLinkDAO\getById(), GenreDAO\getById(), PKPAuthorDAO\getById(), ReviewFormElementDAO\getById(), IssueGalleyDAO\getById(), LibraryFileDAO\getById(), NotificationDAO\getById(), EmailLogDAO\getById(), EventLogDAO\getById(), ReviewFormDAO\getById(), ControlledVocabDAO\getById(), PKPAnnouncementTypeDAO\getById(), ArticleGalleyDAO\getById(), DataObjectTombstoneDAO\getById(), IssueDAO\getById(), SectionDAO\getById(), ReviewAssignmentDAO\getById(), CommentDAO\getById(), SubmissionCommentDAO\getById(), ReviewRoundDAO\getById(), IssueGalleyDAO\getByIssueId(), SectionDAO\getByIssueId(), ArticleGalleyDAO\getByJournalId(), GenreDAO\getByKey(), FooterCategoryDAO\getByPath(), ContextDAO\getByPath(), IssueGalleyDAO\getByPubId(), ReviewAssignmentDAO\getByReviewFormId(), ControlledVocabEntryDAO\getBySetting(), IssueDAO\getBySetting(), ContextDAO\getBySetting(), ReviewRoundDAO\getBySubmissionFileId(), PKPAuthorDAO\getBySubmissionId(), LibraryFileDAO\getBySubmissionId(), ArticleGalleyDAO\getBySubmissionId(), ReviewRoundDAO\getBySubmissionId(), ControlledVocabDAO\getBySymbolic(), SignoffDAO\getBySymbolic(), SectionDAO\getByTitle(), PKPAnnouncementTypeDAO\getByTypeName(), SubmissionCommentDAO\getByUserId(), CommentDAO\getByUserId(), UserGroupAssignmentDAO\getByUserId(), ReviewAssignmentDAO\getByUserId(), SignoffDAO\getByUserId(), ReviewAssignmentDAO\getCancelsAndRegrets(), CommentDAO\getCommentsByParentId(), OJSCompletedPaymentDAO\getCompletedPayment(), RTDAO\getContext(), FooterCategoryDAO\getCountByContextId(), IssueDAO\getCurrent(), VersionDAO\getCurrentProducts(), ReviewRoundDAO\getCurrentRoundBySubmissionId(), VersionDAO\getCurrentVersion(), IssueDAO\getCustomIssueOrder(), SectionDAO\getCustomSectionOrder(), PKPEmailTemplateDAO\getCustomTemplateKeys(), AuthSourceDAO\getDefaultSource(), EditDecisionDAO\getEditorDecisions(), SectionEditorsDAO\getEditorsBySectionId(), SectionDAO\getEditorSections(), SectionEditorsDAO\getEditorsNotInSection(), PKPEmailTemplateDAO\getEmailTemplate(), PKPEmailTemplateDAO\getEmailTemplates(), SectionDAO\getEmptyByJournalId(), OJSCompletedPaymentDAO\getFastTrackCompletedPayment(), ArticleGalleyDAO\getGalleysBySetting(), TimedViewReportDAO\getGalleyViewCountsForArticle(), PKPGiftDAO\getGift(), PKPGiftDAO\getGiftAssocId(), PKPGiftDAO\getGiftAssocType(), ReviewAssignmentDAO\getIncompleteReviewAssignments(), IssueDAO\getIssueByArticleId(), CounterReportDAO\getJournalIds(), FooterLinkDAO\getLargestCategoryTotalByContextId(), ReviewRoundDAO\getLastReviewRoundBySubmissionId(), ReviewAssignmentDAO\getLastReviewRoundReviewAssignmentByReviewer(), ScheduledTaskDAO\getLastRunTime(), ViewsDAO\getLastViewDate(), MetricsDAO\getLoadId(), PKPMetricsDAO\getLoadId(), PKPEmailTemplateDAO\getLocaleEmailTemplate(), NotificationMailListDAO\getMailList(), NotificationMailListDAO\getMailListIdByToken(), CounterReportDAO\getMonthlyLogRange(), CounterReportDAO\getMonthlyTotalRange(), PKPAnnouncementDAO\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(), PluginSettingsDAO\getPluginSettings(), PKPAuthorDAO\getPrimaryContact(), OJSCompletedPaymentDAO\getPublicationCompletedPayment(), AuthorDAO\getPublishedArticlesForAuthor(), IssueDAO\getPublishedIssuesByNumber(), QueuedPaymentDAO\getQueuedPayment(), ReferralDAO\getReferral(), ReviewFormElementDAO\getRequiredReviewFormElementIds(), ReviewAssignmentDAO\getReviewAssignment(), SubmissionCommentDAO\getReviewerCommentsByReviewerId(), ReviewAssignmentDAO\getReviewerStatistics(), ReviewFormResponseDAO\getReviewFormResponse(), ReviewAssignmentDAO\getReviewIndexesForRound(), ReviewReportDAO\getReviewReport(), ReviewRoundDAO\getReviewRound(), ArticleFileDAO\getRevisionNumber(), CommentDAO\getRootCommentsBySubmissionId(), NotificationSubscriptionSettingsDAO\getRSSTokenByUserId(), RTDAO\getSearch(), SessionDAO\getSession(), DataObjectTombstoneDAO\getSets(), DataObjectTombstoneSettingsDAO\getSetting(), PKPUserSettingsDAO\getSetting(), SettingsDAO\getSettings(), 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(), NotificationSubscriptionSettingsDAO\getUserIdByRSSToken(), InterestDAO\getUserIdsByInterest(), PKPUserSettingsDAO\getUsersBySetting(), SignoffDAO\getUsersBySymbolic(), RTDAO\getVersion(), VersionDAO\getVersionHistory(), CounterReportDAO\getYears(), OJSCompletedPaymentDAO\hasPaidFastTrack(), OJSCompletedPaymentDAO\hasPaidPublication(), OJSCompletedPaymentDAO\hasPaidPurchaseArticle(), OJSCompletedPaymentDAO\hasPaidPurchaseIssue(), OJSCompletedPaymentDAO\hasPaidSubmission(), MetricsDAO\hasRecord(), PKPMetricsDAO\hasRecord(), SubmissionSearchDAO\insertKeyword(), SubmissionSearchDAO\insertObject(), OpenAIREDAO\isOpenAIREArticle(), OpenAIREDAO\isOpenAIRERecord(), IssueDAO\issueExists(), IssueDAO\issueIdExists(), IndividualSubscriptionDAO\isValidIndividualSubscription(), InstitutionalSubscriptionDAO\isValidInstitutionalSubscription(), IssueDAO\moveCustomIssueOrder(), ArticleGalleyDAO\pubIdExists(), IssueGalleyDAO\pubIdExists(), IssueDAO\pubIdExists(), PKPGiftDAO\recipientHasGift(), PKPGiftDAO\recipientHasNotRedeemedGift(), ReferralDAO\referralExistsByUrl(), ContextDAO\resequence(), ControlledVocabEntryDAO\resequence(), IssueGalleyDAO\resequence(), PKPAuthorDAO\resequenceAuthors(), RTDAO\resequenceContexts(), IssueDAO\resequenceCustomIssueOrders(), SectionDAO\resequenceCustomSectionOrders(), ArticleGalleyDAO\resequenceGalleys(), ReviewFormElementDAO\resequenceReviewFormElements(), ReviewFormDAO\resequenceReviewForms(), RTDAO\resequenceSearches(), SectionDAO\resequenceSections(), SubscriptionTypeDAO\resequenceSubscriptionTypes(), retrieveRange(), ReviewAssignmentDAO\reviewerExists(), ReviewFormElementDAO\reviewFormElementExists(), ReviewFormDAO\reviewFormExists(), ReviewFormResponseDAO\reviewFormResponseExists(), SectionDAO\sectionExists(), SessionDAO\sessionExistsById(), SectionDAO\setDefaultCustomSectionOrders(), SignoffDAO\signoffExists(), NotificationMailListDAO\subscribeGuest(), IndividualSubscriptionDAO\subscriptionExists(), InstitutionalSubscriptionDAO\subscriptionExists(), InstitutionalSubscriptionDAO\subscriptionExistsByInstitutionName(), IndividualSubscriptionDAO\subscriptionExistsByUser(), InstitutionalSubscriptionDAO\subscriptionExistsByUser(), IndividualSubscriptionDAO\subscriptionExistsByUserForJournal(), InstitutionalSubscriptionDAO\subscriptionExistsByUserForJournal(), SubscriptionTypeDAO\subscriptionTypeExistsByTypeId(), SubscriptionTypeDAO\subscriptionTypesExistByInstitutional(), PKPEmailTemplateDAO\templateExistsByKey(), PayPalDAO\transactionExists(), ReviewFormDAO\unusedReviewFormExists(), ScheduledTaskDAO\updateLastRunTime(), PKPEmailTemplateDAO\updateLocaleEmailTemplateData(), and PKPUserSettingsDAO\updateSetting().

& 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 ArticleFileDAO\getArticleFile(), MetricsDAO\getMetrics(), 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(), PKPAnnouncementDAO\getAnnouncementsNotExpiredByAssocId(), AuthorDAO\getAuthorsAlphabetizedByJournal(), EventLogDAO\getByAssoc(), NotificationDAO\getByAssoc(), EmailLogDAO\getByAssoc(), PKPAnnouncementTypeDAO\getByAssoc(), PKPAnnouncementDAO\getByAssocId(), ReviewFormDAO\getByAssocId(), FooterLinkDAO\getByCategoryId(), GenreDAO\getByContextId(), PKPSocialMediaDAO\getByContextId(), FooterCategoryDAO\getByContextId(), SectionDAO\getByContextId(), SubmissionAgencyEntryDAO\getByControlledVocabId(), SubmissionDisciplineEntryDAO\getByControlledVocabId(), SubmissionKeywordEntryDAO\getByControlledVocabId(), SubmissionLanguageEntryDAO\getByControlledVocabId(), SubmissionSubjectEntryDAO\getByControlledVocabId(), ControlledVocabEntryDAO\getByControlledVocabId(), GenreDAO\getByDependenceAndContextId(), EmailLogDAO\getByEventType(), ReviewFormElementDAO\getByReviewFormId(), PKPAnnouncementDAO\getByTypeId(), NotificationDAO\getByUserId(), ReferralDAO\getByUserId(), RTDAO\getContexts(), PKPEmailTemplateDAO\getEmailTemplates(), GenreDAO\getEnabledByContextId(), PKPSocialMediaDAO\getEnabledForCatalogByContextId(), PKPSocialMediaDAO\getEnabledForContextByContextId(), PKPGiftDAO\getGiftsByAssocId(), PKPGiftDAO\getGiftsByRecipient(), PKPGiftDAO\getGiftsByTypeAndRecipient(), IssueDAO\getIssues(), MetricsDAO\getMetrics(), PKPMetricsDAO\getMetrics(), FooterCategoryDAO\getNotEmptyByContextId(), PKPGiftDAO\getNotRedeemedGiftsByRecipient(), PKPGiftDAO\getNotRedeemedGiftsByTypeAndRecipient(), PKPAnnouncementDAO\getNumAnnouncementsByAssocId(), PKPAnnouncementDAO\getNumAnnouncementsNotExpiredByAssocId(), MetadataDescriptionDAO\getObjectsByAssocId(), OJSCompletedPaymentDAO\getPaymentsByJournalId(), IssueDAO\getPublishedIssues(), ReferralDAO\getPublishedReferralsForArticle(), ReviewFormResponseDAO\getReviewReviewFormResponseValues(), RTDAO\getSearches(), 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(), and RTDAO\getVersions().

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.

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(), TimedViewReportDAO\clearLogs(), NotificationMailListDAO\confirmMailListSubscription(), CommentDAO\decrementChildCount(), AccessKeyDAO\deleteAccessKeyById(), ArticleGalleyDAO\deleteAllPubIds(), IssueDAO\deleteAllPubIds(), SessionDAO\deleteAllSessions(), ArticleFileDAO\deleteArticleFileById(), ArticleFileDAO\deleteArticleFiles(), UserGroupAssignmentDAO\deleteAssignment(), UserGroupAssignmentDAO\deleteAssignmentsByUserGroupId(), StageAssignmentDAO\deleteByAll(), EmailLogDAO\deleteByAssoc(), PluginSettingsDAO\deleteByContextId(), GenreDAO\deleteByContextId(), DataObjectTombstoneDAO\deleteById(), SessionDAO\deleteById(), ReviewFormResponseDAO\deleteById(), EventLogDAO\deleteById(), FooterLinkDAO\deleteById(), PKPSocialMediaDAO\deleteById(), ReviewFormElementDAO\deleteById(), ContextDAO\deleteById(), PKPAnnouncementDAO\deleteById(), FooterCategoryDAO\deleteById(), NotificationDAO\deleteById(), LibraryFileDAO\deleteById(), SubmissionCommentDAO\deleteById(), ReviewFormDAO\deleteById(), PKPAnnouncementTypeDAO\deleteById(), SettingsDAO\deleteById(), GenreDAO\deleteById(), SectionDAO\deleteById(), PKPAuthorDAO\deleteById(), IssueGalleyDAO\deleteById(), ReviewRoundDAO\deleteById(), ReviewAssignmentDAO\deleteById(), SessionDAO\deleteByLastUsed(), ReviewFormResponseDAO\deleteByReviewFormElementId(), ReviewFormResponseDAO\deleteByReviewId(), SubmissionCommentDAO\deleteBySubmissionId(), CommentDAO\deleteBySubmissionId(), UserGroupAssignmentDAO\deleteByUserId(), SessionDAO\deleteByUserId(), TemporaryFileDAO\deleteByUserId(), SectionEditorsDAO\deleteByUserId(), RTDAO\deleteContext(), IssueDAO\deleteCustomIssueOrdering(), SectionDAO\deleteCustomSection(), SectionDAO\deleteCustomSectionOrdering(), EditDecisionDAO\deleteDecisionsBySubmissionId(), PKPEmailTemplateDAO\deleteDefaultEmailTemplatesByLocale(), SectionEditorsDAO\deleteEditor(), SectionEditorsDAO\deleteEditorsByJournalId(), SectionEditorsDAO\deleteEditorsBySectionId(), PKPEmailTemplateDAO\deleteEmailTemplateByKey(), PKPEmailTemplateDAO\deleteEmailTemplatesByAssoc(), PKPEmailTemplateDAO\deleteEmailTemplatesByLocale(), AccessKeyDAO\deleteExpiredKeys(), QueuedPaymentDAO\deleteExpiredQueuedPayments(), ExternalFeedDAO\deleteExternalFeed(), ArticleGalleyDAO\deleteGalleyById(), PKPGiftDAO\deleteGiftById(), NotificationSubscriptionSettingsDAO\deleteNotificationSubscriptionSettings(), DataObjectTombstoneDAO\deleteOAISetObjects(), SubmissionArtworkFileDAODelegate\deleteObject(), FilterGroupDAO\deleteObject(), AuthSourceDAO\deleteObject(), EmailLogDAO\deleteObject(), IssueFileDAO\deleteObject(), SubmissionFileDAODelegate\deleteObject(), CommentDAO\deleteObject(), IssueDAO\deleteObject(), MetadataDescriptionDAO\deleteObjectById(), ControlledVocabDAO\deleteObjectById(), ControlledVocabEntryDAO\deleteObjectById(), ProcessDAO\deleteObjectById(), SignoffDAO\deleteObjectById(), QueuedPaymentDAO\deleteQueuedPayment(), ReferralDAO\deleteReferralById(), RTDAO\deleteSearch(), RTDAO\deleteSearchesByContextId(), 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(), RTDAO\deleteVersion(), ViewsDAO\deleteViews(), ProcessDAO\deleteZombies(), VersionDAO\disableVersion(), ReviewFilesDAO\grant(), CommentDAO\incrementChildCount(), CounterReportDAO\incrementCount(), ReferralDAO\incrementReferralCount(), TimedViewReportDAO\incrementViewCount(), IssueGalleyDAO\incrementViews(), ArticleFileDAO\insertArticleFile(), PKPEmailTemplateDAO\insertBaseEmailTemplate(), OJSCompletedPaymentDAO\insertCompletedPayment(), RTDAO\insertContext(), IssueDAO\insertCustomIssueOrder(), SectionDAO\insertCustomSectionOrder(), SectionEditorsDAO\insertEditor(), SubmissionSearchDAO\insertKeyword(), NotificationSubscriptionSettingsDAO\insertNewRSSToken(), DataObjectTombstoneDAO\insertOAISetObjects(), FilterGroupDAO\insertObject(), MetadataDescriptionDAO\insertObject(), SubmissionArtworkFileDAODelegate\insertObject(), SubmissionFileDAODelegate\insertObject(), QueuedPaymentDAO\insertObject(), JournalDAO\insertObject(), SessionDAO\insertObject(), ReviewRoundDAO\insertObject(), ReviewFormResponseDAO\insertObject(), ProcessDAO\insertObject(), TemporaryFileDAO\insertObject(), SubmissionSearchDAO\insertObject(), ControlledVocabDAO\insertObject(), FooterLinkDAO\insertObject(), PKPSocialMediaDAO\insertObject(), ReviewFormElementDAO\insertObject(), PKPGiftDAO\insertObject(), EventLogDAO\insertObject(), PKPAnnouncementDAO\insertObject(), AccessKeyDAO\insertObject(), UserGroupAssignmentDAO\insertObject(), NotificationDAO\insertObject(), ControlledVocabEntryDAO\insertObject(), DataObjectTombstoneDAO\insertObject(), EmailLogDAO\insertObject(), LibraryFileDAO\insertObject(), FooterCategoryDAO\insertObject(), SignoffDAO\insertObject(), StageAssignmentDAO\insertObject(), ReviewFormDAO\insertObject(), CommentDAO\insertObject(), SubmissionCommentDAO\insertObject(), PKPAnnouncementTypeDAO\insertObject(), GenreDAO\insertObject(), SectionDAO\insertObject(), PKPAuthorDAO\insertObject(), ArticleGalleyDAO\insertObject(), IssueGalleyDAO\insertObject(), IssueDAO\insertObject(), ReviewAssignmentDAO\insertObject(), SubmissionSearchDAO\insertObjectKeyword(), MetricsDAO\insertRecord(), PKPMetricsDAO\insertRecord(), RTDAO\insertSearch(), SiteDAO\insertSite(), AuthSourceDAO\insertSource(), InstitutionalSubscriptionDAO\insertSubscription(), SubscriptionTypeDAO\insertSubscriptionType(), PayPalDAO\insertTransaction(), VersionDAO\insertVersion(), RTDAO\insertVersion(), PKPEmailTemplateDAO\installEmailTemplateData(), PKPEmailTemplateDAO\installEmailTemplates(), IssueDAO\moveCustomIssueOrder(), SectionDAO\moveCustomSectionOrder(), ViewsDAO\moveViews(), MetricsDAO\purgeLoadBatch(), PKPMetricsDAO\purgeLoadBatch(), MetricsDAO\purgeRecords(), PKPMetricsDAO\purgeRecords(), UserGroupDAO\removeAllStagesFromGroup(), ContextDAO\resequence(), ControlledVocabEntryDAO\resequence(), IssueGalleyDAO\resequence(), PKPAuthorDAO\resequenceAuthors(), RTDAO\resequenceContexts(), IssueDAO\resequenceCustomIssueOrders(), SectionDAO\resequenceCustomSectionOrders(), ArticleGalleyDAO\resequenceGalleys(), ReviewFormElementDAO\resequenceReviewFormElements(), ReviewFormDAO\resequenceReviewForms(), RTDAO\resequenceSearches(), SectionDAO\resequenceSections(), SubscriptionTypeDAO\resequenceSubscriptionTypes(), PKPAuthorDAO\resetPrimaryContact(), ReviewFilesDAO\revoke(), ReviewFilesDAO\revokeByReviewId(), NotificationDAO\setDateRead(), AuthSourceDAO\setDefault(), InterestDAO\setUserInterests(), NotificationMailListDAO\subscribeGuest(), AccessKeyDAO\transferAccessKeys(), EditDecisionDAO\transferEditorDecisions(), NotificationDAO\transferNotifications(), SignoffDAO\transferSignoffs(), NotificationMailListDAO\unsubscribeGuest(), ArticleFileDAO\updateArticleFile(), PKPEmailTemplateDAO\updateBaseEmailTemplate(), RTDAO\updateContext(), IssueDAO\updateCurrent(), updateDataObjectSettings(), EditDecisionDAO\updateEditorDecision(), ScheduledTaskDAO\updateLastRunTime(), PKPEmailTemplateDAO\updateLocaleEmailTemplateData(), NotificationSettingsDAO\updateNotificationSetting(), NotificationSubscriptionSettingsDAO\updateNotificationSubscriptionSettings(), DataObjectTombstoneDAO\updateOAISetObjects(), SubmissionArtworkFileDAODelegate\updateObject(), JournalDAO\updateObject(), SessionDAO\updateObject(), MetadataDescriptionDAO\updateObject(), ReviewRoundDAO\updateObject(), SiteDAO\updateObject(), ReviewFormResponseDAO\updateObject(), FilterGroupDAO\updateObject(), TemporaryFileDAO\updateObject(), ControlledVocabDAO\updateObject(), FooterLinkDAO\updateObject(), PKPSocialMediaDAO\updateObject(), ReviewFormElementDAO\updateObject(), SubmissionFileDAODelegate\updateObject(), PKPAnnouncementDAO\updateObject(), AuthSourceDAO\updateObject(), AccessKeyDAO\updateObject(), DataObjectTombstoneDAO\updateObject(), FooterCategoryDAO\updateObject(), PKPGiftDAO\updateObject(), LibraryFileDAO\updateObject(), SignoffDAO\updateObject(), ControlledVocabEntryDAO\updateObject(), ReviewFormDAO\updateObject(), PKPAnnouncementTypeDAO\updateObject(), GenreDAO\updateObject(), SectionDAO\updateObject(), PKPAuthorDAO\updateObject(), SubmissionCommentDAO\updateObject(), CommentDAO\updateObject(), ArticleGalleyDAO\updateObject(), IssueGalleyDAO\updateObject(), IssueDAO\updateObject(), ReviewAssignmentDAO\updateObject(), QueuedPaymentDAO\updateQueuedPayment(), ReferralDAO\updateReferral(), RTDAO\updateSearch(), DataObjectTombstoneSettingsDAO\updateSetting(), SiteSettingsDAO\updateSetting(), PKPUserSettingsDAO\updateSetting(), SettingsDAO\updateSetting(), ReviewRoundDAO\updateStatus(), InstitutionalSubscriptionDAO\updateSubscription(), SubscriptionTypeDAO\updateSubscriptionType(), RTDAO\updateVersion(), and UsageStatsTemporaryRecordDAO\UsageStatsTemporaryRecordDAO().

Member Data 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: