|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.liferay.portal.service.persistence.ImageUtil
@ProviderType public class ImageUtil
The persistence utility for the image service. This utility wraps ImagePersistenceImpl
and provides direct access to the database for CRUD operations. This utility should only be used by the service layer, as it must operate within a transaction. Never access this utility in a JSP, controller, model, or other front-end class.
Caching information and settings can be found in portal.properties
ImagePersistence
,
ImagePersistenceImpl
Constructor Summary | |
---|---|
ImageUtil()
|
Method Summary | |
---|---|
static void |
cacheResult(Image image)
Caches the image in the entity cache if it is enabled. |
static void |
cacheResult(List<Image> images)
Caches the images in the entity cache if it is enabled. |
static void |
clearCache()
|
static void |
clearCache(Image image)
|
static int |
countAll()
Returns the number of images. |
static int |
countByLtSize(int size)
Returns the number of images where size < ?. |
static long |
countWithDynamicQuery(DynamicQuery dynamicQuery)
|
static Image |
create(long imageId)
Creates a new image with the primary key. |
static Image |
fetchByLtSize_First(int size,
OrderByComparator orderByComparator)
Returns the first image in the ordered set where size < ?. |
static Image |
fetchByLtSize_Last(int size,
OrderByComparator orderByComparator)
Returns the last image in the ordered set where size < ?. |
static Image |
fetchByPrimaryKey(long imageId)
Returns the image with the primary key or returns null if it could not be found. |
static List<Image> |
findAll()
Returns all the images. |
static List<Image> |
findAll(int start,
int end)
Returns a range of all the images. |
static List<Image> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the images. |
static Image |
findByLtSize_First(int size,
OrderByComparator orderByComparator)
Returns the first image in the ordered set where size < ?. |
static Image |
findByLtSize_Last(int size,
OrderByComparator orderByComparator)
Returns the last image in the ordered set where size < ?. |
static Image[] |
findByLtSize_PrevAndNext(long imageId,
int size,
OrderByComparator orderByComparator)
Returns the images before and after the current image in the ordered set where size < ?. |
static List<Image> |
findByLtSize(int size)
Returns all the images where size < ?. |
static List<Image> |
findByLtSize(int size,
int start,
int end)
Returns a range of all the images where size < ?. |
static List<Image> |
findByLtSize(int size,
int start,
int end,
OrderByComparator orderByComparator)
Returns an ordered range of all the images where size < ?. |
static Image |
findByPrimaryKey(long imageId)
Returns the image with the primary key or throws a NoSuchImageException if it could not be found. |
static List<Image> |
findWithDynamicQuery(DynamicQuery dynamicQuery)
|
static List<Image> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
|
static List<Image> |
findWithDynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
|
static ImagePersistence |
getPersistence()
|
static Image |
remove(long imageId)
Removes the image with the primary key from the database. |
static void |
removeAll()
Removes all the images from the database. |
static void |
removeByLtSize(int size)
Removes all the images where size < ? from the database. |
void |
setPersistence(ImagePersistence persistence)
Deprecated. As of 6.2.0 |
static Image |
update(Image image)
|
static Image |
update(Image image,
ServiceContext serviceContext)
|
static Image |
updateImpl(Image image)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageUtil()
Method Detail |
---|
public static void clearCache()
BasePersistence.clearCache()
public static void clearCache(Image image)
BasePersistence.clearCache(com.liferay.portal.model.BaseModel)
public static long countWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemException
BasePersistence.countWithDynamicQuery(DynamicQuery)
public static List<Image> findWithDynamicQuery(DynamicQuery dynamicQuery) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery)
public static List<Image> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int)
public static List<Image> findWithDynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException
BasePersistence.findWithDynamicQuery(DynamicQuery, int, int, OrderByComparator)
public static Image update(Image image) throws SystemException
SystemException
BasePersistence.update(com.liferay.portal.model.BaseModel)
public static Image update(Image image, ServiceContext serviceContext) throws SystemException
SystemException
BasePersistence.update(com.liferay.portal.model.BaseModel, ServiceContext)
public static List<Image> findByLtSize(int size) throws SystemException
size
- the size
SystemException
- if a system exception occurredpublic static List<Image> findByLtSize(int size, int start, int end) throws SystemException
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.
size
- the sizestart
- the lower bound of the range of imagesend
- the upper bound of the range of images (not inclusive)
SystemException
- if a system exception occurredpublic static List<Image> findByLtSize(int size, int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
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 (optionally null
)
SystemException
- if a system exception occurredpublic static Image findByLtSize_First(int size, OrderByComparator orderByComparator) throws NoSuchImageException, SystemException
size
- the sizeorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchImageException
- if a matching image could not be found
SystemException
- if a system exception occurredpublic static Image fetchByLtSize_First(int size, OrderByComparator orderByComparator) throws SystemException
size
- the sizeorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching image could not be found
SystemException
- if a system exception occurredpublic static Image findByLtSize_Last(int size, OrderByComparator orderByComparator) throws NoSuchImageException, SystemException
size
- the sizeorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchImageException
- if a matching image could not be found
SystemException
- if a system exception occurredpublic static Image fetchByLtSize_Last(int size, OrderByComparator orderByComparator) throws SystemException
size
- the sizeorderByComparator
- the comparator to order the set by (optionally null
)
null
if a matching image could not be found
SystemException
- if a system exception occurredpublic static Image[] findByLtSize_PrevAndNext(long imageId, int size, OrderByComparator orderByComparator) throws NoSuchImageException, SystemException
imageId
- the primary key of the current imagesize
- the sizeorderByComparator
- the comparator to order the set by (optionally null
)
NoSuchImageException
- if a image with the primary key could not be found
SystemException
- if a system exception occurredpublic static void removeByLtSize(int size) throws SystemException
size
- the size
SystemException
- if a system exception occurredpublic static int countByLtSize(int size) throws SystemException
size
- the size
SystemException
- if a system exception occurredpublic static void cacheResult(Image image)
image
- the imagepublic static void cacheResult(List<Image> images)
images
- the imagespublic static Image create(long imageId)
imageId
- the primary key for the new image
public static Image remove(long imageId) throws NoSuchImageException, SystemException
imageId
- the primary key of the image
NoSuchImageException
- if a image with the primary key could not be found
SystemException
- if a system exception occurredpublic static Image updateImpl(Image image) throws SystemException
SystemException
public static Image findByPrimaryKey(long imageId) throws NoSuchImageException, SystemException
NoSuchImageException
if it could not be found.
imageId
- the primary key of the image
NoSuchImageException
- if a image with the primary key could not be found
SystemException
- if a system exception occurredpublic static Image fetchByPrimaryKey(long imageId) throws SystemException
null
if it could not be found.
imageId
- the primary key of the image
null
if a image with the primary key could not be found
SystemException
- if a system exception occurredpublic static List<Image> findAll() throws SystemException
SystemException
- if a system exception occurredpublic static List<Image> findAll(int start, int end) throws SystemException
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.
start
- the lower bound of the range of imagesend
- the upper bound of the range of images (not inclusive)
SystemException
- if a system exception occurredpublic static List<Image> findAll(int start, int end, OrderByComparator orderByComparator) throws SystemException
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.
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 (optionally null
)
SystemException
- if a system exception occurredpublic static void removeAll() throws SystemException
SystemException
- if a system exception occurredpublic static int countAll() throws SystemException
SystemException
- if a system exception occurredpublic static ImagePersistence getPersistence()
public void setPersistence(ImagePersistence persistence)
|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |