Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
LibraryFileDAO Class Reference
Inheritance diagram for LibraryFileDAO:
DAO

Public Member Functions

 _fromRow ($row)
 
 deleteById ($fileId, $revision=null)
 
 filenameExists ($contextId, $fileName)
 
 getByContextId ($contextId, $type=null)
 
 getById ($fileId)
 
 getBySubmissionId ($submissionId, $type=null, $contextId=null)
 
 getInsertId ()
 
 getLocaleFieldNames ()
 
 insertObject ($libraryFile)
 
 LibraryFileDAO ()
 
 newDataObject ()
 
 updateLocaleFields (&$libraryFile)
 
 updateObject ($libraryFile)
 
- 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 ()
 
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)
 

Additional Inherited Members

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null)
 
- Public Attributes inherited from DAO
 $_dataSource
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table= '', $id= '')
 

Detailed Description

Operations for retrieving and modifying LibraryFile objects.

See Also
LibraryFile

Definition at line 19 of file LibraryFileDAO.inc.php.

Member Function Documentation

LibraryFileDAO::_fromRow (   $row)

Internal function to return a LibraryFile object from a row.

Parameters
$rowarray
Returns
LibraryFile

Definition at line 123 of file LibraryFileDAO.inc.php.

References HookRegistry\call(), DAO\datetimeFromDB(), and newDataObject().

Referenced by getById().

LibraryFileDAO::deleteById (   $fileId,
  $revision = null 
)

Delete a library file by ID.

Parameters
$libraryIdint
$revisionint

Definition at line 217 of file LibraryFileDAO.inc.php.

References DAO\update().

LibraryFileDAO::filenameExists (   $contextId,
  $fileName 
)

Check if a file with this filename already exists

Parameters
$contextIdint the context to check in.
$filenameString the filename to be checked
Returns
bool

Definition at line 234 of file LibraryFileDAO.inc.php.

References DAO\retrieve().

LibraryFileDAO::getByContextId (   $contextId,
  $type = null 
)

Retrieve all library files for a context.

Parameters
$contextIdint
$type(optional)
Returns
array LibraryFiles

Definition at line 55 of file LibraryFileDAO.inc.php.

References DAO\retrieve().

LibraryFileDAO::getById (   $fileId)

Retrieve a library file by ID.

Parameters
$fileIdint
$revisionint optional, if omitted latest revision is used
$libraryIdint optional
Returns
LibraryFile

Definition at line 34 of file LibraryFileDAO.inc.php.

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

LibraryFileDAO::getBySubmissionId (   $submissionId,
  $type = null,
  $contextId = null 
)

Retrieve all library files for a submission.

Parameters
$submissionIdint
$type(optional)
$contextId(optional) int
Returns
array LibraryFiles

Definition at line 75 of file LibraryFileDAO.inc.php.

References DAO\retrieve().

LibraryFileDAO::getInsertId ( )

Get the ID of the last inserted library file.

Returns
int

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

References DAO\_getInsertId().

LibraryFileDAO::getLocaleFieldNames ( )

Get the list of fields for which data is localized.

Returns
array

Definition at line 102 of file LibraryFileDAO.inc.php.

LibraryFileDAO::insertObject (   $libraryFile)

Insert a new LibraryFile.

Parameters
$libraryFileLibraryFile
Returns
int

Definition at line 148 of file LibraryFileDAO.inc.php.

References DAO\datetimeToDB(), DAO\update(), and updateLocaleFields().

LibraryFileDAO::LibraryFileDAO ( )

Constructor

Definition at line 23 of file LibraryFileDAO.inc.php.

LibraryFileDAO::newDataObject ( )

Construct a new data object corresponding to this DAO.

Returns
SignoffEntry

Definition at line 93 of file LibraryFileDAO.inc.php.

Referenced by _fromRow().

LibraryFileDAO::updateLocaleFields ( $libraryFile)

Update the localized fields for this file.

Parameters
$libraryFile

Definition at line 110 of file LibraryFileDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertObject(), and updateObject().

LibraryFileDAO::updateObject (   $libraryFile)

Update a LibraryFile

Parameters
$libraryFileLibraryFile
Returns
int

Definition at line 183 of file LibraryFileDAO.inc.php.

References DAO\datetimeToDB(), DAO\update(), and updateLocaleFields().


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