VuFind API Documentation

RecordServiceInterface extends DbServiceInterface

Database service interface for Records.

Tags
category

VuFind

author

Sudharma Kellampalli skellamp@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Table of Contents

cleanup()  : int
Clean up orphaned entries (i.e. entries that are not in favorites anymore)
createEntity()  : RecordEntityInterface
Create a record entity object.
deleteRecord()  : bool
Delete a record by source and id. Return true if found and deleted, false if not found.
getRecord()  : RecordEntityInterface|null
Retrieve a record by id.
getRecords()  : array<string|int, RecordEntityInterface>
Retrieve records by ids.
persistEntity()  : void
Persist an entity.
updateRecord()  : RecordEntityInterface
Update an existing entry in the record table or create a new one.

Methods

cleanup()

Clean up orphaned entries (i.e. entries that are not in favorites anymore)

public cleanup() : int
Return values
int

Number of records deleted

deleteRecord()

Delete a record by source and id. Return true if found and deleted, false if not found.

public deleteRecord(string $id, string $source) : bool

Throws exception if something goes wrong.

Parameters
$id : string

Record ID

$source : string

Record source

Tags
throws
Exception
Return values
bool

getRecords()

Retrieve records by ids.

public getRecords(array<string|int, string> $ids, string $source) : array<string|int, RecordEntityInterface>
Parameters
$ids : array<string|int, string>

Record IDs

$source : string

Record source

Return values
array<string|int, RecordEntityInterface>

Array of record objects found

updateRecord()

Update an existing entry in the record table or create a new one.

public updateRecord(string $id, string $source, mixed $rawData) : RecordEntityInterface
Parameters
$id : string

Record ID

$source : string

Data source

$rawData : mixed

Raw data from source (must be serializable)

Return values
RecordEntityInterface

Search results