Liferay 7.0-ce-b4

com.liferay.portal.service.persistence
Interface ImagePersistence

All Superinterfaces:
BasePersistence<Image>
All Known Implementing Classes:
ImagePersistenceImpl

@ProviderType
public interface ImagePersistence
extends BasePersistence<Image>

The persistence interface for the image service.

Caching information and settings can be found in portal.properties

See Also:
ImagePersistenceImpl, ImageUtil
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

Method Summary
 void cacheResult(Image image)
          Caches the image in the entity cache if it is enabled.
 void cacheResult(List<Image> images)
          Caches the images in the entity cache if it is enabled.
 int countAll()
          Returns the number of images.
 int countByLtSize(int size)
          Returns the number of images where size < ?.
 Image create(long imageId)
          Creates a new image with the primary key.
 Image fetchByLtSize_First(int size, OrderByComparator<Image> orderByComparator)
          Returns the first image in the ordered set where size < ?.
 Image fetchByLtSize_Last(int size, OrderByComparator<Image> orderByComparator)
          Returns the last image in the ordered set where size < ?.
 Image fetchByPrimaryKey(long imageId)
          Returns the image with the primary key or returns null if it could not be found.
 Map<Serializable,Image> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
           
 List<Image> findAll()
          Returns all the images.
 List<Image> findAll(int start, int end)
          Returns a range of all the images.
 List<Image> findAll(int start, int end, OrderByComparator<Image> orderByComparator)
          Returns an ordered range of all the images.
 List<Image> findAll(int start, int end, OrderByComparator<Image> orderByComparator, boolean retrieveFromCache)
          Returns an ordered range of all the images.
 Image findByLtSize_First(int size, OrderByComparator<Image> orderByComparator)
          Returns the first image in the ordered set where size < ?.
 Image 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 < ?.
 List<Image> findByLtSize(int size)
          Returns all the images where size < ?.
 List<Image> findByLtSize(int size, int start, int end)
          Returns a range of all the images where size < ?.
 List<Image> findByLtSize(int size, int start, int end, OrderByComparator<Image> orderByComparator)
          Returns an ordered range of all the images where size < ?.
 List<Image> findByLtSize(int size, int start, int end, OrderByComparator<Image> orderByComparator, boolean retrieveFromCache)
          Returns an ordered range of all the images where size < ?.
 Image findByPrimaryKey(long imageId)
          Returns the image with the primary key or throws a NoSuchImageException if it could not be found.
 Set<String> getBadColumnNames()
           
 Image remove(long imageId)
          Removes the image with the primary key from the database.
 void removeAll()
          Removes all the images from the database.
 void removeByLtSize(int size)
          Removes all the images where size < ? from the database.
 Image updateImpl(Image image)
           
 
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence
clearCache, clearCache, clearCache, closeSession, countWithDynamicQuery, countWithDynamicQuery, fetchByPrimaryKey, findByPrimaryKey, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, flush, getCurrentSession, getDataSource, getListeners, getModelClass, openSession, processException, registerListener, remove, remove, setDataSource, unregisterListener, update, update, update, update
 

Method Detail

findByLtSize

List<Image> findByLtSize(int size)
Returns all the images where size < ?.

Parameters:
size - the size
Returns:
the matching images

findByLtSize

List<Image> findByLtSize(int size,
                         int start,
                         int end)
Returns a range of all the images where size < ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from ImageModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
size - the size
start - the lower bound of the range of images
end - the upper bound of the range of images (not inclusive)
Returns:
the range of matching images

findByLtSize

List<Image> findByLtSize(int size,
                         int start,
                         int end,
                         OrderByComparator<Image> orderByComparator)
Returns an ordered range of all the images where size < ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from ImageModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
size - the size
start - the lower bound of the range of images
end - the upper bound of the range of images (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching images

findByLtSize

List<Image> findByLtSize(int size,
                         int start,
                         int end,
                         OrderByComparator<Image> orderByComparator,
                         boolean retrieveFromCache)
Returns an ordered range of all the images where size < ?.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from ImageModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
size - the size
start - the lower bound of the range of images
end - the upper bound of the range of images (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
retrieveFromCache - whether to retrieve from 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 size
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching image
Throws:
NoSuchImageException - if a matching image could not be found

fetchByLtSize_First

Image fetchByLtSize_First(int size,
                          OrderByComparator<Image> orderByComparator)
Returns the first image in the ordered set where size < ?.

Parameters:
size - the size
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the first matching image, or null if 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 size
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching image
Throws:
NoSuchImageException - if a matching image could not be found

fetchByLtSize_Last

Image fetchByLtSize_Last(int size,
                         OrderByComparator<Image> orderByComparator)
Returns the last image in the ordered set where size < ?.

Parameters:
size - the size
orderByComparator - the comparator to order the set by (optionally null)
Returns:
the last matching image, or null if 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 image
size - the size
orderByComparator - the comparator to order the set by (optionally null)
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

void cacheResult(Image image)
Caches the image in the entity cache if it is enabled.

Parameters:
image - the image

cacheResult

void cacheResult(List<Image> images)
Caches the images in the entity cache if it is enabled.

Parameters:
images - the images

create

Image create(long imageId)
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

Image remove(long imageId)
             throws NoSuchImageException
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

Image updateImpl(Image image)

findByPrimaryKey

Image findByPrimaryKey(long imageId)
                       throws NoSuchImageException
Returns the image with the primary key or throws a NoSuchImageException if 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

Image fetchByPrimaryKey(long imageId)
Returns the image with the primary key or returns null if it could not be found.

Parameters:
imageId - the primary key of the image
Returns:
the image, or null if a image with the primary key could not be found

fetchByPrimaryKeys

Map<Serializable,Image> fetchByPrimaryKeys(Set<Serializable> primaryKeys)
Specified by:
fetchByPrimaryKeys in interface BasePersistence<Image>

findAll

List<Image> findAll()
Returns all the images.

Returns:
the images

findAll

List<Image> findAll(int start,
                    int end)
Returns a range of all the images.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from ImageModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
start - the lower bound of the range of images
end - the upper bound of the range of images (not inclusive)
Returns:
the range of images

findAll

List<Image> findAll(int start,
                    int end,
                    OrderByComparator<Image> orderByComparator)
Returns an ordered range of all the images.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from ImageModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
start - the lower bound of the range of images
end - the upper bound of the range of images (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of images

findAll

List<Image> findAll(int start,
                    int end,
                    OrderByComparator<Image> orderByComparator,
                    boolean retrieveFromCache)
Returns an ordered range of all the images.

Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil#ALL_POS), then the query will include the default ORDER BY logic from ImageModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

Parameters:
start - the lower bound of the range of images
end - the upper bound of the range of images (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
retrieveFromCache - whether to retrieve from 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

getBadColumnNames

Set<String> getBadColumnNames()
Specified by:
getBadColumnNames in interface BasePersistence<Image>

Liferay 7.0-ce-b4