Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
InstitutionalSubscriptionDAO Class Reference
Inheritance diagram for InstitutionalSubscriptionDAO:
SubscriptionDAO DAO

Public Member Functions

 _deleteSubscriptionIPRanges ($subscriptionId)
 
 _insertSubscriptionIPRanges ($subscriptionId, $ipRanges)
 
_returnSubscriptionFromRow (&$row)
 
 createObject ()
 
 deleteSubscriptionById ($subscriptionId)
 
 deleteSubscriptionsByJournal ($journalId)
 
 deleteSubscriptionsByTypeId ($subscriptionTypeId)
 
 deleteSubscriptionsByUserId ($userId)
 
 deleteSubscriptionsByUserIdForJournal ($userId, $journalId)
 
 getStatusCount ($journalId, $status=null)
 
 getSubscribedUserCount ($journalId)
 
getSubscribedUsers ($journalId, $rangeInfo=null)
 
getSubscription ($subscriptionId)
 
getSubscriptions ($rangeInfo=null)
 
getSubscriptionsByInstitutionName ($institutionName, $journalId, $exactMatch=true, $rangeInfo=null)
 
getSubscriptionsByJournalId ($journalId, $status=null, $searchField=null, $searchMatch=null, $search=null, $dateField=null, $dateFrom=null, $dateTo=null, $rangeInfo=null)
 
getSubscriptionsByUser ($userId, $rangeInfo=null)
 
getSubscriptionsByUserForJournal ($userId, $journalId, $rangeInfo=null)
 
getSubscriptionsToRemind ($dateEnd, $journalId, $reminderType, $rangeInfo=null)
 
 insertSubscription (&$institutionalSubscription)
 
 isValidInstitutionalSubscription ($domain, $IP, $journalId, $check=SUBSCRIPTION_DATE_BOTH, $checkDate=null)
 
 renewSubscription (&$institutionalSubscription)
 
 subscriptionExists ($subscriptionId)
 
 subscriptionExistsByInstitutionName ($institutionName, $journalId, $exactMatch=true)
 
 subscriptionExistsByUser ($subscriptionId, $userId)
 
 subscriptionExistsByUserForJournal ($userId, $journalId)
 
 updateSubscription (&$institutionalSubscription)
 
- Public Member Functions inherited from SubscriptionDAO
 _generateSearchSQL ($status=null, $searchField=null, $searchMatch=null, $search=null, $dateField=null, $dateFrom=null, $dateTo=null, &$params)
 
 _generateUserNameSearchSQL ($search, $searchMatch, $prefix, &$params)
 
 _insertSubscription (&$subscription)
 
 _renewSubscription (&$subscription)
 
_returnSubscriptionFromRow (&$row)
 
 _updateSubscription (&$subscription)
 
 createObject ()
 
 deleteSubscriptionById ($subscriptionId)
 
 deleteSubscriptionsByJournal ($journalId)
 
 deleteSubscriptionsByTypeId ($subscriptionTypeId)
 
 deleteSubscriptionsByUserId ($userId)
 
 flagReminded ($subscriptionId, $reminderType)
 
 getInsertSubscriptionId ()
 
 getStatusCount ($status)
 
getStatusOptions ()
 
getSubscription ($subscriptionId)
 
 getSubscriptionJournalId ($subscriptionId)
 
getSubscriptions ($rangeInfo=null)
 
getSubscriptionsByJournalId ($journalId, $status=null, $searchField=null, $searchMatch=null, $search=null, $dateField=null, $dateFrom=null, $dateTo=null, $rangeInfo=null)
 
getSubscriptionsToRemind ($dateEnd, $journalId, $reminderType, $rangeInfo=null)
 
 insertSubscription (&$subscription)
 
 renewSubscription (&$subscription)
 
 subscriptionExists ($subscriptionId)
 
 subscriptionExistsByUser ($subscriptionId, $userId)
 
 subscriptionExistsByUserForJournal ($userId, $journalId)
 
 updateSubscription (&$subscription)
 
- Public Member Functions inherited from DAO
 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 ()
 
 getDataChangedEvent ($elementId=null, $parentElementId=null)
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getInsertId ($table= '', $id= '', $callHooks=true)
 
 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)
 

Additional Inherited Members

- Public Attributes inherited from DAO
 $_dataSource
 

Detailed Description

Operations for retrieving and modifying InstitutionalSubscription objects.

See Also
InstitutionalSubscription

Definition at line 24 of file InstitutionalSubscriptionDAO.inc.php.

Member Function Documentation

InstitutionalSubscriptionDAO::_deleteSubscriptionIPRanges (   $subscriptionId)

Internal function to delete subscription ip ranges by subscription ID.

Parameters
$subscriptionIdint
Returns
boolean

Definition at line 964 of file InstitutionalSubscriptionDAO.inc.php.

References DAO\update().

Referenced by deleteSubscriptionById(), and updateSubscription().

InstitutionalSubscriptionDAO::_insertSubscriptionIPRanges (   $subscriptionId,
  $ipRanges 
)

Internal function to insert institutional subscription IP ranges.

Parameters
$subscriptionIdint
$ipRangesarray
Returns
boolean

Definition at line 878 of file InstitutionalSubscriptionDAO.inc.php.

References DAO\update().

Referenced by insertSubscription(), and updateSubscription().

& InstitutionalSubscriptionDAO::_returnSubscriptionFromRow ( $row)

Internal function to return an InstitutionalSubscription object from a row.

Parameters
$rowarray
Returns
InstitutionalSubscription

Definition at line 840 of file InstitutionalSubscriptionDAO.inc.php.

References HookRegistry\call(), and DAO\retrieve().

Referenced by getSubscription().

InstitutionalSubscriptionDAO::createObject ( )

Generator function to create object.

Returns
InstitutionalSubscription

Definition at line 831 of file InstitutionalSubscriptionDAO.inc.php.

InstitutionalSubscriptionDAO::deleteSubscriptionById (   $subscriptionId)

Delete an institutional subscription by subscription ID.

Parameters
$subscriptionIdint
Returns
boolean

Definition at line 366 of file InstitutionalSubscriptionDAO.inc.php.

References _deleteSubscriptionIPRanges(), subscriptionExists(), and DAO\update().

Referenced by deleteSubscriptionsByJournal(), deleteSubscriptionsByTypeId(), deleteSubscriptionsByUserId(), and deleteSubscriptionsByUserIdForJournal().

InstitutionalSubscriptionDAO::deleteSubscriptionsByJournal (   $journalId)

Delete institutional subscriptions by journal ID.

Parameters
$journalIdint
Returns
boolean

Definition at line 395 of file InstitutionalSubscriptionDAO.inc.php.

References deleteSubscriptionById(), and DAO\retrieve().

InstitutionalSubscriptionDAO::deleteSubscriptionsByTypeId (   $subscriptionTypeId)

Delete all institutional subscriptions by subscription type ID.

Parameters
$subscriptionTypeIdint
Returns
boolean

Definition at line 496 of file InstitutionalSubscriptionDAO.inc.php.

References deleteSubscriptionById(), and DAO\retrieve().

InstitutionalSubscriptionDAO::deleteSubscriptionsByUserId (   $userId)

Delete institutional subscriptions by user ID.

Parameters
$userIdint
Returns
boolean

Definition at line 427 of file InstitutionalSubscriptionDAO.inc.php.

References deleteSubscriptionById(), and DAO\retrieve().

InstitutionalSubscriptionDAO::deleteSubscriptionsByUserIdForJournal (   $userId,
  $journalId 
)

Delete institutional subscriptions by user ID and journal ID.

Parameters
$userIdint
$journalIdint
Returns
boolean

Definition at line 460 of file InstitutionalSubscriptionDAO.inc.php.

References deleteSubscriptionById(), and DAO\retrieve().

InstitutionalSubscriptionDAO::getStatusCount (   $journalId,
  $status = null 
)

Return number of institutional subscriptions with given status for journal.

Parameters
statusint
Returns
int

Definition at line 149 of file InstitutionalSubscriptionDAO.inc.php.

References DAO\retrieve().

Referenced by getSubscribedUserCount().

InstitutionalSubscriptionDAO::getSubscribedUserCount (   $journalId)

Get the number of institutional subscriptions for a particular journal.

Parameters
$journalIdint
Returns
int

Definition at line 177 of file InstitutionalSubscriptionDAO.inc.php.

References getStatusCount().

& InstitutionalSubscriptionDAO::getSubscribedUsers (   $journalId,
  $rangeInfo = null 
)

Retrieve all institutional subscription contacts.

Returns
object DAOResultFactory containing Users

Definition at line 553 of file InstitutionalSubscriptionDAO.inc.php.

References DAORegistry\getDAO(), and DAO\retrieveRange().

& InstitutionalSubscriptionDAO::getSubscription (   $subscriptionId)

Retrieve an institutional subscription by subscription ID.

Parameters
$subscriptionIdint
Returns
InstitutionalSubscription

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

References _returnSubscriptionFromRow(), and DAO\retrieve().

& InstitutionalSubscriptionDAO::getSubscriptions (   $rangeInfo = null)

Retrieve all institutional subscriptions.

Returns
object DAOResultFactory containing InstitutionalSubscriptions

Definition at line 527 of file InstitutionalSubscriptionDAO.inc.php.

References DAO\retrieveRange().

& InstitutionalSubscriptionDAO::getSubscriptionsByInstitutionName (   $institutionName,
  $journalId,
  $exactMatch = true,
  $rangeInfo = null 
)

Retrieve institutional subscriptions by institution name.

Parameters
$institutionNamestring
$journalIdint
$exactMatchboolean
Returns
object DAOResultFactory containing matching InstitutionalSubscriptions

Definition at line 117 of file InstitutionalSubscriptionDAO.inc.php.

References DAO\retrieveRange().

& InstitutionalSubscriptionDAO::getSubscriptionsByJournalId (   $journalId,
  $status = null,
  $searchField = null,
  $searchMatch = null,
  $search = null,
  $dateField = null,
  $dateFrom = null,
  $dateTo = null,
  $rangeInfo = null 
)

Retrieve institutional subscriptions matching a particular journal ID.

Parameters
$journalIdint
$statusint
$searchFieldint
$searchMatchstring "is" or "contains" or "startsWith"
$searchString to look in $searchField for
$dateFieldint
$dateFromString date to search from
$dateToString date to search to
Returns
object DAOResultFactory containing matching Subscriptions

Definition at line 586 of file InstitutionalSubscriptionDAO.inc.php.

References SubscriptionDAO\_generateSearchSQL(), and DAO\retrieveRange().

& InstitutionalSubscriptionDAO::getSubscriptionsByUser (   $userId,
  $rangeInfo = null 
)

Retrieve institutional subscriptions by user ID.

Parameters
$userIdint
Returns
object DAOResultFactory containing matching InstitutionalSubscriptions

Definition at line 60 of file InstitutionalSubscriptionDAO.inc.php.

References DAO\retrieveRange().

& InstitutionalSubscriptionDAO::getSubscriptionsByUserForJournal (   $userId,
  $journalId,
  $rangeInfo = null 
)

Retrieve institutional subscriptions by user ID and journal ID.

Parameters
$userIdint
$journalIdint
Returns
object DAOResultFactory containing matching InstitutionalSubscriptions

Definition at line 86 of file InstitutionalSubscriptionDAO.inc.php.

References DAO\retrieveRange().

& InstitutionalSubscriptionDAO::getSubscriptionsToRemind (   $dateEnd,
  $journalId,
  $reminderType,
  $rangeInfo = null 
)

Retrieve active institutional subscriptions matching a particular end date and journal ID.

Parameters
$dateEnddate
$journalIdint
$reminderTypeint SUBSCRIPTION_REMINDER_FIELD_..._EXPIRY
Returns
object DAOResultFactory containing matching InstitutionalSubscriptions

Definition at line 789 of file InstitutionalSubscriptionDAO.inc.php.

References DAO\datetimeToDB(), and DAO\retrieveRange().

InstitutionalSubscriptionDAO::insertSubscription ( $institutionalSubscription)

Insert a new institutional subscription.

Parameters
$institutionalSubscriptionInstitutionalSubscription
Returns
int

Definition at line 306 of file InstitutionalSubscriptionDAO.inc.php.

References SubscriptionDAO\_insertSubscription(), _insertSubscriptionIPRanges(), and DAO\update().

InstitutionalSubscriptionDAO::isValidInstitutionalSubscription (   $domain,
  $IP,
  $journalId,
  $check = SUBSCRIPTION_DATE_BOTH,
  $checkDate = null 
)

Check whether there is a valid institutional subscription for a given journal.

Parameters
$domainstring
$IPstring
$journalIdint
$checkint Test using either start date, end date, or both (default)
$checkDatedate (YYYY-MM-DD) Use this date instead of current date
Returns
int

Definition at line 668 of file InstitutionalSubscriptionDAO.inc.php.

References DAO\dateToDB(), Core\getCurrentDate(), and DAO\retrieve().

InstitutionalSubscriptionDAO::renewSubscription ( $institutionalSubscription)

Renew an institutional subscription by dateEnd + duration of subscription type if the institutional subscription is expired, renew to current date + duration

Parameters
$institutionalSubscriptionInstitutionalSubscription
Returns
boolean

Definition at line 823 of file InstitutionalSubscriptionDAO.inc.php.

References SubscriptionDAO\_renewSubscription().

InstitutionalSubscriptionDAO::subscriptionExists (   $subscriptionId)

Check if an institutional subscription exists for a given subscriptionId.

Parameters
$subscriptionIdint
Returns
boolean

Definition at line 186 of file InstitutionalSubscriptionDAO.inc.php.

References DAO\retrieve().

Referenced by deleteSubscriptionById().

InstitutionalSubscriptionDAO::subscriptionExistsByInstitutionName (   $institutionName,
  $journalId,
  $exactMatch = true 
)

Check if an institutional subscription exists for a given institution name and journal.

Parameters
$institutionNamestring
$journalIdint
$exactMatchboolean
Returns
boolean

Definition at line 273 of file InstitutionalSubscriptionDAO.inc.php.

References DAO\retrieve().

InstitutionalSubscriptionDAO::subscriptionExistsByUser (   $subscriptionId,
  $userId 
)

Check if an institutional subscription exists for a given user.

Parameters
$subscriptionIdint
$userIdint
Returns
boolean

Definition at line 212 of file InstitutionalSubscriptionDAO.inc.php.

References DAO\retrieve().

InstitutionalSubscriptionDAO::subscriptionExistsByUserForJournal (   $userId,
  $journalId 
)

Check if an institutional subscription exists for a given user and journal.

Parameters
$userIdint
$journalIdint
Returns
boolean

Definition at line 242 of file InstitutionalSubscriptionDAO.inc.php.

References DAO\retrieve().

InstitutionalSubscriptionDAO::updateSubscription ( $institutionalSubscription)

Update an existing institutional subscription.

Parameters
$institutionalSubscriptionInstitutionalSubscription
Returns
boolean

Definition at line 335 of file InstitutionalSubscriptionDAO.inc.php.

References _deleteSubscriptionIPRanges(), _insertSubscriptionIPRanges(), SubscriptionDAO\_updateSubscription(), and DAO\update().


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