|
Liferay 6.0-ee | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.liferay.portal.service.persistence.impl.BasePersistenceImpl<PollsChoice>
com.liferay.portlet.polls.service.persistence.PollsChoicePersistenceImpl
public class PollsChoicePersistenceImpl
The persistence implementation for the polls choice service.
Never modify or reference this class directly. Always use PollsChoiceUtil
to access the polls choice persistence. Modify service.xml
and rerun ServiceBuilder to regenerate this class.
Caching information and settings can be found in portal.properties
PollsChoicePersistence
,
PollsChoiceUtil
Field Summary | |
---|---|
static String |
FINDER_CLASS_NAME_ENTITY
|
static String |
FINDER_CLASS_NAME_LIST
|
static FinderPath |
FINDER_PATH_COUNT_ALL
|
static FinderPath |
FINDER_PATH_COUNT_BY_Q_N
|
static FinderPath |
FINDER_PATH_COUNT_BY_QUESTIONID
|
static FinderPath |
FINDER_PATH_COUNT_BY_UUID
|
static FinderPath |
FINDER_PATH_FETCH_BY_Q_N
|
static FinderPath |
FINDER_PATH_FIND_ALL
|
static FinderPath |
FINDER_PATH_FIND_BY_QUESTIONID
|
static FinderPath |
FINDER_PATH_FIND_BY_UUID
|
protected PollsChoicePersistence |
pollsChoicePersistence
|
protected PollsQuestionPersistence |
pollsQuestionPersistence
|
protected PollsVotePersistence |
pollsVotePersistence
|
protected ResourcePersistence |
resourcePersistence
|
protected UserPersistence |
userPersistence
|
Fields inherited from class com.liferay.portal.service.persistence.impl.BasePersistenceImpl |
---|
COUNT_COLUMN_NAME, listeners, ORDER_BY_ASC, ORDER_BY_ASC_HAS_NEXT, ORDER_BY_CLAUSE, ORDER_BY_DESC, ORDER_BY_DESC_HAS_NEXT, WHERE_AND, WHERE_GREATER_THAN, WHERE_GREATER_THAN_HAS_NEXT, WHERE_LESSER_THAN, WHERE_LESSER_THAN_HAS_NEXT, WHERE_OR |
Constructor Summary | |
---|---|
PollsChoicePersistenceImpl()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
Initializes the polls choice persistence. |
void |
cacheResult(List<PollsChoice> pollsChoices)
Caches the polls choices in the entity cache if it is enabled. |
void |
cacheResult(PollsChoice pollsChoice)
Caches the polls choice in the entity cache if it is enabled. |
void |
clearCache()
Clears the cache for all polls choices. |
void |
clearCache(PollsChoice pollsChoice)
Clears the cache for the polls choice. |
int |
countAll()
Counts all the polls choices. |
int |
countByQ_N(long questionId,
String name)
Counts all the polls choices where questionId = ? and name = ?. |
int |
countByQuestionId(long questionId)
Counts all the polls choices where questionId = ?. |
int |
countByUuid(String uuid)
Counts all the polls choices where uuid = ?. |
PollsChoice |
create(long choiceId)
Creates a new polls choice with the primary key. |
void |
destroy()
|
PollsChoice |
fetchByPrimaryKey(long choiceId)
Finds the polls choice with the primary key or returns null if it could not be found. |
PollsChoice |
fetchByPrimaryKey(Serializable primaryKey)
Finds the polls choice with the primary key or returns null if it could not be found. |
PollsChoice |
fetchByQ_N(long questionId,
String name)
Finds the polls choice where questionId = ? and name = ? or returns null if it could not be found. |
PollsChoice |
fetchByQ_N(long questionId,
String name,
boolean retrieveFromCache)
Finds the polls choice where questionId = ? and name = ? or returns null if it could not be found, optionally using the finder cache. |
List<PollsChoice> |
findAll()
Finds all the polls choices. |
List<PollsChoice> |
findAll(int start,
int end)
Finds a range of all the polls choices. |
List<PollsChoice> |
findAll(int start,
int end,
OrderByComparator orderByComparator)
Finds an ordered range of all the polls choices. |
PollsChoice |
findByPrimaryKey(long choiceId)
Finds the polls choice with the primary key or throws a NoSuchChoiceException if it could not be found. |
PollsChoice |
findByPrimaryKey(Serializable primaryKey)
Finds the polls choice with the primary key or throws a NoSuchModelException if it could not be found. |
PollsChoice |
findByQ_N(long questionId,
String name)
Finds the polls choice where questionId = ? and name = ? or throws a NoSuchChoiceException if it could not be found. |
PollsChoice |
findByQuestionId_First(long questionId,
OrderByComparator orderByComparator)
Finds the first polls choice in the ordered set where questionId = ?. |
PollsChoice |
findByQuestionId_Last(long questionId,
OrderByComparator orderByComparator)
Finds the last polls choice in the ordered set where questionId = ?. |
PollsChoice[] |
findByQuestionId_PrevAndNext(long choiceId,
long questionId,
OrderByComparator orderByComparator)
Finds the polls choices before and after the current polls choice in the ordered set where questionId = ?. |
List<PollsChoice> |
findByQuestionId(long questionId)
Finds all the polls choices where questionId = ?. |
List<PollsChoice> |
findByQuestionId(long questionId,
int start,
int end)
Finds a range of all the polls choices where questionId = ?. |
List<PollsChoice> |
findByQuestionId(long questionId,
int start,
int end,
OrderByComparator orderByComparator)
Finds an ordered range of all the polls choices where questionId = ?. |
PollsChoice |
findByUuid_First(String uuid,
OrderByComparator orderByComparator)
Finds the first polls choice in the ordered set where uuid = ?. |
PollsChoice |
findByUuid_Last(String uuid,
OrderByComparator orderByComparator)
Finds the last polls choice in the ordered set where uuid = ?. |
PollsChoice[] |
findByUuid_PrevAndNext(long choiceId,
String uuid,
OrderByComparator orderByComparator)
Finds the polls choices before and after the current polls choice in the ordered set where uuid = ?. |
List<PollsChoice> |
findByUuid(String uuid)
Finds all the polls choices where uuid = ?. |
List<PollsChoice> |
findByUuid(String uuid,
int start,
int end)
Finds a range of all the polls choices where uuid = ?. |
List<PollsChoice> |
findByUuid(String uuid,
int start,
int end,
OrderByComparator orderByComparator)
Finds an ordered range of all the polls choices where uuid = ?. |
protected PollsChoice |
getByQuestionId_PrevAndNext(Session session,
PollsChoice pollsChoice,
long questionId,
OrderByComparator orderByComparator,
boolean previous)
|
protected PollsChoice |
getByUuid_PrevAndNext(Session session,
PollsChoice pollsChoice,
String uuid,
OrderByComparator orderByComparator,
boolean previous)
|
PollsChoice |
remove(long choiceId)
Removes the polls choice with the primary key from the database. |
PollsChoice |
remove(Serializable primaryKey)
Removes the polls choice with the primary key from the database. |
void |
removeAll()
Removes all the polls choices from the database. |
void |
removeByQ_N(long questionId,
String name)
Removes the polls choice where questionId = ? and name = ? from the database. |
void |
removeByQuestionId(long questionId)
Removes all the polls choices where questionId = ? from the database. |
void |
removeByUuid(String uuid)
Removes all the polls choices where uuid = ? from the database. |
protected PollsChoice |
removeImpl(PollsChoice pollsChoice)
Removes the model instance from the database. |
protected PollsChoice |
toUnwrappedModel(PollsChoice pollsChoice)
|
PollsChoice |
updateImpl(PollsChoice pollsChoice,
boolean merge)
Updates the model instance in the database or adds it if it does not yet exist. |
Methods inherited from class com.liferay.portal.service.persistence.impl.BasePersistenceImpl |
---|
appendOrderByComparator, closeSession, countWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getDB, getDialect, getListeners, openNewSession, openSession, processException, registerListener, remove, setDataSource, setSessionFactory, unregisterListener, update, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.liferay.portal.service.persistence.BasePersistence |
---|
countWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, findWithDynamicQuery, getDataSource, getListeners, registerListener, remove, setDataSource, unregisterListener, update, update |
Field Detail |
---|
public static final String FINDER_CLASS_NAME_ENTITY
public static final String FINDER_CLASS_NAME_LIST
public static final FinderPath FINDER_PATH_FIND_BY_UUID
public static final FinderPath FINDER_PATH_COUNT_BY_UUID
public static final FinderPath FINDER_PATH_FIND_BY_QUESTIONID
public static final FinderPath FINDER_PATH_COUNT_BY_QUESTIONID
public static final FinderPath FINDER_PATH_FETCH_BY_Q_N
public static final FinderPath FINDER_PATH_COUNT_BY_Q_N
public static final FinderPath FINDER_PATH_FIND_ALL
public static final FinderPath FINDER_PATH_COUNT_ALL
@BeanReference(type=PollsChoicePersistence.class) protected PollsChoicePersistence pollsChoicePersistence
@BeanReference(type=PollsQuestionPersistence.class) protected PollsQuestionPersistence pollsQuestionPersistence
@BeanReference(type=PollsVotePersistence.class) protected PollsVotePersistence pollsVotePersistence
@BeanReference(type=ResourcePersistence.class) protected ResourcePersistence resourcePersistence
@BeanReference(type=UserPersistence.class) protected UserPersistence userPersistence
Constructor Detail |
---|
public PollsChoicePersistenceImpl()
Method Detail |
---|
public void cacheResult(PollsChoice pollsChoice)
cacheResult
in interface PollsChoicePersistence
pollsChoice
- the polls choice to cachepublic void cacheResult(List<PollsChoice> pollsChoices)
cacheResult
in interface PollsChoicePersistence
pollsChoices
- the polls choices to cachepublic void clearCache()
The EntityCache
and FinderCache
are both cleared by this method.
clearCache
in interface BasePersistence<PollsChoice>
clearCache
in class BasePersistenceImpl<PollsChoice>
public void clearCache(PollsChoice pollsChoice)
The EntityCache
and FinderCache
are both cleared by this method.
clearCache
in interface BasePersistence<PollsChoice>
clearCache
in class BasePersistenceImpl<PollsChoice>
pollsChoice
- the instance of this model to clear the cache forpublic PollsChoice create(long choiceId)
create
in interface PollsChoicePersistence
choiceId
- the primary key for the new polls choice
public PollsChoice remove(Serializable primaryKey) throws NoSuchModelException, SystemException
remove
in interface BasePersistence<PollsChoice>
remove
in class BasePersistenceImpl<PollsChoice>
primaryKey
- the primary key of the polls choice to remove
NoSuchModelException
- if a polls choice with the primary key could not be found
SystemException
- if a system exception occurredpublic PollsChoice remove(long choiceId) throws NoSuchChoiceException, SystemException
remove
in interface PollsChoicePersistence
choiceId
- the primary key of the polls choice to remove
NoSuchChoiceException
- if a polls choice with the primary key could not be found
SystemException
- if a system exception occurredprotected PollsChoice removeImpl(PollsChoice pollsChoice) throws SystemException
BasePersistenceImpl
BasePersistenceImpl.update(BaseModel,
boolean)
depends on this method to implement the remove operation; it
only notifies the model listeners.
removeImpl
in class BasePersistenceImpl<PollsChoice>
pollsChoice
- the model instance to remove
SystemException
- if a system exception occurredpublic PollsChoice updateImpl(PollsChoice pollsChoice, boolean merge) throws SystemException
BasePersistenceImpl
BasePersistenceImpl.remove(BaseModel)
depends on this method to implement the
update operation; it only notifies the model listeners.
updateImpl
in interface PollsChoicePersistence
updateImpl
in class BasePersistenceImpl<PollsChoice>
pollsChoice
- the model instance to updatemerge
- whether to merge the model instance with the current
session. See BatchSession.update(
com.liferay.portal.kernel.dao.orm.Session, BaseModel, boolean)
for an explanation.
SystemException
- if a system exception occurredprotected PollsChoice toUnwrappedModel(PollsChoice pollsChoice)
public PollsChoice findByPrimaryKey(Serializable primaryKey) throws NoSuchModelException, SystemException
NoSuchModelException
if it could not be found.
findByPrimaryKey
in interface BasePersistence<PollsChoice>
findByPrimaryKey
in class BasePersistenceImpl<PollsChoice>
primaryKey
- the primary key of the polls choice to find
NoSuchModelException
- if a polls choice with the primary key could not be found
SystemException
- if a system exception occurredpublic PollsChoice findByPrimaryKey(long choiceId) throws NoSuchChoiceException, SystemException
NoSuchChoiceException
if it could not be found.
findByPrimaryKey
in interface PollsChoicePersistence
choiceId
- the primary key of the polls choice to find
NoSuchChoiceException
- if a polls choice with the primary key could not be found
SystemException
- if a system exception occurredpublic PollsChoice fetchByPrimaryKey(Serializable primaryKey) throws SystemException
null
if it could not be found.
fetchByPrimaryKey
in interface BasePersistence<PollsChoice>
fetchByPrimaryKey
in class BasePersistenceImpl<PollsChoice>
primaryKey
- the primary key of the polls choice to find
null
if a polls choice with the primary key could not be found
SystemException
- if a system exception occurredpublic PollsChoice fetchByPrimaryKey(long choiceId) throws SystemException
null
if it could not be found.
fetchByPrimaryKey
in interface PollsChoicePersistence
choiceId
- the primary key of the polls choice to find
null
if a polls choice with the primary key could not be found
SystemException
- if a system exception occurredpublic List<PollsChoice> findByUuid(String uuid) throws SystemException
findByUuid
in interface PollsChoicePersistence
uuid
- the uuid to search with
SystemException
- if a system exception occurredpublic List<PollsChoice> findByUuid(String uuid, 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.
findByUuid
in interface PollsChoicePersistence
uuid
- the uuid to search withstart
- the lower bound of the range of polls choices to returnend
- the upper bound of the range of polls choices to return (not inclusive)
SystemException
- if a system exception occurredpublic List<PollsChoice> findByUuid(String uuid, 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.
findByUuid
in interface PollsChoicePersistence
uuid
- the uuid to search withstart
- the lower bound of the range of polls choices to returnend
- the upper bound of the range of polls choices to return (not inclusive)orderByComparator
- the comparator to order the results by
SystemException
- if a system exception occurredpublic PollsChoice findByUuid_First(String uuid, OrderByComparator orderByComparator) throws NoSuchChoiceException, 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.
findByUuid_First
in interface PollsChoicePersistence
uuid
- the uuid to search withorderByComparator
- the comparator to order the set by
NoSuchChoiceException
- if a matching polls choice could not be found
SystemException
- if a system exception occurredpublic PollsChoice findByUuid_Last(String uuid, OrderByComparator orderByComparator) throws NoSuchChoiceException, 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.
findByUuid_Last
in interface PollsChoicePersistence
uuid
- the uuid to search withorderByComparator
- the comparator to order the set by
NoSuchChoiceException
- if a matching polls choice could not be found
SystemException
- if a system exception occurredpublic PollsChoice[] findByUuid_PrevAndNext(long choiceId, String uuid, OrderByComparator orderByComparator) throws NoSuchChoiceException, 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.
findByUuid_PrevAndNext
in interface PollsChoicePersistence
choiceId
- the primary key of the current polls choiceuuid
- the uuid to search withorderByComparator
- the comparator to order the set by
NoSuchChoiceException
- if a polls choice with the primary key could not be found
SystemException
- if a system exception occurredprotected PollsChoice getByUuid_PrevAndNext(Session session, PollsChoice pollsChoice, String uuid, OrderByComparator orderByComparator, boolean previous)
public List<PollsChoice> findByQuestionId(long questionId) throws SystemException
findByQuestionId
in interface PollsChoicePersistence
questionId
- the question id to search with
SystemException
- if a system exception occurredpublic List<PollsChoice> findByQuestionId(long questionId, 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.
findByQuestionId
in interface PollsChoicePersistence
questionId
- the question id to search withstart
- the lower bound of the range of polls choices to returnend
- the upper bound of the range of polls choices to return (not inclusive)
SystemException
- if a system exception occurredpublic List<PollsChoice> findByQuestionId(long questionId, 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.
findByQuestionId
in interface PollsChoicePersistence
questionId
- the question id to search withstart
- the lower bound of the range of polls choices to returnend
- the upper bound of the range of polls choices to return (not inclusive)orderByComparator
- the comparator to order the results by
SystemException
- if a system exception occurredpublic PollsChoice findByQuestionId_First(long questionId, OrderByComparator orderByComparator) throws NoSuchChoiceException, 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.
findByQuestionId_First
in interface PollsChoicePersistence
questionId
- the question id to search withorderByComparator
- the comparator to order the set by
NoSuchChoiceException
- if a matching polls choice could not be found
SystemException
- if a system exception occurredpublic PollsChoice findByQuestionId_Last(long questionId, OrderByComparator orderByComparator) throws NoSuchChoiceException, 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.
findByQuestionId_Last
in interface PollsChoicePersistence
questionId
- the question id to search withorderByComparator
- the comparator to order the set by
NoSuchChoiceException
- if a matching polls choice could not be found
SystemException
- if a system exception occurredpublic PollsChoice[] findByQuestionId_PrevAndNext(long choiceId, long questionId, OrderByComparator orderByComparator) throws NoSuchChoiceException, 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.
findByQuestionId_PrevAndNext
in interface PollsChoicePersistence
choiceId
- the primary key of the current polls choicequestionId
- the question id to search withorderByComparator
- the comparator to order the set by
NoSuchChoiceException
- if a polls choice with the primary key could not be found
SystemException
- if a system exception occurredprotected PollsChoice getByQuestionId_PrevAndNext(Session session, PollsChoice pollsChoice, long questionId, OrderByComparator orderByComparator, boolean previous)
public PollsChoice findByQ_N(long questionId, String name) throws NoSuchChoiceException, SystemException
NoSuchChoiceException
if it could not be found.
findByQ_N
in interface PollsChoicePersistence
questionId
- the question id to search withname
- the name to search with
NoSuchChoiceException
- if a matching polls choice could not be found
SystemException
- if a system exception occurredpublic PollsChoice fetchByQ_N(long questionId, String name) throws SystemException
null
if it could not be found. Uses the finder cache.
fetchByQ_N
in interface PollsChoicePersistence
questionId
- the question id to search withname
- the name to search with
null
if a matching polls choice could not be found
SystemException
- if a system exception occurredpublic PollsChoice fetchByQ_N(long questionId, String name, boolean retrieveFromCache) throws SystemException
null
if it could not be found, optionally using the finder cache.
fetchByQ_N
in interface PollsChoicePersistence
questionId
- the question id to search withname
- the name to search with
null
if a matching polls choice could not be found
SystemException
- if a system exception occurredpublic List<PollsChoice> findAll() throws SystemException
findAll
in interface PollsChoicePersistence
SystemException
- if a system exception occurredpublic List<PollsChoice> 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.
findAll
in interface PollsChoicePersistence
start
- the lower bound of the range of polls choices to returnend
- the upper bound of the range of polls choices to return (not inclusive)
SystemException
- if a system exception occurredpublic List<PollsChoice> 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.
findAll
in interface PollsChoicePersistence
start
- the lower bound of the range of polls choices to returnend
- the upper bound of the range of polls choices to return (not inclusive)orderByComparator
- the comparator to order the results by
SystemException
- if a system exception occurredpublic void removeByUuid(String uuid) throws SystemException
removeByUuid
in interface PollsChoicePersistence
uuid
- the uuid to search with
SystemException
- if a system exception occurredpublic void removeByQuestionId(long questionId) throws SystemException
removeByQuestionId
in interface PollsChoicePersistence
questionId
- the question id to search with
SystemException
- if a system exception occurredpublic void removeByQ_N(long questionId, String name) throws NoSuchChoiceException, SystemException
removeByQ_N
in interface PollsChoicePersistence
questionId
- the question id to search withname
- the name to search with
SystemException
- if a system exception occurred
NoSuchChoiceException
public void removeAll() throws SystemException
removeAll
in interface PollsChoicePersistence
SystemException
- if a system exception occurredpublic int countByUuid(String uuid) throws SystemException
countByUuid
in interface PollsChoicePersistence
uuid
- the uuid to search with
SystemException
- if a system exception occurredpublic int countByQuestionId(long questionId) throws SystemException
countByQuestionId
in interface PollsChoicePersistence
questionId
- the question id to search with
SystemException
- if a system exception occurredpublic int countByQ_N(long questionId, String name) throws SystemException
countByQ_N
in interface PollsChoicePersistence
questionId
- the question id to search withname
- the name to search with
SystemException
- if a system exception occurredpublic int countAll() throws SystemException
countAll
in interface PollsChoicePersistence
SystemException
- if a system exception occurredpublic void afterPropertiesSet()
public void destroy()
|
Liferay 6.0-ee | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |