CC-1986: Configurable columns for media search

- added column 'utime' (upload time) and 'lptime' (last played time) in the tables cc_files and cc_playlist
This commit is contained in:
Yuchen Wang 2012-01-10 14:45:43 -05:00
parent 7d9aa3ca5d
commit d1d01e55ce
14 changed files with 879 additions and 281 deletions

View file

@ -17,6 +17,8 @@
* @method CcFilesQuery orderByDbCurrentlyaccessing($order = Criteria::ASC) Order by the currentlyaccessing column
* @method CcFilesQuery orderByDbEditedby($order = Criteria::ASC) Order by the editedby column
* @method CcFilesQuery orderByDbMtime($order = Criteria::ASC) Order by the mtime column
* @method CcFilesQuery orderByDbUtime($order = Criteria::ASC) Order by the utime column
* @method CcFilesQuery orderByDbLPtime($order = Criteria::ASC) Order by the lptime column
* @method CcFilesQuery orderByDbMd5($order = Criteria::ASC) Order by the md5 column
* @method CcFilesQuery orderByDbTrackTitle($order = Criteria::ASC) Order by the track_title column
* @method CcFilesQuery orderByDbArtistName($order = Criteria::ASC) Order by the artist_name column
@ -77,6 +79,8 @@
* @method CcFilesQuery groupByDbCurrentlyaccessing() Group by the currentlyaccessing column
* @method CcFilesQuery groupByDbEditedby() Group by the editedby column
* @method CcFilesQuery groupByDbMtime() Group by the mtime column
* @method CcFilesQuery groupByDbUtime() Group by the utime column
* @method CcFilesQuery groupByDbLPtime() Group by the lptime column
* @method CcFilesQuery groupByDbMd5() Group by the md5 column
* @method CcFilesQuery groupByDbTrackTitle() Group by the track_title column
* @method CcFilesQuery groupByDbArtistName() Group by the artist_name column
@ -164,6 +168,8 @@
* @method CcFiles findOneByDbCurrentlyaccessing(int $currentlyaccessing) Return the first CcFiles filtered by the currentlyaccessing column
* @method CcFiles findOneByDbEditedby(int $editedby) Return the first CcFiles filtered by the editedby column
* @method CcFiles findOneByDbMtime(string $mtime) Return the first CcFiles filtered by the mtime column
* @method CcFiles findOneByDbUtime(string $utime) Return the first CcFiles filtered by the utime column
* @method CcFiles findOneByDbLPtime(string $lptime) Return the first CcFiles filtered by the lptime column
* @method CcFiles findOneByDbMd5(string $md5) Return the first CcFiles filtered by the md5 column
* @method CcFiles findOneByDbTrackTitle(string $track_title) Return the first CcFiles filtered by the track_title column
* @method CcFiles findOneByDbArtistName(string $artist_name) Return the first CcFiles filtered by the artist_name column
@ -224,6 +230,8 @@
* @method array findByDbCurrentlyaccessing(int $currentlyaccessing) Return CcFiles objects filtered by the currentlyaccessing column
* @method array findByDbEditedby(int $editedby) Return CcFiles objects filtered by the editedby column
* @method array findByDbMtime(string $mtime) Return CcFiles objects filtered by the mtime column
* @method array findByDbUtime(string $utime) Return CcFiles objects filtered by the utime column
* @method array findByDbLPtime(string $lptime) Return CcFiles objects filtered by the lptime column
* @method array findByDbMd5(string $md5) Return CcFiles objects filtered by the md5 column
* @method array findByDbTrackTitle(string $track_title) Return CcFiles objects filtered by the track_title column
* @method array findByDbArtistName(string $artist_name) Return CcFiles objects filtered by the artist_name column
@ -654,6 +662,68 @@ abstract class BaseCcFilesQuery extends ModelCriteria
return $this->addUsingAlias(CcFilesPeer::MTIME, $dbMtime, $comparison);
}
/**
* Filter the query on the utime column
*
* @param string|array $dbUtime The value to use as filter.
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcFilesQuery The current query, for fluid interface
*/
public function filterByDbUtime($dbUtime = null, $comparison = null)
{
if (is_array($dbUtime)) {
$useMinMax = false;
if (isset($dbUtime['min'])) {
$this->addUsingAlias(CcFilesPeer::UTIME, $dbUtime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbUtime['max'])) {
$this->addUsingAlias(CcFilesPeer::UTIME, $dbUtime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcFilesPeer::UTIME, $dbUtime, $comparison);
}
/**
* Filter the query on the lptime column
*
* @param string|array $dbLPtime The value to use as filter.
* Accepts an associative array('min' => $minValue, 'max' => $maxValue)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcFilesQuery The current query, for fluid interface
*/
public function filterByDbLPtime($dbLPtime = null, $comparison = null)
{
if (is_array($dbLPtime)) {
$useMinMax = false;
if (isset($dbLPtime['min'])) {
$this->addUsingAlias(CcFilesPeer::LPTIME, $dbLPtime['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($dbLPtime['max'])) {
$this->addUsingAlias(CcFilesPeer::LPTIME, $dbLPtime['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(CcFilesPeer::LPTIME, $dbLPtime, $comparison);
}
/**
* Filter the query on the md5 column
*