public interface PicsDao
Pic
s.Modifier and Type | Method and Description |
---|---|
void |
addPic(Pic pic)
Add this
Pic to the database. |
int |
getMaxThumbCacheDirUsed()
Determine the highest numbered thumb cache subdirectory used.
|
Pic |
getNewestPic()
Get the newest pic in the database.
|
Pic |
getPic(int pid)
Get a Pic
|
Pic |
getPic(java.lang.String picName)
Get a Pic who's name matches this picName.
|
int |
getPicCount(int rid)
Return how many pics live in this root.
|
java.util.List<java.lang.String> |
getPicNames()
Get a List of names all of the pics in the database.
|
java.util.List<java.lang.String> |
getPicNamesByDateFunc(java.lang.String operator,
java.lang.String operand)
Get a list of pic names that pass this date function.
|
java.util.List<java.lang.String> |
getPicNamesByRootFunc(java.lang.String operator,
int rid) |
java.util.List<Pic> |
getPics()
Get a List of all of the
Pic s in the database. |
java.util.List<Pic> |
getPics(java.util.List<java.lang.String> list)
Get a List of Pics from this List of picNames.
|
java.util.List<Pic> |
getPics(java.lang.String name)
Get a List of all of the
Pic s in the database that match this name. |
java.util.List<Pic> |
getPicsByMD5Sum(long md5sum)
Return a list of Pics that have this md5Sum
|
java.util.List<Pic> |
getPicsInDir(int rid,
java.lang.String dirName)
Get a list of Pics that are in this subdirectory
|
java.util.HashMap<java.lang.String,java.util.Date> |
getPicsMap()
Get a HashMap of all of the Pic names in the database.
|
java.util.List<Pic> |
getPicsNewerThan(java.util.Calendar calendar)
Get a list of Pics that are newer than this date
|
Pic |
getRandomPic()
Return a random pic from the database
|
Pic |
getRandomPic(int rid)
Return a random pic from the database that lives in this root
|
int |
getThumbCacheFillCount(int cacheDir)
Determine how many thumb cache entries are in this thumb dir
|
void |
updatePic(Pic pic)
Update this
Pic in the database. |
java.util.List<Pic> getPics()
Pic
s in the database.java.util.List<java.lang.String> getPicNames()
java.util.List<Pic> getPics(java.lang.String name)
Pic
s in the database that match this name. Wildcards are supported.name
- The name (or partial name) of the pics to fetch.Pic
s.java.util.List<Pic> getPics(java.util.List<java.lang.String> list)
list
- A List of picNames to fetchjava.util.List<Pic> getPicsInDir(int rid, java.lang.String dirName)
rid
- Root id to search underdirName
- The directory, i.e. "2002/20021225"Root
sjava.util.List<Pic> getPicsNewerThan(java.util.Calendar calendar)
calendar
- The date to compare toPic
s.java.util.List<Pic> getPicsByMD5Sum(long md5sum)
md5sum
- java.util.List<java.lang.String> getPicNamesByDateFunc(java.lang.String operator, java.lang.String operand)
operator
- An index into the MetaSet rateOps table. i.e. = != < >operand
- the date to check. i.e. "2009-07-26"java.util.List<java.lang.String> getPicNamesByRootFunc(java.lang.String operator, int rid)
java.util.HashMap<java.lang.String,java.util.Date> getPicsMap()
void addPic(Pic pic)
Pic
to the database.pic
- The Pic to add. pid is assumed to be 0.void updatePic(Pic pic)
Pic
in the database.
Pic is assumed to exist and pid must not be 0.pic
- The Pic to update.Pic getPic(int pid)
pid
- The pid to queryPic getPic(java.lang.String picName)
picName
- The name of the Pic
to query.null
.Pic getNewestPic()
Pic getRandomPic()
Pic getRandomPic(int rid)
int getMaxThumbCacheDirUsed()
int getThumbCacheFillCount(int cacheDir)
cacheDir
- Which thumb cache directory to checkint getPicCount(int rid)
rid
- The root id to query.