Interface ImagePersistence
- All Superinterfaces:
BasePersistence<Image>,CTPersistence<Image>
Caching information and settings can be found in portal.properties
- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Method Summary
Modifier and TypeMethodDescriptionvoidcacheResult(Image image) Caches the image in the entity cache if it is enabled.voidcacheResult(List<Image> images) Caches the images in the entity cache if it is enabled.intcountAll()Returns the number of images.intcountByLtSize(int size) Returns the number of images where size < ?.create(long imageId) Creates a new image with the primary key.fetchByLtSize_First(int size, OrderByComparator<Image> orderByComparator) Returns the first image in the ordered set where size < ?.fetchByLtSize_Last(int size, OrderByComparator<Image> orderByComparator) Returns the last image in the ordered set where size < ?.fetchByPrimaryKey(long imageId) Returns the image with the primary key or returnsnullif it could not be found.findAll()Returns all the images.findAll(int start, int end) Returns a range of all the images.findAll(int start, int end, OrderByComparator<Image> orderByComparator) Returns an ordered range of all the images.findAll(int start, int end, OrderByComparator<Image> orderByComparator, boolean useFinderCache) Returns an ordered range of all the images.findByLtSize(int size) Returns all the images where size < ?.findByLtSize(int size, int start, int end) Returns a range of all the images where size < ?.findByLtSize(int size, int start, int end, OrderByComparator<Image> orderByComparator) Returns an ordered range of all the images where size < ?.findByLtSize(int size, int start, int end, OrderByComparator<Image> orderByComparator, boolean useFinderCache) Returns an ordered range of all the images where size < ?.findByLtSize_First(int size, OrderByComparator<Image> orderByComparator) Returns the first image in the ordered set where size < ?.findByLtSize_Last(int size, OrderByComparator<Image> orderByComparator) Returns the last image in the ordered set where size < ?.Image[]findByLtSize_PrevAndNext(long imageId, int size, OrderByComparator<Image> orderByComparator) Returns the images before and after the current image in the ordered set where size < ?.findByPrimaryKey(long imageId) Returns the image with the primary key or throws aNoSuchImageExceptionif it could not be found.remove(long imageId) Removes the image with the primary key from the database.voidRemoves all the images from the database.voidremoveByLtSize(int size) Removes all the images where size < ? from the database.updateImpl(Image image) Methods inherited from interface com.liferay.portal.kernel.service.persistence.BasePersistence
clearCache, clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, countWithDynamicQuery, dslQuery, dslQueryCount, fetchByPrimaryKey, fetchByPrimaryKeys, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getBadColumnNames, getCurrentSession, getDataSource, getDB, getDialect, getListeners, getModelClass, openSession, processException, registerListener, remove, remove, removeByFunction, setDataSource, unregisterListener, update, updateMethods inherited from interface com.liferay.portal.kernel.service.persistence.change.tracking.CTPersistence
getCTColumnNames, getMappingTableNames, getTableColumnsMap, getTableName, getUniqueIndexColumnNames
-
Method Details
-
findByLtSize
Returns all the images where size < ?.- Parameters:
size- the size- Returns:
- the matching images
-
findByLtSize
Returns a range of all the images where size < ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromImageModelImpl.- Parameters:
size- the sizestart- the lower bound of the range of imagesend- the upper bound of the range of images (not inclusive)- Returns:
- the range of matching images
-
findByLtSize
Returns an ordered range of all the images where size < ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromImageModelImpl.- Parameters:
size- the sizestart- the lower bound of the range of imagesend- the upper bound of the range of images (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of matching images
-
findByLtSize
List<Image> findByLtSize(int size, int start, int end, OrderByComparator<Image> orderByComparator, boolean useFinderCache) Returns an ordered range of all the images where size < ?.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromImageModelImpl.- Parameters:
size- the sizestart- the lower bound of the range of imagesend- the upper bound of the range of images (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of matching images
-
findByLtSize_First
Image findByLtSize_First(int size, OrderByComparator<Image> orderByComparator) throws NoSuchImageException Returns the first image in the ordered set where size < ?.- Parameters:
size- the sizeorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching image
- Throws:
NoSuchImageException- if a matching image could not be found
-
fetchByLtSize_First
Returns the first image in the ordered set where size < ?.- Parameters:
size- the sizeorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the first matching image, or
nullif a matching image could not be found
-
findByLtSize_Last
Image findByLtSize_Last(int size, OrderByComparator<Image> orderByComparator) throws NoSuchImageException Returns the last image in the ordered set where size < ?.- Parameters:
size- the sizeorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the last matching image
- Throws:
NoSuchImageException- if a matching image could not be found
-
fetchByLtSize_Last
Returns the last image in the ordered set where size < ?.- Parameters:
size- the sizeorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the last matching image, or
nullif a matching image could not be found
-
findByLtSize_PrevAndNext
Image[] findByLtSize_PrevAndNext(long imageId, int size, OrderByComparator<Image> orderByComparator) throws NoSuchImageException Returns the images before and after the current image in the ordered set where size < ?.- Parameters:
imageId- the primary key of the current imagesize- the sizeorderByComparator- the comparator to order the set by (optionallynull)- Returns:
- the previous, current, and next image
- Throws:
NoSuchImageException- if a image with the primary key could not be found
-
removeByLtSize
void removeByLtSize(int size) Removes all the images where size < ? from the database.- Parameters:
size- the size
-
countByLtSize
int countByLtSize(int size) Returns the number of images where size < ?.- Parameters:
size- the size- Returns:
- the number of matching images
-
cacheResult
Caches the image in the entity cache if it is enabled.- Parameters:
image- the image
-
cacheResult
Caches the images in the entity cache if it is enabled.- Parameters:
images- the images
-
create
Creates a new image with the primary key. Does not add the image to the database.- Parameters:
imageId- the primary key for the new image- Returns:
- the new image
-
remove
Removes the image with the primary key from the database. Also notifies the appropriate model listeners.- Parameters:
imageId- the primary key of the image- Returns:
- the image that was removed
- Throws:
NoSuchImageException- if a image with the primary key could not be found
-
updateImpl
-
findByPrimaryKey
Returns the image with the primary key or throws aNoSuchImageExceptionif it could not be found.- Parameters:
imageId- the primary key of the image- Returns:
- the image
- Throws:
NoSuchImageException- if a image with the primary key could not be found
-
fetchByPrimaryKey
Returns the image with the primary key or returnsnullif it could not be found.- Parameters:
imageId- the primary key of the image- Returns:
- the image, or
nullif a image with the primary key could not be found
-
findAll
Returns all the images.- Returns:
- the images
-
findAll
Returns a range of all the images.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromImageModelImpl.- Parameters:
start- the lower bound of the range of imagesend- the upper bound of the range of images (not inclusive)- Returns:
- the range of images
-
findAll
Returns an ordered range of all the images.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromImageModelImpl.- Parameters:
start- the lower bound of the range of imagesend- the upper bound of the range of images (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)- Returns:
- the ordered range of images
-
findAll
List<Image> findAll(int start, int end, OrderByComparator<Image> orderByComparator, boolean useFinderCache) Returns an ordered range of all the images.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil#ALL_POSwill return the full result set. IforderByComparatoris specified, then the query will include the given ORDER BY logic. IforderByComparatoris absent, then the query will include the default ORDER BY logic fromImageModelImpl.- Parameters:
start- the lower bound of the range of imagesend- the upper bound of the range of images (not inclusive)orderByComparator- the comparator to order the results by (optionallynull)useFinderCache- whether to use the finder cache- Returns:
- the ordered range of images
-
removeAll
void removeAll()Removes all the images from the database. -
countAll
int countAll()Returns the number of images.- Returns:
- the number of images
-