Projects >> XCoLab >>bc6007dd9be7d6e624266a447a6fefb6dc4c42ee

Chunk
Conflicting content
    private String[] _methodParameterTypes55;
    private String _methodName56;
    private String[] _methodParameterTypes56;
<<<<<<< HEAD
    private String _methodName57;
    private String[] _methodParameterTypes57;
=======
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b

    public ContestLocalServiceClp(InvokableLocalService invokableLocalService) {
        _invokableLocalService = invokableLocalService;
Solution content
    private String[] _methodParameterTypes55;
    private String _methodName56;
    private String[] _methodParameterTypes56;
<<<<<<< HEAD
    private String _methodName57;
    private String[] _methodParameterTypes57;
=======
>>>>>>> copyProposal

    public ContestLocalServiceClp(InvokableLocalService invokableLocalService) {
        _invokableLocalService = invokableLocalService;
File
ContestLocalServiceClp.java
Developer's decision
Manual
Kind of conflict
Attribute
Chunk
Conflicting content
        _methodParameterTypes53 = new String[] { "long", "long" };

<<<<<<< HEAD
        _methodName54 = "getModelIdsAndNames";
=======
        _methodName54 = "getModelIds";
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b

        _methodParameterTypes54 = new String[] { "long" };
Solution content
        _methodParameterTypes53 = new String[] { "long", "long" };

<<<<<<< HEAD
        _methodName54 = "getModelIdsAndNames";
=======
        _methodName54 = "getModelIds";
>>>>>>> copyProposal

        _methodParameterTypes54 = new String[] { "long" };
File
ContestLocalServiceClp.java
Developer's decision
Manual
Kind of conflict
Attribute
Chunk
Conflicting content
        _methodName55 = "getDefaultModelId";
<<<<<<< HEAD


=======
        _methodName56 = "getNumberOfProposalsForJudge";
        _methodParameterTypes54 = new String[] { "long" };
        _methodParameterTypes55 = new String[] { "long" };


        _methodParameterTypes55 = new String[] { "long" };

        _methodName56 = "getNumberOfProposalsForJudge";

>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
        _methodParameterTypes56 = new String[] {
                "com.liferay.portal.model.User", "com.ext.portlet.model.Contest"
            };
Solution content
        _methodParameterTypes54 = new String[] { "long" };

        _methodName55 = "getDefaultModelId";
<<<<<<< HEAD

        _methodParameterTypes55 = new String[] { "long" };

        _methodName56 = "getNumberOfProposalsForJudge";

=======

        _methodParameterTypes55 = new String[] { "long" };

        _methodName56 = "getNumberOfProposalsForJudge";

>>>>>>> copyProposal
        _methodParameterTypes56 = new String[] {
                "com.liferay.portal.model.User", "com.ext.portlet.model.Contest"
            };
File
ContestLocalServiceClp.java
Developer's decision
Manual
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
    * @param contestActive the contest active
    * @param contestPrivate the contest private
        boolean contestPrivate)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
<<<<<<< HEAD
    * Returns all the contests where contestActive = ? and contestPrivate = ?.
    *
    * @param contestActive the contest active
    * @param contestPrivate the contest private
    * @return the matching contests
    * @throws SystemException if a system exception occurred
    */
    public java.util.List findByContestActivecontestPrivate(
        boolean contestActive, boolean contestPrivate)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns a range of all the contests where contestActive = ? and contestPrivate = ?.
    *
    * 

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ public java.util.List findByContestActivecontestPrivate( boolean contestActive, boolean contestPrivate, int start, int end) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns an ordered range of all the contests where contestActive = ? and contestPrivate = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ public java.util.List findByContestActivecontestPrivate( boolean contestActive, boolean contestPrivate, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the first contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest findByContestActivecontestPrivate_First( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException; /** * Returns the first contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest fetchByContestActivecontestPrivate_First( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the last contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest findByContestActivecontestPrivate_Last( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException; /** * Returns the last contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest fetchByContestActivecontestPrivate_Last( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest[] findByContestActivecontestPrivate_PrevAndNext( long ContestPK, boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException; /** * Removes all the contests where contestActive = ? and contestPrivate = ? from the database. * * @param contestActive the contest active * @param contestPrivate the contest private * @throws SystemException if a system exception occurred */ public void removeByContestActivecontestPrivate(boolean contestActive, throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the number of contests where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @return the number of matching contests * @throws SystemException if a system exception occurred */ public int countByContestActivecontestPrivate(boolean contestActive, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns all the contests where contestActive = ?. * * @param contestActive the contest active * @return the matching contests * @throws SystemException if a system exception occurred */ ======= * Returns all the contests where contestActive = ?. * * @param contestActive the contest active * @return the matching contests * @throws SystemException if a system exception occurred */ >>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b public java.util.List findByContestActive( boolean contestActive) throws com.liferay.portal.kernel.exception.SystemException;
Solution content
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
<<<<<<< HEAD
    * Returns all the contests where contestActive = ? and contestPrivate = ?.
    *
    * @param contestActive the contest active
    * @param contestPrivate the contest private
    * @return the matching contests
    * @throws SystemException if a system exception occurred
    */
    public java.util.List findByContestActivecontestPrivate(
        boolean contestActive, boolean contestPrivate)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns a range of all the contests where contestActive = ? and contestPrivate = ?.
    *
    * 

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ * @param contestPrivate the contest private boolean contestActive, boolean contestPrivate, * * @param contestActive the contest active public java.util.List findByContestActivecontestPrivate( boolean contestActive, boolean contestPrivate, int start, int end) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns an ordered range of all the contests where contestActive = ? and contestPrivate = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ public java.util.List findByContestActivecontestPrivate( boolean contestActive, boolean contestPrivate, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the first contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest findByContestActivecontestPrivate_First( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException; /** * Returns the first contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest fetchByContestActivecontestPrivate_First( com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the last contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest findByContestActivecontestPrivate_Last( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException; /** * Returns the last contest in the ordered set where contestActive = ? and contestPrivate = ?. * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest fetchByContestActivecontestPrivate_Last( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest[] findByContestActivecontestPrivate_PrevAndNext( long ContestPK, boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException; /** * Removes all the contests where contestActive = ? and contestPrivate = ? from the database. * * @param contestActive the contest active * @param contestPrivate the contest private * @throws SystemException if a system exception occurred */ public void removeByContestActivecontestPrivate(boolean contestActive, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the number of contests where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @return the number of matching contests * @throws SystemException if a system exception occurred */ public int countByContestActivecontestPrivate(boolean contestActive, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns all the contests where contestActive = ?. * * @param contestActive the contest active * @return the matching contests * @throws SystemException if a system exception occurred */ ======= * Returns all the contests where contestActive = ?. * * @param contestActive the contest active * @return the matching contests * @throws SystemException if a system exception occurred */ >>>>>>> copyProposal public java.util.List findByContestActive( boolean contestActive) throws com.liferay.portal.kernel.exception.SystemException;
File
ContestPersistence.java
Developer's decision
Manual
Kind of conflict
Comment
Method interface
Chunk
Conflicting content
    */
    * @return the ordered range of matching contests
    * @return the ordered range of matching contests
    public com.ext.portlet.model.Contest findByContestActive_First(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
<<<<<<< HEAD
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the first contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the first matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest fetchByContestActive_First(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the last contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest
    * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest findByContestActive_Last(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the last contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest fetchByContestActive_Last(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the contests before and after the current contest in the ordered set where contestActive = ?.
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the previous, current, and next contest
    * @throws SystemException if a system exception occurred
    * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest[] findByContestActive_PrevAndNext(
        long ContestPK, boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Removes all the contests where contestActive = ? from the database.
    *
    * @param contestActive the contest active
    * @throws SystemException if a system exception occurred
    */
    public void removeByContestActive(boolean contestActive)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the number of contests where contestActive = ?.
    *
    * @param contestActive the contest active
    * @return the number of matching contests
    * @throws SystemException if a system exception occurred
    */
    public int countByContestActive(boolean contestActive)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns all the contests where contestActive = ? and featured = ?.
    *
    * @param contestActive the contest active
    * @param featured the featured
    * @return the matching contests
    * @throws SystemException if a system exception occurred
    */
    public java.util.List findByActiveFeatured(
        boolean contestActive, boolean featured)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns a range of all the contests where contestActive = ? and featured = ?.
    *
    * 

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ public java.util.List findByActiveFeatured( boolean contestActive, boolean featured, int start, int end) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns an ordered range of all the contests where contestActive = ? and featured = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) public java.util.List findByActiveFeatured( boolean contestActive, boolean featured, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the first contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest findByActiveFeatured_First( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException; /** * Returns the first contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest fetchByActiveFeatured_First( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the last contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest findByActiveFeatured_Last( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException; /** * Returns the last contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest fetchByActiveFeatured_Last( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and featured = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest[] findByActiveFeatured_PrevAndNext( long ContestPK, boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException; /** * Removes all the contests where contestActive = ? and featured = ? from the database. * * @param contestActive the contest active * @param featured the featured * @throws SystemException if a system exception occurred */ public void removeByActiveFeatured(boolean contestActive, boolean featured) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the number of contests where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @return the number of matching contests * @throws SystemException if a system exception occurred */ public int countByActiveFeatured(boolean contestActive, boolean featured) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @return the matching contests * @throws SystemException if a system exception occurred */ public java.util.List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns a range of all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ public java.util.List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate, int start, int end) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns an ordered range of all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @throws SystemException if a system exception occurred */ public java.util.List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the first contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest findByActiveFeaturedcontestPrivate_First( boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException; /** * Returns the first contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest fetchByActiveFeaturedcontestPrivate_First( boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the last contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest findByActiveFeaturedcontestPrivate_Last( boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) ======= >>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException;
Solution content
    * @return the first matching contest

    /**
    * @param featured the featured
    * @param contestActive the contest active
    * @param contestPrivate the contest private
    * @return the matching contests
    public com.ext.portlet.model.Contest findByContestActive_First(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
<<<<<<< HEAD
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the first contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the first matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest fetchByContestActive_First(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;
    * Returns the last contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest
    * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest findByContestActive_Last(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the last contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest fetchByContestActive_Last(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the contests before and after the current contest in the ordered set where contestActive = ?.
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the previous, current, and next contest
    * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest[] findByContestActive_PrevAndNext(
        long ContestPK, boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Removes all the contests where contestActive = ? from the database.
    *
    * @param contestActive the contest active
    * @throws SystemException if a system exception occurred
    */
    public void removeByContestActive(boolean contestActive)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the number of contests where contestActive = ?.
    *
    * @param contestActive the contest active
    * @return the number of matching contests
    * @throws SystemException if a system exception occurred
    */
    public int countByContestActive(boolean contestActive)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns all the contests where contestActive = ? and featured = ?.
    *
    * @param contestActive the contest active
    * @param featured the featured
    * @return the matching contests
    * @throws SystemException if a system exception occurred
    */
    public java.util.List findByActiveFeatured(
        boolean contestActive, boolean featured)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns a range of all the contests where contestActive = ? and featured = ?.
    *
    * 

* Returns the last contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ * 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ public java.util.List findByActiveFeatured( boolean contestActive, boolean featured, int start, int end) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns an ordered range of all the contests where contestActive = ? and featured = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ public java.util.List findByActiveFeatured( boolean contestActive, boolean featured, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the first contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest findByActiveFeatured_First( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException; /** * Returns the first contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest fetchByActiveFeatured_First( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** public com.ext.portlet.model.Contest findByActiveFeatured_Last( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException; /** * Returns the last contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest fetchByActiveFeatured_Last( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and featured = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest[] findByActiveFeatured_PrevAndNext( long ContestPK, boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException; /** * Removes all the contests where contestActive = ? and featured = ? from the database. * * @param contestActive the contest active * @param featured the featured * @throws SystemException if a system exception occurred */ public void removeByActiveFeatured(boolean contestActive, boolean featured) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the number of contests where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @return the number of matching contests * @throws SystemException if a system exception occurred */ public int countByActiveFeatured(boolean contestActive, boolean featured) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @throws SystemException if a system exception occurred */ public java.util.List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns a range of all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * *

* @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest fetchByActiveFeaturedcontestPrivate_First( boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the last contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ public java.util.List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate, int start, int end) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns an ordered range of all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ public java.util.List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the first contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest findByActiveFeaturedcontestPrivate_First( boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException; /** * Returns the first contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public com.ext.portlet.model.Contest findByActiveFeaturedcontestPrivate_Last( boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) ======= >>>>>>> copyProposal throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException;
File
ContestPersistence.java
Developer's decision
Manual
Kind of conflict
Comment
Method interface
Method signature
Variable
Chunk
Conflicting content
            com.liferay.portal.kernel.exception.SystemException;

    /**
<<<<<<< HEAD
    * Returns the last contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?.
    *
    * @param contestActive the contest active
    * @param featured the featured
    * @param contestPrivate the contest private
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest fetchByActiveFeaturedcontestPrivate_Last(
        boolean contestActive, boolean featured, boolean contestPrivate,
=======
    * Returns the first contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the first matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest fetchByContestActive_First(
        boolean contestActive,
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;
Solution content
            com.liferay.portal.kernel.exception.SystemException;

    /**
<<<<<<< HEAD
    * Returns the last contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?.
    *
    * @param contestActive the contest active
    * @param featured the featured
    * @param contestPrivate the contest private
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest fetchByActiveFeaturedcontestPrivate_Last(
        boolean contestActive, boolean featured, boolean contestPrivate,
=======
    * Returns the first contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the first matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest fetchByContestActive_First(
        boolean contestActive,
>>>>>>> copyProposal
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;
File
ContestPersistence.java
Developer's decision
Manual
Kind of conflict
Comment
Method signature
Variable
Chunk
Conflicting content
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
<<<<<<< HEAD
    * Returns the contests before and after the current contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?.
=======
    * Returns the last contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest
    * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest findByContestActive_Last(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the last contest in the ordered set where contestActive = ?.
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
Solution content
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
<<<<<<< HEAD
    * Returns the contests before and after the current contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?.
=======
    * Returns the last contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest
    * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest findByContestActive_Last(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the last contest in the ordered set where contestActive = ?.
>>>>>>> copyProposal
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
File
ContestPersistence.java
Developer's decision
Manual
Kind of conflict
Comment
Method interface
Chunk
Conflicting content
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
<<<<<<< HEAD
    * @param featured the featured
    * @param contestPrivate the contest private
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the previous, current, and next contest
    * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest[] findByActiveFeaturedcontestPrivate_PrevAndNext(
        long ContestPK, boolean contestActive, boolean featured,
        boolean contestPrivate,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Removes all the contests where contestActive = ? and featured = ? and contestPrivate = ? from the database.
=======
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest fetchByContestActive_Last(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the contests before and after the current contest in the ordered set where contestActive = ?.
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
Solution content
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
<<<<<<< HEAD
    * @param featured the featured
    * @param contestPrivate the contest private
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the previous, current, and next contest
    * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest[] findByActiveFeaturedcontestPrivate_PrevAndNext(
        long ContestPK, boolean contestActive, boolean featured,
        boolean contestPrivate,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Removes all the contests where contestActive = ? and featured = ? and contestPrivate = ? from the database.
=======
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest fetchByContestActive_Last(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the contests before and after the current contest in the ordered set where contestActive = ?.
>>>>>>> copyProposal
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
File
ContestPersistence.java
Developer's decision
Manual
Kind of conflict
Comment
Method interface
Chunk
Conflicting content
    * @return the previous, current, and next contest
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
<<<<<<< HEAD
    * @param featured the featured
    * @param contestPrivate the contest private
    * @throws SystemException if a system exception occurred
    */
    public void removeByActiveFeaturedcontestPrivate(boolean contestActive,
        boolean featured, boolean contestPrivate)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the number of contests where contestActive = ? and featured = ? and contestPrivate = ?.
=======
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest[] findByContestActive_PrevAndNext(
        long ContestPK, boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Removes all the contests where contestActive = ? from the database.
    *
    * @param contestActive the contest active
    * @throws SystemException if a system exception occurred
    */
    public void removeByContestActive(boolean contestActive)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the number of contests where contestActive = ?.
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
    *
    * @param contestActive the contest active
    * @param featured the featured
Solution content
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
<<<<<<< HEAD
    * @param featured the featured
    * @param contestPrivate the contest private
    * @throws SystemException if a system exception occurred
    */
    public void removeByActiveFeaturedcontestPrivate(boolean contestActive,
        boolean featured, boolean contestPrivate)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the number of contests where contestActive = ? and featured = ? and contestPrivate = ?.
=======
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the previous, current, and next contest
    * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public com.ext.portlet.model.Contest[] findByContestActive_PrevAndNext(
        long ContestPK, boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException;

    /**
    * Removes all the contests where contestActive = ? from the database.
    *
    * @param contestActive the contest active
    * @throws SystemException if a system exception occurred
    */
    public void removeByContestActive(boolean contestActive)
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
    * Returns the number of contests where contestActive = ?.
>>>>>>> copyProposal
    *
    * @param contestActive the contest active
    * @param featured the featured
File
ContestPersistence.java
Developer's decision
Manual
Kind of conflict
Comment
Method interface
Chunk
Conflicting content
    * @return the number of matching contests
    * @throws SystemException if a system exception occurred
    */
<<<<<<< HEAD
    public int countByActiveFeaturedcontestPrivate(boolean contestActive,
        boolean featured, boolean contestPrivate)
=======
    public int countByContestActive(boolean contestActive)
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
Solution content
    * @return the number of matching contests
    * @throws SystemException if a system exception occurred
    */
<<<<<<< HEAD
    public int countByActiveFeaturedcontestPrivate(boolean contestActive,
        boolean featured, boolean contestPrivate)
=======
    public int countByContestActive(boolean contestActive)
>>>>>>> copyProposal
        throws com.liferay.portal.kernel.exception.SystemException;

    /**
File
ContestPersistence.java
Developer's decision
Manual
Kind of conflict
Method signature
Variable
Chunk
Conflicting content
    *
    * 

>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b } /** <<<<<<< HEAD * Returns all the contests where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @return the matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByContestActivecontestPrivate( boolean contestActive, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByContestActivecontestPrivate(contestActive, contestPrivate); } /** * Returns a range of all the contests where contestActive = ? and contestPrivate = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByContestActivecontestPrivate( boolean contestActive, boolean contestPrivate, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByContestActivecontestPrivate(contestActive, contestPrivate, start, end); } /** * Returns an ordered range of all the contests where contestActive = ? and contestPrivate = ?. com.liferay.portal.kernel.exception.SystemException { return getPersistence() * 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByContestActivecontestPrivate( boolean contestActive, boolean contestPrivate, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByContestActivecontestPrivate(contestActive, contestPrivate, start, end, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByContestActivecontestPrivate_First( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByContestActivecontestPrivate_First(contestActive, contestPrivate, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByContestActivecontestPrivate_First( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByContestActivecontestPrivate_First(contestActive, contestPrivate, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByContestActivecontestPrivate_Last( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, .findByContestActivecontestPrivate_Last(contestActive, contestPrivate, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByContestActivecontestPrivate_Last( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByContestActivecontestPrivate_Last(contestActive, contestPrivate, orderByComparator); } /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest[] findByContestActivecontestPrivate_PrevAndNext( long ContestPK, boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByContestActivecontestPrivate_PrevAndNext(ContestPK, contestActive, contestPrivate, orderByComparator); } /** * Removes all the contests where contestActive = ? and contestPrivate = ? from the database. * * @param contestActive the contest active * @param contestPrivate the contest private * @throws SystemException if a system exception occurred */ public static void removeByContestActivecontestPrivate( boolean contestActive, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException { getPersistence() .removeByContestActivecontestPrivate(contestActive, contestPrivate); } /** * Returns the number of contests where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @return the number of matching contests * @throws SystemException if a system exception occurred */ public static int countByContestActivecontestPrivate( boolean contestActive, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .countByContestActivecontestPrivate(contestActive, contestPrivate); } /** * Returns all the contests where contestActive = ?. * * @param contestActive the contest active * @return the matching contests * @throws SystemException if a system exception occurred */ ======= * Returns all the contests where contestActive = ?. * * @param contestActive the contest active * @return the matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByContestActive( boolean contestActive) throws com.liferay.portal.kernel.exception.SystemException {
Solution content
    }

    /**
<<<<<<< HEAD
    * Returns all the contests where contestActive = ? and contestPrivate = ?.
    *
    * @param contestActive the contest active
    * @param contestPrivate the contest private
    * @return the matching contests
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List findByContestActivecontestPrivate(
        boolean contestActive, boolean contestPrivate)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByContestActivecontestPrivate(contestActive,
            contestPrivate);
    }

    /**
    * Returns a range of all the contests where contestActive = ? and contestPrivate = ?.
    *
    * 

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByContestActivecontestPrivate( boolean contestActive, boolean contestPrivate, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByContestActivecontestPrivate(contestActive, contestPrivate, start, end); } /** * Returns an ordered range of all the contests where contestActive = ? and contestPrivate = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByContestActivecontestPrivate( boolean contestActive, boolean contestPrivate, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByContestActivecontestPrivate(contestActive, contestPrivate, start, end, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByContestActivecontestPrivate_First( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByContestActivecontestPrivate_First(contestActive, contestPrivate, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByContestActivecontestPrivate_First( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByContestActivecontestPrivate_First(contestActive, contestPrivate, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByContestActivecontestPrivate_Last( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByContestActivecontestPrivate_Last(contestActive, contestPrivate, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByContestActivecontestPrivate_Last( boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByContestActivecontestPrivate_Last(contestActive, contestPrivate, orderByComparator); } /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and contestPrivate = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest[] findByContestActivecontestPrivate_PrevAndNext( long ContestPK, boolean contestActive, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByContestActivecontestPrivate_PrevAndNext(ContestPK, contestActive, contestPrivate, orderByComparator); } /** * Removes all the contests where contestActive = ? and contestPrivate = ? from the database. * * @param contestActive the contest active * @param contestPrivate the contest private * @throws SystemException if a system exception occurred */ public static void removeByContestActivecontestPrivate( boolean contestActive, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException { getPersistence() .removeByContestActivecontestPrivate(contestActive, contestPrivate); } /** * Returns the number of contests where contestActive = ? and contestPrivate = ?. * * @param contestActive the contest active * @param contestPrivate the contest private * @return the number of matching contests * @throws SystemException if a system exception occurred */ public static int countByContestActivecontestPrivate( boolean contestActive, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .countByContestActivecontestPrivate(contestActive, contestPrivate); } /** * Returns all the contests where contestActive = ?. * * @param contestActive the contest active * @return the matching contests * @throws SystemException if a system exception occurred */ ======= * Returns all the contests where contestActive = ?. * * @param contestActive the contest active * @return the matching contests * @throws SystemException if a system exception occurred */ >>>>>>> copyProposal public static java.util.List findByContestActive( boolean contestActive) throws com.liferay.portal.kernel.exception.SystemException {
File
ContestUtil.java
Developer's decision
Manual
Kind of conflict
Comment
Method declaration
Chunk
Conflicting content
    */
    public static com.ext.portlet.model.Contest findByContestActive_First(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
<<<<<<< HEAD
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByContestActive_First(contestActive, orderByComparator);
    }

    /**
    * Returns the first contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the first matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public static com.ext.portlet.model.Contest fetchByContestActive_First(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByContestActive_First(contestActive, orderByComparator);
    }

    /**
    * Returns the last contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest
    * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public static com.ext.portlet.model.Contest findByContestActive_Last(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByContestActive_Last(contestActive, orderByComparator);
    }

    /**
    * Returns the last contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public static com.ext.portlet.model.Contest fetchByContestActive_Last(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByContestActive_Last(contestActive, orderByComparator);
    }

    /**
    * Returns the contests before and after the current contest in the ordered set where contestActive = ?.
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the previous, current, and next contest
    * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public static com.ext.portlet.model.Contest[] findByContestActive_PrevAndNext(
        long ContestPK, boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByContestActive_PrevAndNext(ContestPK, contestActive,
            orderByComparator);
    }

    /**
    * Removes all the contests where contestActive = ? from the database.
    *
    * @param contestActive the contest active
    * @throws SystemException if a system exception occurred
    */
    public static void removeByContestActive(boolean contestActive)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeByContestActive(contestActive);
    }

    /**
    * Returns the number of contests where contestActive = ?.
    *
    * @param contestActive the contest active
    * @return the number of matching contests
    * @throws SystemException if a system exception occurred
    */
    public static int countByContestActive(boolean contestActive)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByContestActive(contestActive);
    }

    /**
    * Returns all the contests where contestActive = ? and featured = ?.
    *
    * @param contestActive the contest active
    * @param featured the featured
    * @return the matching contests
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List findByActiveFeatured(
        boolean contestActive, boolean featured)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByActiveFeatured(contestActive, featured);
    }

    /**
    * Returns a range of all the contests where contestActive = ? and featured = ?.
    *
    * 

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByActiveFeatured( boolean contestActive, boolean featured, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeatured(contestActive, featured, start, end); } /** * Returns an ordered range of all the contests where contestActive = ? and featured = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByActiveFeatured( boolean contestActive, boolean featured, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeatured(contestActive, featured, start, end, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByActiveFeatured_First( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeatured_First(contestActive, featured, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByActiveFeatured_First( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByActiveFeatured_First(contestActive, featured, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByActiveFeatured_Last( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeatured_Last(contestActive, featured, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByActiveFeatured_Last( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByActiveFeatured_Last(contestActive, featured, orderByComparator); } /** /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and featured = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest[] findByActiveFeatured_PrevAndNext( long ContestPK, boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeatured_PrevAndNext(ContestPK, contestActive, featured, orderByComparator); } /** * Removes all the contests where contestActive = ? and featured = ? from the database. * * @param contestActive the contest active * @param featured the featured * @throws SystemException if a system exception occurred */ public static void removeByActiveFeatured(boolean contestActive, boolean featured) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeByActiveFeatured(contestActive, featured); } /** * Returns the number of contests where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @return the number of matching contests * @throws SystemException if a system exception occurred */ public static int countByActiveFeatured(boolean contestActive, boolean featured) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().countByActiveFeatured(contestActive, featured); } /** * Returns all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @return the matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate); } /** * Returns a range of all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred public static java.util.List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate, start, end); } /** * Returns an ordered range of all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate, start, end, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByActiveFeaturedcontestPrivate_First( boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeaturedcontestPrivate_First(contestActive, featured, contestPrivate, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByActiveFeaturedcontestPrivate_First( boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByActiveFeaturedcontestPrivate_First(contestActive, featured, contestPrivate, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByActiveFeaturedcontestPrivate_Last( boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeaturedcontestPrivate_Last(contestActive, featured, contestPrivate, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByActiveFeaturedcontestPrivate_Last( boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByActiveFeaturedcontestPrivate_Last(contestActive, featured, contestPrivate, orderByComparator); } /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest[] findByActiveFeaturedcontestPrivate_PrevAndNext( long ContestPK, boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeaturedcontestPrivate_PrevAndNext(ContestPK, contestActive, featured, contestPrivate, orderByComparator); } /** * Removes all the contests where contestActive = ? and featured = ? and contestPrivate = ? from the database. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @throws SystemException if a system exception occurred */ public static void removeByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException { getPersistence() .removeByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate); } /** return getPersistence() * Returns the number of contests where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @return the number of matching contests * @throws SystemException if a system exception occurred */ public static int countByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .countByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate); } /** * Returns all the contests where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @return the matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByActiveFlag( boolean contestActive, int flag) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByActiveFlag(contestActive, flag); } /** * Returns a range of all the contests where contestActive = ? and flag = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param flag the flag * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByActiveFlag( boolean contestActive, int flag, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByActiveFlag(contestActive, flag, start, end); } /** * Returns an ordered range of all the contests where contestActive = ? and flag = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param flag the flag * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByActiveFlag( boolean contestActive, int flag, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { .findByActiveFlag(contestActive, flag, start, end, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByActiveFlag_First( boolean contestActive, int flag, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFlag_First(contestActive, flag, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByActiveFlag_First( boolean contestActive, int flag, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByActiveFlag_First(contestActive, flag, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByActiveFlag_Last( boolean contestActive, int flag, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFlag_Last(contestActive, flag, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByActiveFlag_Last( boolean contestActive, int flag, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByActiveFlag_Last(contestActive, flag, orderByComparator); } /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and flag = ?. ======= throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByContestActive_First(contestActive, orderByComparator); } * Returns the first contest in the ordered set where contestActive = ?. * * @param contestActive the contest active * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByContestActive_First( boolean contestActive, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByContestActive_First(contestActive, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ?. * * @param contestActive the contest active * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByContestActive_Last( boolean contestActive, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByContestActive_Last(contestActive, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ?. >>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b * * @param ContestPK the primary key of the current contest * @param contestActive the contest active
Solution content
    *
    *
    /**

    /**
    */
    * Returns the last contest in the ordered set where contestActive = ?.
    public static com.ext.portlet.model.Contest findByContestActive_First(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
<<<<<<< HEAD
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByContestActive_First(contestActive, orderByComparator);
    }

    /**
    * Returns the first contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the first matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public static com.ext.portlet.model.Contest fetchByContestActive_First(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByContestActive_First(contestActive, orderByComparator);
    }

    /**
    * Returns the last contest in the ordered set where contestActive = ?.
    *
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest
    * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public static com.ext.portlet.model.Contest findByContestActive_Last(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByContestActive_Last(contestActive, orderByComparator);
    }
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public static com.ext.portlet.model.Contest fetchByContestActive_Last(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByContestActive_Last(contestActive, orderByComparator);
    }

    /**
    * Returns the contests before and after the current contest in the ordered set where contestActive = ?.
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the previous, current, and next contest
    * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public static com.ext.portlet.model.Contest[] findByContestActive_PrevAndNext(
        long ContestPK, boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByContestActive_PrevAndNext(ContestPK, contestActive,
            orderByComparator);
    }

    /**
    * Removes all the contests where contestActive = ? from the database.
    *
    * @param contestActive the contest active
    * @throws SystemException if a system exception occurred
    */
    public static void removeByContestActive(boolean contestActive)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeByContestActive(contestActive);
    }

    /**
    * Returns the number of contests where contestActive = ?.
    *
    * @param contestActive the contest active
    * @return the number of matching contests
    * @throws SystemException if a system exception occurred
    */
    public static int countByContestActive(boolean contestActive)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByContestActive(contestActive);
    }

    /**
    * Returns all the contests where contestActive = ? and featured = ?.
    *
    * @param contestActive the contest active
    * @param featured the featured
    * @return the matching contests
    * @throws SystemException if a system exception occurred
    */
    public static java.util.List findByActiveFeatured(
        boolean contestActive, boolean featured)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByActiveFeatured(contestActive, featured);
    }

    /**
    * Returns a range of all the contests where contestActive = ? and featured = ?.
    *
    * 

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByActiveFeatured( boolean contestActive, boolean featured, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeatured(contestActive, featured, start, end); } /** * Returns an ordered range of all the contests where contestActive = ? and featured = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByActiveFeatured( boolean contestActive, boolean featured, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeatured(contestActive, featured, start, end, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByActiveFeatured_First( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeatured_First(contestActive, featured, orderByComparator); } * Returns the first contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByActiveFeatured_First( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByActiveFeatured_First(contestActive, featured, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ?. * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByActiveFeatured_Last( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeatured_Last(contestActive, featured, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByActiveFeatured_Last( boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByActiveFeatured_Last(contestActive, featured, orderByComparator); } /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and featured = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest[] findByActiveFeatured_PrevAndNext( long ContestPK, boolean contestActive, boolean featured, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeatured_PrevAndNext(ContestPK, contestActive, featured, orderByComparator); } /** * Removes all the contests where contestActive = ? and featured = ? from the database. * * @param contestActive the contest active * @param featured the featured * @throws SystemException if a system exception occurred */ public static void removeByActiveFeatured(boolean contestActive, boolean featured) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeByActiveFeatured(contestActive, featured); } /** * Returns the number of contests where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @return the number of matching contests * @throws SystemException if a system exception occurred */ public static int countByActiveFeatured(boolean contestActive, boolean featured) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().countByActiveFeatured(contestActive, featured); } /** * Returns all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @return the matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate); } /** * Returns a range of all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate, start, end); } /** * Returns an ordered range of all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate, start, end, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByActiveFeaturedcontestPrivate_First( boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeaturedcontestPrivate_First(contestActive, featured, contestPrivate, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByActiveFeaturedcontestPrivate_First( boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByActiveFeaturedcontestPrivate_First(contestActive, featured, contestPrivate, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByActiveFeaturedcontestPrivate_Last( boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeaturedcontestPrivate_Last(contestActive, featured, contestPrivate, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByActiveFeaturedcontestPrivate_Last( boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByActiveFeaturedcontestPrivate_Last(contestActive, featured, contestPrivate, orderByComparator); } /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest[] findByActiveFeaturedcontestPrivate_PrevAndNext( long ContestPK, boolean contestActive, boolean featured, boolean contestPrivate, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFeaturedcontestPrivate_PrevAndNext(ContestPK, contestActive, featured, contestPrivate, orderByComparator); } /** * Removes all the contests where contestActive = ? and featured = ? and contestPrivate = ? from the database. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @throws SystemException if a system exception occurred */ public static void removeByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException { getPersistence() .removeByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate); } /** * Returns the number of contests where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @return the number of matching contests * @throws SystemException if a system exception occurred */ public static int countByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .countByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate); } /** * Returns all the contests where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @return the matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByActiveFlag( boolean contestActive, int flag) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByActiveFlag(contestActive, flag); } /** * Returns a range of all the contests where contestActive = ? and flag = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param flag the flag * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred public static java.util.List findByActiveFlag( boolean contestActive, int flag, int start, int end) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence().findByActiveFlag(contestActive, flag, start, end); } /** * Returns an ordered range of all the contests where contestActive = ? and flag = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param flag the flag * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ public static java.util.List findByActiveFlag( boolean contestActive, int flag, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFlag(contestActive, flag, start, end, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByActiveFlag_First( boolean contestActive, int flag, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFlag_First(contestActive, flag, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByActiveFlag_First( boolean contestActive, int flag, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByActiveFlag_First(contestActive, flag, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByActiveFlag_Last( boolean contestActive, int flag, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByActiveFlag_Last(contestActive, flag, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByActiveFlag_Last( boolean contestActive, int flag, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByActiveFlag_Last(contestActive, flag, orderByComparator); } /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and flag = ?. ======= throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByContestActive_First(contestActive, orderByComparator); } /** * Returns the first contest in the ordered set where contestActive = ?. * * @param contestActive the contest active * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest fetchByContestActive_First( boolean contestActive, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getPersistence() .fetchByContestActive_First(contestActive, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ?. * * @param contestActive the contest active * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ public static com.ext.portlet.model.Contest findByContestActive_Last( boolean contestActive, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.ext.portlet.NoSuchContestException, com.liferay.portal.kernel.exception.SystemException { return getPersistence() .findByContestActive_Last(contestActive, orderByComparator); } /** * Returns the last contest in the ordered set where contestActive = ?. >>>>>>> copyProposal * * @param ContestPK the primary key of the current contest * @param contestActive the contest active
File
ContestUtil.java
Developer's decision
Manual
Kind of conflict
Comment
Method declaration
Method invocation
Return statement
Chunk
Conflicting content
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
<<<<<<< HEAD
    * @param flag the flag
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the previous, current, and next contest
    * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public static com.ext.portlet.model.Contest[] findByActiveFlag_PrevAndNext(
        long ContestPK, boolean contestActive, int flag,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByActiveFlag_PrevAndNext(ContestPK, contestActive,
            flag, orderByComparator);
    }

    /**
    * Removes all the contests where contestActive = ? and flag = ? from the database.
=======
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public static com.ext.portlet.model.Contest fetchByContestActive_Last(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByContestActive_Last(contestActive, orderByComparator);
    }

    /**
    * Returns the contests before and after the current contest in the ordered set where contestActive = ?.
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
Solution content
    */
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
<<<<<<< HEAD
    * @param flag the flag
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the previous, current, and next contest
    * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found
    * @throws SystemException if a system exception occurred
    public static com.ext.portlet.model.Contest[] findByActiveFlag_PrevAndNext(
        long ContestPK, boolean contestActive, int flag,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByActiveFlag_PrevAndNext(ContestPK, contestActive,
            flag, orderByComparator);
    }

    /**
    * Removes all the contests where contestActive = ? and flag = ? from the database.
=======
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the last matching contest, or null if a matching contest could not be found
    * @throws SystemException if a system exception occurred
    */
    public static com.ext.portlet.model.Contest fetchByContestActive_Last(
        boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .fetchByContestActive_Last(contestActive, orderByComparator);
    }

    /**
    * Returns the contests before and after the current contest in the ordered set where contestActive = ?.
>>>>>>> copyProposal
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
File
ContestUtil.java
Developer's decision
Manual
Kind of conflict
Comment
Method declaration
Chunk
Conflicting content
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
<<<<<<< HEAD
    * @param flag the flag
    * @throws SystemException if a system exception occurred
    */
    public static void removeByActiveFlag(boolean contestActive, int flag)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeByActiveFlag(contestActive, flag);
=======
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the previous, current, and next contest
    * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public static com.ext.portlet.model.Contest[] findByContestActive_PrevAndNext(
        long ContestPK, boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByContestActive_PrevAndNext(ContestPK, contestActive,
            orderByComparator);
    }

    /**
    * Removes all the contests where contestActive = ? from the database.
    *
    * @param contestActive the contest active
    * @throws SystemException if a system exception occurred
    */
    public static void removeByContestActive(boolean contestActive)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeByContestActive(contestActive);
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
    }

    /**
Solution content
>>>>>>> copyProposal
    }

    /**
    *
    * @param ContestPK the primary key of the current contest
    * @param contestActive the contest active
<<<<<<< HEAD
    * @param flag the flag
    * @throws SystemException if a system exception occurred
    */
    public static void removeByActiveFlag(boolean contestActive, int flag)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeByActiveFlag(contestActive, flag);
=======
    * @param orderByComparator the comparator to order the set by (optionally null)
    * @return the previous, current, and next contest
    * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found
    * @throws SystemException if a system exception occurred
    */
    public static com.ext.portlet.model.Contest[] findByContestActive_PrevAndNext(
        long ContestPK, boolean contestActive,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.ext.portlet.NoSuchContestException,
            com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByContestActive_PrevAndNext(ContestPK, contestActive,
            orderByComparator);
    }

    /**
    * Removes all the contests where contestActive = ? from the database.
    *
    * @param contestActive the contest active
    * @throws SystemException if a system exception occurred
    */
    public static void removeByContestActive(boolean contestActive)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeByContestActive(contestActive);
File
ContestUtil.java
Developer's decision
Manual
Kind of conflict
Comment
Method declaration
Method invocation
Method signature
Chunk
Conflicting content
    * @return the number of matching contests
    * @throws SystemException if a system exception occurred
    */
<<<<<<< HEAD
    public static int countByActiveFlag(boolean contestActive, int flag)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByActiveFlag(contestActive, flag);
=======
    public static int countByContestActive(boolean contestActive)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByContestActive(contestActive);
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
    }

    /**
Solution content
    * @return the number of matching contests
    * @throws SystemException if a system exception occurred
    */
<<<<<<< HEAD
    public static int countByActiveFlag(boolean contestActive, int flag)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByActiveFlag(contestActive, flag);
=======
    public static int countByContestActive(boolean contestActive)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByContestActive(contestActive);
>>>>>>> copyProposal
    }

    /**
File
ContestUtil.java
Developer's decision
Manual
Kind of conflict
Method invocation
Method signature
Return statement
Chunk
Conflicting content
    private String[] _methodParameterTypes527;
    private String _methodName529;
    private String[] _methodParameterTypes529;
<<<<<<< HEAD
    private String _methodName530;
    private String[] _methodParameterTypes530;
=======
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b

    public ContestLocalServiceClpInvoker() {
        _methodName0 = "addContest";
Solution content
    private String[] _methodParameterTypes527;
    private String _methodName529;
    private String[] _methodParameterTypes529;
<<<<<<< HEAD
    private String _methodName530;
    private String[] _methodParameterTypes530;
=======
>>>>>>> copyProposal

    public ContestLocalServiceClpInvoker() {
        _methodName0 = "addContest";
File
ContestLocalServiceClpInvoker.java
Developer's decision
Manual
Kind of conflict
Attribute
Chunk
Conflicting content
        _methodParameterTypes525 = new String[] { "long", "long" };

<<<<<<< HEAD
        _methodName526 = "getModelIdsAndNames";
=======
        _methodName526 = "getModelIds";
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b

        _methodParameterTypes526 = new String[] { "long" };
Solution content
        _methodParameterTypes525 = new String[] { "long", "long" };

<<<<<<< HEAD
        _methodName526 = "getModelIdsAndNames";
=======
        _methodName526 = "getModelIds";
>>>>>>> copyProposal

        _methodParameterTypes526 = new String[] { "long" };
File
ContestLocalServiceClpInvoker.java
Developer's decision
Manual
Kind of conflict
Attribute
Chunk
Conflicting content
        _methodParameterTypes526 = new String[] { "long" };

        _methodName527 = "getDefaultModelId";
<<<<<<< HEAD

        _methodParameterTypes527 = new String[] { "long" };

        _methodName529 = "getNumberOfProposalsForJudge";

=======

        _methodParameterTypes527 = new String[] { "long" };

        _methodName529 = "getNumberOfProposalsForJudge";

>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
        _methodParameterTypes529 = new String[] {
                "com.liferay.portal.model.User", "com.ext.portlet.model.Contest"
            };
Solution content
        _methodParameterTypes526 = new String[] { "long" };

        _methodName527 = "getDefaultModelId";
<<<<<<< HEAD

        _methodParameterTypes527 = new String[] { "long" };

        _methodName529 = "getNumberOfProposalsForJudge";

=======

        _methodParameterTypes527 = new String[] { "long" };

        _methodName529 = "getNumberOfProposalsForJudge";

>>>>>>> copyProposal
        _methodParameterTypes529 = new String[] {
                "com.liferay.portal.model.User", "com.ext.portlet.model.Contest"
            };
File
ContestLocalServiceClpInvoker.java
Developer's decision
Manual
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
=======

        if (_methodName526.equals(name) &&
                Arrays.deepEquals(_methodParameterTypes526, parameterTypes)) {
<<<<<<< HEAD
            return ContestLocalServiceUtil.getModelIdsAndNames(((Long) arguments[0]).longValue());
            return ContestLocalServiceUtil.getModelIds(((Long) arguments[0]).longValue());
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
        }

        if (_methodName527.equals(name) &&
Solution content
        if (_methodName526.equals(name) &&
                Arrays.deepEquals(_methodParameterTypes526, parameterTypes)) {
<<<<<<< HEAD
            return ContestLocalServiceUtil.getModelIdsAndNames(((Long) arguments[0]).longValue());
=======
            return ContestLocalServiceUtil.getModelIds(((Long) arguments[0]).longValue());
>>>>>>> copyProposal
        }

        if (_methodName527.equals(name) &&
File
ContestLocalServiceClpInvoker.java
Developer's decision
Manual
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
    private final static Log _log = LogFactoryUtil.getLog(ContestLocalServiceImpl.class);

<<<<<<< HEAD
    public Contest getContestByActiveFlag(boolean contestActive) throws SystemException, NoSuchContestException {
        List contests = contestPersistence.findByContestActive(contestActive);
        if (contests.isEmpty()) {
        	throw new NoSuchContestException();
        }
        return contests.get(0);
=======
    public Contest getContestByActiveFlag(boolean contestActive) throws SystemException {
    	List contests = contestPersistence.findByContestActive(contestActive);
    	return contests.isEmpty() ? null : contests.get(0);
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
    }

    public Contest createNewContest(Long userId, String name) throws SystemException, PortalException {
Solution content
    private final static Log _log = LogFactoryUtil.getLog(ContestLocalServiceImpl.class);

    public Contest getContestByActiveFlag(boolean contestActive) throws SystemException, NoSuchContestException {
        List contests = contestPersistence.findByContestActive(contestActive);
        if (contests.isEmpty()) {
        	throw new NoSuchContestException();
        }
        return contests.get(0);
    }

    public Contest createNewContest(Long userId, String name) throws SystemException, PortalException {
File
ContestLocalServiceImpl.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Method signature
Return statement
Variable
Chunk
Conflicting content
            FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByType",
            new String[] { Long.class.getName() });
    private static final String _FINDER_COLUMN_TYPE_PLANTYPEID_2 = "contest.PlanTypeId = ?";
<<<<<<< HEAD
    public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_CONTESTACTIVECONTESTPRIVATE =
        new FinderPath(ContestModelImpl.ENTITY_CACHE_ENABLED,
            ContestModelImpl.FINDER_CACHE_ENABLED, ContestImpl.class,
            FINDER_CLASS_NAME_LIST_WITH_PAGINATION,
            "findByContestActivecontestPrivate",
            new String[] {
                Boolean.class.getName(), Boolean.class.getName(),
                
            Integer.class.getName(), Integer.class.getName(),
                OrderByComparator.class.getName()
            });
    public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVECONTESTPRIVATE =
        new FinderPath(ContestModelImpl.ENTITY_CACHE_ENABLED,
            ContestModelImpl.FINDER_CACHE_ENABLED, ContestImpl.class,
            FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION,
            "findByContestActivecontestPrivate",
            new String[] { Boolean.class.getName(), Boolean.class.getName() },
            ContestModelImpl.CONTESTACTIVE_COLUMN_BITMASK |
            ContestModelImpl.CONTESTPRIVATE_COLUMN_BITMASK |
            ContestModelImpl.WEIGHT_COLUMN_BITMASK |
            ContestModelImpl.CREATED_COLUMN_BITMASK);
    public static final FinderPath FINDER_PATH_COUNT_BY_CONTESTACTIVECONTESTPRIVATE =
        new FinderPath(ContestModelImpl.ENTITY_CACHE_ENABLED,
            ContestModelImpl.FINDER_CACHE_ENABLED, Long.class,
            FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION,
            "countByContestActivecontestPrivate",
            new String[] { Boolean.class.getName(), Boolean.class.getName() });
    private static final String _FINDER_COLUMN_CONTESTACTIVECONTESTPRIVATE_CONTESTACTIVE_2 =
        "contest.contestActive = ? AND ";
    private static final String _FINDER_COLUMN_CONTESTACTIVECONTESTPRIVATE_CONTESTPRIVATE_2 =
        "contest.contestPrivate = ?";
=======
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
    public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_CONTESTACTIVE =
        new FinderPath(ContestModelImpl.ENTITY_CACHE_ENABLED,
            ContestModelImpl.FINDER_CACHE_ENABLED, ContestImpl.class,
Solution content
            FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION, "countByType",
            new String[] { Long.class.getName() });
    private static final String _FINDER_COLUMN_TYPE_PLANTYPEID_2 = "contest.PlanTypeId = ?";
<<<<<<< HEAD
    public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_CONTESTACTIVECONTESTPRIVATE =
        new FinderPath(ContestModelImpl.ENTITY_CACHE_ENABLED,
            ContestModelImpl.FINDER_CACHE_ENABLED, ContestImpl.class,
            FINDER_CLASS_NAME_LIST_WITH_PAGINATION,
            "findByContestActivecontestPrivate",
            new String[] {
                Boolean.class.getName(), Boolean.class.getName(),
                
            Integer.class.getName(), Integer.class.getName(),
                OrderByComparator.class.getName()
            });
    public static final FinderPath FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVECONTESTPRIVATE =
        new FinderPath(ContestModelImpl.ENTITY_CACHE_ENABLED,
            ContestModelImpl.FINDER_CACHE_ENABLED, ContestImpl.class,
            FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION,
            "findByContestActivecontestPrivate",
            new String[] { Boolean.class.getName(), Boolean.class.getName() },
            ContestModelImpl.CONTESTACTIVE_COLUMN_BITMASK |
            ContestModelImpl.CONTESTPRIVATE_COLUMN_BITMASK |
            ContestModelImpl.WEIGHT_COLUMN_BITMASK |
            ContestModelImpl.CREATED_COLUMN_BITMASK);
    public static final FinderPath FINDER_PATH_COUNT_BY_CONTESTACTIVECONTESTPRIVATE =
        new FinderPath(ContestModelImpl.ENTITY_CACHE_ENABLED,
            ContestModelImpl.FINDER_CACHE_ENABLED, Long.class,
            FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION,
            "countByContestActivecontestPrivate",
            new String[] { Boolean.class.getName(), Boolean.class.getName() });
    private static final String _FINDER_COLUMN_CONTESTACTIVECONTESTPRIVATE_CONTESTACTIVE_2 =
        "contest.contestActive = ? AND ";
    private static final String _FINDER_COLUMN_CONTESTACTIVECONTESTPRIVATE_CONTESTPRIVATE_2 =
        "contest.contestPrivate = ?";
=======
>>>>>>> copyProposal
    public static final FinderPath FINDER_PATH_WITH_PAGINATION_FIND_BY_CONTESTACTIVE =
        new FinderPath(ContestModelImpl.ENTITY_CACHE_ENABLED,
            ContestModelImpl.FINDER_CACHE_ENABLED, ContestImpl.class,
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
    }

    /**
<<<<<<< HEAD
     * Returns all the contests where contestActive = ? and contestPrivate = ?.
     *
     * @param contestActive the contest active
     * @param contestPrivate the contest private
=======
     * Returns all the contests where contestActive = ?.
     *
     * @param contestActive the contest active
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
     * @return the matching contests
     * @throws SystemException if a system exception occurred
     */
Solution content
    }

    /**
<<<<<<< HEAD
     * Returns all the contests where contestActive = ? and contestPrivate = ?.
     *
     * @param contestActive the contest active
     * @param contestPrivate the contest private
=======
     * Returns all the contests where contestActive = ?.
     *
     * @param contestActive the contest active
>>>>>>> copyProposal
     * @return the matching contests
     * @throws SystemException if a system exception occurred
     */
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Comment
Chunk
Conflicting content
        throws SystemException {
     * @throws SystemException if a system exception occurred
     */
    @Override
<<<<<<< HEAD
    public List findByContestActivecontestPrivate(
        boolean contestActive, boolean contestPrivate)
        return findByContestActivecontestPrivate(contestActive, contestPrivate,
            QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
    }

    /**
     * Returns a range of all the contests where contestActive = ? and contestPrivate = ?.
=======
    public List findByContestActive(boolean contestActive)
        throws SystemException {
        return findByContestActive(contestActive, QueryUtil.ALL_POS,
            QueryUtil.ALL_POS, null);
    }

    /**
     * Returns a range of all the contests where contestActive = ?.
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
     *
     * 

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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.

Solution content
     * @throws SystemException if a system exception occurred
     */
    @Override
<<<<<<< HEAD
    public List findByContestActivecontestPrivate(
        boolean contestActive, boolean contestPrivate)
        throws SystemException {
        return findByContestActivecontestPrivate(contestActive, contestPrivate,
            QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
    }

    /**
     * Returns a range of all the contests where contestActive = ? and contestPrivate = ?.
=======
    public List findByContestActive(boolean contestActive)
        throws SystemException {
        return findByContestActive(contestActive, QueryUtil.ALL_POS,
            QueryUtil.ALL_POS, null);
    }

    /**
     * Returns a range of all the contests where contestActive = ?.
>>>>>>> copyProposal
     *
     * 

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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.

File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Comment
Method declaration
Chunk
Conflicting content
     * 

* * @param contestActive the contest active <<<<<<< HEAD * @param contestPrivate the contest private ======= >>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests
Solution content
     * 

* * @param contestActive the contest active <<<<<<< HEAD * @param contestPrivate the contest private ======= >>>>>>> copyProposal * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Comment
Chunk
Conflicting content
     * @throws SystemException if a system exception occurred
     */
    @Override
<<<<<<< HEAD
    public List findByContestActivecontestPrivate(
        boolean contestActive, boolean contestPrivate, int start, int end)
        throws SystemException {
        return findByContestActivecontestPrivate(contestActive, contestPrivate,
            start, end, null);
    }

    /**
     * Returns an ordered range of all the contests where contestActive = ? and contestPrivate = ?.
=======
    public List findByContestActive(boolean contestActive, int start,
        int end) throws SystemException {
        return findByContestActive(contestActive, start, end, null);
    }

    /**
     * Returns an ordered range of all the contests where contestActive = ?.
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
     *
     * 

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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.

Solution content
     * @throws SystemException if a system exception occurred
     */
    @Override
<<<<<<< HEAD
    public List findByContestActivecontestPrivate(
        boolean contestActive, boolean contestPrivate, int start, int end)
        throws SystemException {
        return findByContestActivecontestPrivate(contestActive, contestPrivate,
            start, end, null);
    }

    /**
     * Returns an ordered range of all the contests where contestActive = ? and contestPrivate = ?.
=======
    public List findByContestActive(boolean contestActive, int start,
        int end) throws SystemException {
        return findByContestActive(contestActive, start, end, null);
    }

    /**
     * Returns an ordered range of all the contests where contestActive = ?.
>>>>>>> copyProposal
     *
     * 

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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.

File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Comment
Method declaration
Chunk
Conflicting content
     * 

* * @param contestActive the contest active <<<<<<< HEAD * @param contestPrivate the contest private ======= >>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null)
Solution content
     * 

* * @param contestActive the contest active <<<<<<< HEAD * @param contestPrivate the contest private ======= >>>>>>> copyProposal * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null)
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Comment
Chunk
Conflicting content
     * @throws SystemException if a system exception occurred
     */
    @Override
<<<<<<< HEAD
    public List findByContestActivecontestPrivate(
        boolean contestActive, boolean contestPrivate, int start, int end,
        OrderByComparator orderByComparator) throws SystemException {
=======
    public List findByContestActive(boolean contestActive, int start,
        int end, OrderByComparator orderByComparator) throws SystemException {
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
        boolean pagination = true;
        FinderPath finderPath = null;
        Object[] finderArgs = null;
Solution content
     * @throws SystemException if a system exception occurred
     */
    @Override
<<<<<<< HEAD
    public List findByContestActivecontestPrivate(
        boolean contestActive, boolean contestPrivate, int start, int end,
        OrderByComparator orderByComparator) throws SystemException {
=======
    public List findByContestActive(boolean contestActive, int start,
        int end, OrderByComparator orderByComparator) throws SystemException {
>>>>>>> copyProposal
        boolean pagination = true;
        FinderPath finderPath = null;
        Object[] finderArgs = null;
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Method signature
Chunk
Conflicting content
        if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
                (orderByComparator == null)) {
            pagination = false;
<<<<<<< HEAD
            finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVECONTESTPRIVATE;
            finderArgs = new Object[] { contestActive, contestPrivate };
        } else {
            finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_CONTESTACTIVECONTESTPRIVATE;
            finderArgs = new Object[] {
                    contestActive, contestPrivate,
=======
            finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVE;
            finderArgs = new Object[] { contestActive };
        } else {
            finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_CONTESTACTIVE;
            finderArgs = new Object[] {
                    contestActive,
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
                    
                    start, end, orderByComparator
                };
Solution content
        if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) &&
                (orderByComparator == null)) {
            pagination = false;
<<<<<<< HEAD
            finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVECONTESTPRIVATE;
            finderArgs = new Object[] { contestActive, contestPrivate };
        } else {
            finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_CONTESTACTIVECONTESTPRIVATE;
            finderArgs = new Object[] {
                    contestActive, contestPrivate,
=======
            finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVE;
            finderArgs = new Object[] { contestActive };
        } else {
            finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_CONTESTACTIVE;
            finderArgs = new Object[] {
                    contestActive,
>>>>>>> copyProposal
                    
                    start, end, orderByComparator
                };
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Attribute
Method invocation
Variable
Chunk
Conflicting content
        if ((list != null) && !list.isEmpty()) {
            for (Contest contest : list) {
<<<<<<< HEAD
                if ((contestActive != contest.getContestActive()) ||
                        (contestPrivate != contest.getContestPrivate())) {
=======
                if ((contestActive != contest.getContestActive())) {
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
                    list = null;

                    break;
Solution content
        if ((list != null) && !list.isEmpty()) {
            for (Contest contest : list) {
<<<<<<< HEAD
                if ((contestActive != contest.getContestActive()) ||
                        (contestPrivate != contest.getContestPrivate())) {
=======
                if ((contestActive != contest.getContestActive())) {
>>>>>>> copyProposal
                    list = null;

                    break;
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
If statement
Chunk
Conflicting content
            StringBundler query = null;

            if (orderByComparator != null) {
<<<<<<< HEAD
                query = new StringBundler(4 +
                        (orderByComparator.getOrderByFields().length * 3));
            } else {
                query = new StringBundler(4);
=======
                query = new StringBundler(3 +
                        (orderByComparator.getOrderByFields().length * 3));
            } else {
                query = new StringBundler(3);
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
            }

            query.append(_SQL_SELECT_CONTEST_WHERE);
Solution content
            StringBundler query = null;

            if (orderByComparator != null) {
<<<<<<< HEAD
                query = new StringBundler(4 +
                        (orderByComparator.getOrderByFields().length * 3));
            } else {
                query = new StringBundler(4);
=======
                query = new StringBundler(3 +
                        (orderByComparator.getOrderByFields().length * 3));
            } else {
                query = new StringBundler(3);
>>>>>>> copyProposal
            }

            query.append(_SQL_SELECT_CONTEST_WHERE);
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
                qPos.add(contestActive);

<<<<<<< HEAD
                qPos.add(contestPrivate);

=======
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
                if (!pagination) {
                    list = (List) QueryUtil.list(q, getDialect(),
                            start, end, false);
Solution content
                    list = (List) QueryUtil.list(q, getDialect(),
                            start, end, false);

                qPos.add(contestActive);

<<<<<<< HEAD
                qPos.add(contestPrivate);

=======
>>>>>>> copyProposal
                if (!pagination) {
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Method invocation
Chunk
Conflicting content
    }

    /**
<<<<<<< HEAD
     * Returns the first contest in the ordered set where contestActive = ? and contestPrivate = ?.
     *
     * @param contestActive the contest active
     * @param contestPrivate the contest private
=======
     * Returns the first contest in the ordered set where contestActive = ?.
     *
     * @param contestActive the contest active
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the first matching contest
     * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found
Solution content
    /**
<<<<<<< HEAD
    }
     * Returns the first contest in the ordered set where contestActive = ? and contestPrivate = ?.
     *
     * @param contestActive the contest active
     * @param contestPrivate the contest private
=======
     * Returns the first contest in the ordered set where contestActive = ?.
     *
     * @param contestActive the contest active
>>>>>>> copyProposal
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the first matching contest
     * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Comment
Chunk
Conflicting content
     * @throws SystemException if a system exception occurred
     */
    @Override
<<<<<<< HEAD
    public Contest findByContestActivecontestPrivate_First(
        boolean contestActive, boolean contestPrivate,
        OrderByComparator orderByComparator)
        throws NoSuchContestException, SystemException {
        Contest contest = fetchByContestActivecontestPrivate_First(contestActive,
                contestPrivate, orderByComparator);
        if (contest != null) {
            return contest;
        }

        StringBundler msg = new StringBundler(6);

        msg.append(_NO_SUCH_ENTITY_WITH_KEY);

        msg.append("contestActive=");
        msg.append(contestActive);

        msg.append(", contestPrivate=");
        msg.append(contestPrivate);

        msg.append(StringPool.CLOSE_CURLY_BRACE);

        throw new NoSuchContestException(msg.toString());
    }

    /**
     * Returns the first contest in the ordered set where contestActive = ? and contestPrivate = ?.
=======
    public Contest findByContestActive_First(boolean contestActive,
        OrderByComparator orderByComparator)
        throws NoSuchContestException, SystemException {
        Contest contest = fetchByContestActive_First(contestActive,
                orderByComparator);

        if (contest != null) {
            return contest;
        }

        StringBundler msg = new StringBundler(4);

        msg.append(_NO_SUCH_ENTITY_WITH_KEY);

        msg.append("contestActive=");
        msg.append(contestActive);

        msg.append(StringPool.CLOSE_CURLY_BRACE);

        throw new NoSuchContestException(msg.toString());
    }

    /**
     * Returns the first contest in the ordered set where contestActive = ?.
     *
     * @param contestActive the contest active
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the first matching contest, or null if a matching contest could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public Contest fetchByContestActive_First(boolean contestActive,
        OrderByComparator orderByComparator) throws SystemException {
        List list = findByContestActive(contestActive, 0, 1,
                orderByComparator);

        if (!list.isEmpty()) {
            return list.get(0);
        }

        return null;
    }

    /**
     * Returns the last contest in the ordered set where contestActive = ?.
     *
     * @param contestActive the contest active
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the last matching contest
     * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public Contest findByContestActive_Last(boolean contestActive,
        OrderByComparator orderByComparator)
        throws NoSuchContestException, SystemException {
        Contest contest = fetchByContestActive_Last(contestActive,
                orderByComparator);

        if (contest != null) {
            return contest;
        }

        StringBundler msg = new StringBundler(4);

        msg.append(_NO_SUCH_ENTITY_WITH_KEY);

        msg.append("contestActive=");
        msg.append(contestActive);

        msg.append(StringPool.CLOSE_CURLY_BRACE);

        throw new NoSuchContestException(msg.toString());
    }

    /**
     * Returns the last contest in the ordered set where contestActive = ?.
     *
     * @param contestActive the contest active
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the last matching contest, or null if a matching contest could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public Contest fetchByContestActive_Last(boolean contestActive,
        OrderByComparator orderByComparator) throws SystemException {
        int count = countByContestActive(contestActive);

        if (count == 0) {
            return null;
        }

        List list = findByContestActive(contestActive, count - 1,
                count, orderByComparator);

        if (!list.isEmpty()) {
            return list.get(0);
        }

        return null;
    }

    /**
     * Returns the contests before and after the current contest in the ordered set where contestActive = ?.
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
     *
     * @param ContestPK the primary key of the current contest
     * @param contestActive the contest active
Solution content
     * @throws SystemException if a system exception occurred
     */
    @Override
<<<<<<< HEAD
    public Contest findByContestActivecontestPrivate_First(
        boolean contestActive, boolean contestPrivate,
        OrderByComparator orderByComparator)
        throws NoSuchContestException, SystemException {
        Contest contest = fetchByContestActivecontestPrivate_First(contestActive,
                contestPrivate, orderByComparator);

        if (contest != null) {
            return contest;
        }

        StringBundler msg = new StringBundler(6);

        msg.append(_NO_SUCH_ENTITY_WITH_KEY);

        msg.append("contestActive=");
        msg.append(contestActive);

        msg.append(", contestPrivate=");
        msg.append(contestPrivate);

        msg.append(StringPool.CLOSE_CURLY_BRACE);

        throw new NoSuchContestException(msg.toString());
    }

    /**
     * Returns the first contest in the ordered set where contestActive = ? and contestPrivate = ?.
=======
    public Contest findByContestActive_First(boolean contestActive,
        OrderByComparator orderByComparator)
        throws NoSuchContestException, SystemException {
        Contest contest = fetchByContestActive_First(contestActive,
                orderByComparator);

        if (contest != null) {
            return contest;
        }

        StringBundler msg = new StringBundler(4);

        msg.append(_NO_SUCH_ENTITY_WITH_KEY);

        msg.append("contestActive=");
        msg.append(contestActive);

        msg.append(StringPool.CLOSE_CURLY_BRACE);

        throw new NoSuchContestException(msg.toString());
    }

    /**
     * Returns the first contest in the ordered set where contestActive = ?.
     *
     * @param contestActive the contest active
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the first matching contest, or null if a matching contest could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public Contest fetchByContestActive_First(boolean contestActive,
        OrderByComparator orderByComparator) throws SystemException {
        List list = findByContestActive(contestActive, 0, 1,
                orderByComparator);

        if (!list.isEmpty()) {
            return list.get(0);
        }

        return null;
    }

    /**
     * Returns the last contest in the ordered set where contestActive = ?.
     *
     * @param contestActive the contest active
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the last matching contest
     * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public Contest findByContestActive_Last(boolean contestActive,
        OrderByComparator orderByComparator)
        throws NoSuchContestException, SystemException {
        Contest contest = fetchByContestActive_Last(contestActive,
                orderByComparator);

        if (contest != null) {
            return contest;
        }

        StringBundler msg = new StringBundler(4);

        msg.append(_NO_SUCH_ENTITY_WITH_KEY);

        msg.append("contestActive=");
        msg.append(contestActive);

        msg.append(StringPool.CLOSE_CURLY_BRACE);

        throw new NoSuchContestException(msg.toString());
    }

    /**
     * Returns the last contest in the ordered set where contestActive = ?.
     *
     * @param contestActive the contest active
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the last matching contest, or null if a matching contest could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public Contest fetchByContestActive_Last(boolean contestActive,
        OrderByComparator orderByComparator) throws SystemException {
        int count = countByContestActive(contestActive);

        if (count == 0) {
            return null;
        }

        List list = findByContestActive(contestActive, count - 1,
                count, orderByComparator);

        if (!list.isEmpty()) {
            return list.get(0);
        }

        return null;
    }

    /**
     * Returns the contests before and after the current contest in the ordered set where contestActive = ?.
>>>>>>> copyProposal
     *
     * @param ContestPK the primary key of the current contest
     * @param contestActive the contest active
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Annotation
Comment
Method declaration
Chunk
Conflicting content
     *
                    }
                query.append(_ORDER_BY_ENTITY_ALIAS);
     *
     * @param ContestPK the primary key of the current contest
     * @param contestActive the contest active
<<<<<<< HEAD
     * @param contestPrivate the contest private
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the first matching contest, or null if a matching contest could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public Contest fetchByContestActivecontestPrivate_First(
        boolean contestActive, boolean contestPrivate,
        OrderByComparator orderByComparator) throws SystemException {
        List list = findByContestActivecontestPrivate(contestActive,
                contestPrivate, 0, 1, orderByComparator);

        if (!list.isEmpty()) {
            return list.get(0);
        }

        return null;
    }

    /**
     * Returns the last contest in the ordered set where contestActive = ? and contestPrivate = ?.
     *
     * @param contestActive the contest active
     * @param contestPrivate the contest private
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the last matching contest
     * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public Contest findByContestActivecontestPrivate_Last(
        boolean contestActive, boolean contestPrivate,
        OrderByComparator orderByComparator)
        throws NoSuchContestException, SystemException {
        Contest contest = fetchByContestActivecontestPrivate_Last(contestActive,
                contestPrivate, orderByComparator);

        if (contest != null) {
            return contest;
        }

        StringBundler msg = new StringBundler(6);

        msg.append(_NO_SUCH_ENTITY_WITH_KEY);

        msg.append("contestActive=");
        msg.append(contestActive);

        msg.append(", contestPrivate=");
        msg.append(contestPrivate);

        msg.append(StringPool.CLOSE_CURLY_BRACE);

        throw new NoSuchContestException(msg.toString());
    }

    /**
     * Returns the last contest in the ordered set where contestActive = ? and contestPrivate = ?.
     *
     * @param contestActive the contest active
     * @param contestPrivate the contest private
    /**
                cacheResult(list);
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the last matching contest, or null if a matching contest could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public Contest fetchByContestActivecontestPrivate_Last(
        boolean contestActive, boolean contestPrivate,
        OrderByComparator orderByComparator) throws SystemException {
        int count = countByContestActivecontestPrivate(contestActive,
                contestPrivate);

        if (count == 0) {
            return null;
        }

        List list = findByContestActivecontestPrivate(contestActive,
                contestPrivate, count - 1, count, orderByComparator);

        if (!list.isEmpty()) {
            return list.get(0);
        }

        return null;
    }

    /**
     * Returns the contests before and after the current contest in the ordered set where contestActive = ? and contestPrivate = ?.
     *
     * @param ContestPK the primary key of the current contest
     * @param contestActive the contest active
     * @param contestPrivate the contest private
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the previous, current, and next contest
     * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public Contest[] findByContestActivecontestPrivate_PrevAndNext(
        long ContestPK, boolean contestActive, boolean contestPrivate,
        OrderByComparator orderByComparator)
        throws NoSuchContestException, SystemException {
        Contest contest = findByPrimaryKey(ContestPK);

        Session session = null;

        try {
            session = openSession();

            Contest[] array = new ContestImpl[3];

            array[0] = getByContestActivecontestPrivate_PrevAndNext(session,
                    contest, contestActive, contestPrivate, orderByComparator,
                    true);

            array[1] = contest;

            array[2] = getByContestActivecontestPrivate_PrevAndNext(session,
                    contest, contestActive, contestPrivate, orderByComparator,
                    false);

            return array;
        } catch (Exception e) {
            throw processException(e);
        } finally {
            closeSession(session);
        }
    }

    protected Contest getByContestActivecontestPrivate_PrevAndNext(
        Session session, Contest contest, boolean contestActive,
        boolean contestPrivate, OrderByComparator orderByComparator,
        boolean previous) {
        StringBundler query = null;

        if (orderByComparator != null) {
            query = new StringBundler(6 +
                    (orderByComparator.getOrderByFields().length * 6));
        } else {
            query = new StringBundler(3);
        }

        query.append(_SQL_SELECT_CONTEST_WHERE);

        query.append(_FINDER_COLUMN_CONTESTACTIVECONTESTPRIVATE_CONTESTACTIVE_2);

        query.append(_FINDER_COLUMN_CONTESTACTIVECONTESTPRIVATE_CONTESTPRIVATE_2);

        if (orderByComparator != null) {
            String[] orderByConditionFields = orderByComparator.getOrderByConditionFields();

            if (orderByConditionFields.length > 0) {
                query.append(WHERE_AND);
            }

            for (int i = 0; i < orderByConditionFields.length; i++) {
                query.append(orderByConditionFields[i]);

                if ((i + 1) < orderByConditionFields.length) {
                    if (orderByComparator.isAscending() ^ previous) {
                        query.append(WHERE_GREATER_THAN_HAS_NEXT);
                    } else {
                        query.append(WHERE_LESSER_THAN_HAS_NEXT);
                    }
                } else {
                    if (orderByComparator.isAscending() ^ previous) {
                        query.append(WHERE_GREATER_THAN);
                    } else {
                        query.append(WHERE_LESSER_THAN);
                    }
                }
            }

            query.append(ORDER_BY_CLAUSE);

            String[] orderByFields = orderByComparator.getOrderByFields();

            for (int i = 0; i < orderByFields.length; i++) {
                query.append(_ORDER_BY_ENTITY_ALIAS);
                query.append(orderByFields[i]);

                if ((i + 1) < orderByFields.length) {
                    if (orderByComparator.isAscending() ^ previous) {
                        query.append(ORDER_BY_ASC_HAS_NEXT);
                    } else {
                        query.append(ORDER_BY_DESC_HAS_NEXT);
                    }
                } else {
                    if (orderByComparator.isAscending() ^ previous) {
                        query.append(ORDER_BY_ASC);
                    } else {
                        query.append(ORDER_BY_DESC);
                    }
                }
            }
        } else {
            query.append(ContestModelImpl.ORDER_BY_JPQL);
        }

        String sql = query.toString();

        Query q = session.createQuery(sql);

        q.setFirstResult(0);
        q.setMaxResults(2);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(contestActive);

        qPos.add(contestPrivate);

        if (orderByComparator != null) {
            Object[] values = orderByComparator.getOrderByConditionValues(contest);

            for (Object value : values) {
                qPos.add(value);
            }
        }

        List list = q.list();

        if (list.size() == 2) {
            return list.get(1);
        } else {
            return null;
        }
    }

    /**
     * Removes all the contests where contestActive = ? and contestPrivate = ? from the database.
     *
     * @param contestActive the contest active
     * @param contestPrivate the contest private
     * @throws SystemException if a system exception occurred
     */
    @Override
    public void removeByContestActivecontestPrivate(boolean contestActive,
        boolean contestPrivate) throws SystemException {
        for (Contest contest : findByContestActivecontestPrivate(
                contestActive, contestPrivate, QueryUtil.ALL_POS,
                QueryUtil.ALL_POS, null)) {
            remove(contest);
        }
    }

    /**
     * Returns the number of contests where contestActive = ? and contestPrivate = ?.
     *
     * @param contestActive the contest active
     * @param contestPrivate the contest private
     * @return the number of matching contests
     * @throws SystemException if a system exception occurred
     */
    @Override
    public int countByContestActivecontestPrivate(boolean contestActive,
        boolean contestPrivate) throws SystemException {
        FinderPath finderPath = FINDER_PATH_COUNT_BY_CONTESTACTIVECONTESTPRIVATE;

        Object[] finderArgs = new Object[] { contestActive, contestPrivate };

        Long count = (Long) FinderCacheUtil.getResult(finderPath, finderArgs,
                this);

        if (count == null) {
            StringBundler query = new StringBundler(3);

            query.append(_SQL_COUNT_CONTEST_WHERE);

            query.append(_FINDER_COLUMN_CONTESTACTIVECONTESTPRIVATE_CONTESTACTIVE_2);

            query.append(_FINDER_COLUMN_CONTESTACTIVECONTESTPRIVATE_CONTESTPRIVATE_2);

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                qPos.add(contestActive);

                qPos.add(contestPrivate);

                count = (Long) q.uniqueResult();

                FinderCacheUtil.putResult(finderPath, finderArgs, count);
            } catch (Exception e) {
                FinderCacheUtil.removeResult(finderPath, finderArgs);

                throw processException(e);
            } finally {
                closeSession(session);
            }
        }

        return count.intValue();
    }

    /**
     * Returns all the contests where contestActive = ?.
     *
     * @param contestActive the contest active
     * @return the matching contests
     * @throws SystemException if a system exception occurred
     */
    @Override
    public List findByContestActive(boolean contestActive)
        throws SystemException {
        return findByContestActive(contestActive, QueryUtil.ALL_POS,
            QueryUtil.ALL_POS, null);
    }

    /**
     * Returns a range of all the contests where contestActive = ?.
     *
     * 

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByContestActive(boolean contestActive, int start, int end) throws SystemException { return findByContestActive(contestActive, start, end, null); } /** * Returns an ordered range of all the contests where contestActive = ?. * *

} else { list = (List) QueryUtil.list(q, getDialect(), start, end); } * 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByContestActive(boolean contestActive, int start, int end, OrderByComparator orderByComparator) throws SystemException { boolean pagination = true; FinderPath finderPath = null; Object[] finderArgs = null; if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && (orderByComparator == null)) { pagination = false; finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVE; finderArgs = new Object[] { contestActive }; } else { finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_CONTESTACTIVE; finderArgs = new Object[] { contestActive, start, end, orderByComparator }; } List list = (List) FinderCacheUtil.getResult(finderPath, finderArgs, this); if ((list != null) && !list.isEmpty()) { for (Contest contest : list) { if ((contestActive != contest.getContestActive())) { list = null; break; } } } if (list == null) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(3 + (orderByComparator.getOrderByFields().length * 3)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_CONTESTACTIVE_CONTESTACTIVE_2); if (orderByComparator != null) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator); } else if (pagination) { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); if (!pagination) { list = (List) QueryUtil.list(q, getDialect(), start, end, false); Collections.sort(list); list = new UnmodifiableList(list); FinderCacheUtil.putResult(finderPath, finderArgs, list); } catch (Exception e) { FinderCacheUtil.removeResult(finderPath, finderArgs); throw processException(e); } finally { closeSession(session); } } return list; } /** * Returns the first contest in the ordered set where contestActive = ?. * * @param contestActive the contest active * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByContestActive_First(boolean contestActive, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByContestActive_First(contestActive, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } /** * Returns the first contest in the ordered set where contestActive = ?. * * @param contestActive the contest active * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByContestActive_First(boolean contestActive, OrderByComparator orderByComparator) throws SystemException { List list = findByContestActive(contestActive, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the last contest in the ordered set where contestActive = ?. * * @param contestActive the contest active * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByContestActive_Last(boolean contestActive, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByContestActive_Last(contestActive, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } * Returns the last contest in the ordered set where contestActive = ?. * @param contestActive the contest active * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByContestActive_Last(boolean contestActive, OrderByComparator orderByComparator) throws SystemException { int count = countByContestActive(contestActive); if (count == 0) { return null; } List list = findByContestActive(contestActive, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the contests before and after the current contest in the ordered set where contestActive = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ @Override public Contest[] findByContestActive_PrevAndNext(long ContestPK, boolean contestActive, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = findByPrimaryKey(ContestPK); Session session = null; try { session = openSession(); Contest[] array = new ContestImpl[3]; array[0] = getByContestActive_PrevAndNext(session, contest, contestActive, orderByComparator, true); array[1] = contest; array[2] = getByContestActive_PrevAndNext(session, contest, contestActive, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } } protected Contest getByContestActive_PrevAndNext(Session session, Contest contest, boolean contestActive, OrderByComparator orderByComparator, boolean previous) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(6 + (orderByComparator.getOrderByFields().length * 6)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_CONTESTACTIVE_CONTESTACTIVE_2); if (orderByComparator != null) { String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); if (orderByConditionFields.length > 0) { query.append(WHERE_AND); } for (int i = 0; i < orderByConditionFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByConditionFields[i]); if ((i + 1) < orderByConditionFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN_HAS_NEXT); } else { query.append(WHERE_LESSER_THAN_HAS_NEXT); } else { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN); } else { query.append(WHERE_LESSER_THAN); } } } query.append(ORDER_BY_CLAUSE); String[] orderByFields = orderByComparator.getOrderByFields(); for (int i = 0; i < orderByFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByFields[i]); if ((i + 1) < orderByFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC_HAS_NEXT); } else { query.append(ORDER_BY_DESC_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC); } else { query.append(ORDER_BY_DESC); } } } } else { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Query q = session.createQuery(sql); q.setFirstResult(0); q.setMaxResults(2); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); if (orderByComparator != null) { Object[] values = orderByComparator.getOrderByConditionValues(contest); for (Object value : values) { qPos.add(value); } } List list = q.list(); if (list.size() == 2) { return list.get(1); } else { return null; } } ======= * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ @Override public Contest[] findByContestActive_PrevAndNext(long ContestPK, boolean contestActive, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = findByPrimaryKey(ContestPK); Session session = null; try { session = openSession(); Contest[] array = new ContestImpl[3]; array[0] = getByContestActive_PrevAndNext(session, contest, contestActive, orderByComparator, true); array[1] = contest; array[2] = getByContestActive_PrevAndNext(session, contest, contestActive, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } } protected Contest getByContestActive_PrevAndNext(Session session, Contest contest, boolean contestActive, OrderByComparator orderByComparator, boolean previous) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(6 + (orderByComparator.getOrderByFields().length * 6)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_CONTESTACTIVE_CONTESTACTIVE_2); if (orderByComparator != null) { String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); if (orderByConditionFields.length > 0) { query.append(WHERE_AND); } for (int i = 0; i < orderByConditionFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByConditionFields[i]); if ((i + 1) < orderByConditionFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN_HAS_NEXT); } else { query.append(WHERE_LESSER_THAN_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN); } else { query.append(WHERE_LESSER_THAN); } } } query.append(ORDER_BY_CLAUSE); String[] orderByFields = orderByComparator.getOrderByFields(); for (int i = 0; i < orderByFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByFields[i]); if ((i + 1) < orderByFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC_HAS_NEXT); } else { query.append(ORDER_BY_DESC_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC); } else { query.append(ORDER_BY_DESC); } } } } else { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Query q = session.createQuery(sql); q.setFirstResult(0); q.setMaxResults(2); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); if (orderByComparator != null) { Object[] values = orderByComparator.getOrderByConditionValues(contest); for (Object value : values) { qPos.add(value); } } List list = q.list(); if (list.size() == 2) { return list.get(1); } else { return null; } } >>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b /** * Removes all the contests where contestActive = ? from the database. *
Solution content
    /**
        qPos.add(contestActive);
     *
     * @param ContestPK the primary key of the current contest
     * @param contestActive the contest active
<<<<<<< HEAD
     * @param contestPrivate the contest private
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the first matching contest, or null if a matching contest could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public Contest fetchByContestActivecontestPrivate_First(
        boolean contestActive, boolean contestPrivate,
        OrderByComparator orderByComparator) throws SystemException {
        List list = findByContestActivecontestPrivate(contestActive,
                contestPrivate, 0, 1, orderByComparator);

        if (!list.isEmpty()) {
            return list.get(0);
        }

        return null;
    }

     * Returns the last contest in the ordered set where contestActive = ? and contestPrivate = ?.
     *
     * @param contestActive the contest active
     * @param contestPrivate the contest private
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the last matching contest
     * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public Contest findByContestActivecontestPrivate_Last(
        boolean contestActive, boolean contestPrivate,
        OrderByComparator orderByComparator)
        throws NoSuchContestException, SystemException {
        Contest contest = fetchByContestActivecontestPrivate_Last(contestActive,
     *
                contestPrivate, orderByComparator);

        if (contest != null) {
            return contest;
        }

        StringBundler msg = new StringBundler(6);

        msg.append(_NO_SUCH_ENTITY_WITH_KEY);

        msg.append("contestActive=");
        msg.append(contestActive);

        msg.append(", contestPrivate=");
        msg.append(contestPrivate);

        msg.append(StringPool.CLOSE_CURLY_BRACE);

        throw new NoSuchContestException(msg.toString());
    }

    /**
     * Returns the last contest in the ordered set where contestActive = ? and contestPrivate = ?.
     *
     * @param contestActive the contest active
     * @param contestPrivate the contest private
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the last matching contest, or null if a matching contest could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public Contest fetchByContestActivecontestPrivate_Last(
        boolean contestActive, boolean contestPrivate,
        OrderByComparator orderByComparator) throws SystemException {
        int count = countByContestActivecontestPrivate(contestActive,
                contestPrivate);

        if (count == 0) {
            return null;
        }

        List list = findByContestActivecontestPrivate(contestActive,
                contestPrivate, count - 1, count, orderByComparator);

        if (!list.isEmpty()) {
            return list.get(0);
        }

        return null;
    }

    /**
     * Returns the contests before and after the current contest in the ordered set where contestActive = ? and contestPrivate = ?.
     *
     * @param ContestPK the primary key of the current contest
     * @param contestActive the contest active
     * @param contestPrivate the contest private
     * @param orderByComparator the comparator to order the set by (optionally null)
     * @return the previous, current, and next contest
     * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found
     * @throws SystemException if a system exception occurred
     */
    @Override
    public Contest[] findByContestActivecontestPrivate_PrevAndNext(
        long ContestPK, boolean contestActive, boolean contestPrivate,
        OrderByComparator orderByComparator)
        throws NoSuchContestException, SystemException {
        Contest contest = findByPrimaryKey(ContestPK);

        Session session = null;

        try {
            session = openSession();

            Contest[] array = new ContestImpl[3];

            array[0] = getByContestActivecontestPrivate_PrevAndNext(session,

                    contest, contestActive, contestPrivate, orderByComparator,
                    true);

            array[1] = contest;

            array[2] = getByContestActivecontestPrivate_PrevAndNext(session,
                    contest, contestActive, contestPrivate, orderByComparator,
                    false);

            return array;
        } catch (Exception e) {
            throw processException(e);
        } finally {
            closeSession(session);
        }
    }

    protected Contest getByContestActivecontestPrivate_PrevAndNext(
        Session session, Contest contest, boolean contestActive,
        boolean contestPrivate, OrderByComparator orderByComparator,
        boolean previous) {
        StringBundler query = null;

        if (orderByComparator != null) {
            query = new StringBundler(6 +
                    (orderByComparator.getOrderByFields().length * 6));
        } else {
            query = new StringBundler(3);
        }

        query.append(_SQL_SELECT_CONTEST_WHERE);

        query.append(_FINDER_COLUMN_CONTESTACTIVECONTESTPRIVATE_CONTESTACTIVE_2);

        query.append(_FINDER_COLUMN_CONTESTACTIVECONTESTPRIVATE_CONTESTPRIVATE_2);

        if (orderByComparator != null) {
            String[] orderByConditionFields = orderByComparator.getOrderByConditionFields();

            if (orderByConditionFields.length > 0) {
                query.append(WHERE_AND);
            }

            for (int i = 0; i < orderByConditionFields.length; i++) {
                query.append(_ORDER_BY_ENTITY_ALIAS);
                query.append(orderByConditionFields[i]);

                if ((i + 1) < orderByConditionFields.length) {
                    if (orderByComparator.isAscending() ^ previous) {
                        query.append(WHERE_GREATER_THAN_HAS_NEXT);
                    } else {
                        query.append(WHERE_LESSER_THAN_HAS_NEXT);
                    }
                } else {
                    if (orderByComparator.isAscending() ^ previous) {
                        query.append(WHERE_GREATER_THAN);
                    } else {
                        query.append(WHERE_LESSER_THAN);
                    }
                }
            }

            query.append(ORDER_BY_CLAUSE);

            String[] orderByFields = orderByComparator.getOrderByFields();

            for (int i = 0; i < orderByFields.length; i++) {
                query.append(_ORDER_BY_ENTITY_ALIAS);
                query.append(orderByFields[i]);

                if ((i + 1) < orderByFields.length) {
                    if (orderByComparator.isAscending() ^ previous) {
                        query.append(ORDER_BY_ASC_HAS_NEXT);
                    } else {
                        query.append(ORDER_BY_DESC_HAS_NEXT);
                    }
                } else {
                    if (orderByComparator.isAscending() ^ previous) {
                        query.append(ORDER_BY_ASC);
                    } else {
                        query.append(ORDER_BY_DESC);
                    }
                }
            }
        } else {
            query.append(ContestModelImpl.ORDER_BY_JPQL);
        }

        String sql = query.toString();

        Query q = session.createQuery(sql);

        q.setFirstResult(0);
        q.setMaxResults(2);

        QueryPos qPos = QueryPos.getInstance(q);


        qPos.add(contestPrivate);

        if (orderByComparator != null) {
            Object[] values = orderByComparator.getOrderByConditionValues(contest);

            for (Object value : values) {
                qPos.add(value);
            }
        }

        List list = q.list();

        if (list.size() == 2) {
            return list.get(1);
        } else {
            return null;
        }
    }

    /**
     * Removes all the contests where contestActive = ? and contestPrivate = ? from the database.
     * @param contestActive the contest active
     * @param contestPrivate the contest private
     * @throws SystemException if a system exception occurred
     */
    @Override
    public void removeByContestActivecontestPrivate(boolean contestActive,
        boolean contestPrivate) throws SystemException {
        for (Contest contest : findByContestActivecontestPrivate(
                contestActive, contestPrivate, QueryUtil.ALL_POS,
                QueryUtil.ALL_POS, null)) {
            remove(contest);
        }
    }

    /**
     * Returns the number of contests where contestActive = ? and contestPrivate = ?.
     *
     * @param contestActive the contest active
     * @param contestPrivate the contest private
     * @return the number of matching contests
     * @throws SystemException if a system exception occurred
     */
    @Override
    public int countByContestActivecontestPrivate(boolean contestActive,
        boolean contestPrivate) throws SystemException {
        FinderPath finderPath = FINDER_PATH_COUNT_BY_CONTESTACTIVECONTESTPRIVATE;

        Object[] finderArgs = new Object[] { contestActive, contestPrivate };

        Long count = (Long) FinderCacheUtil.getResult(finderPath, finderArgs,
                this);

        if (count == null) {
            StringBundler query = new StringBundler(3);

            query.append(_SQL_COUNT_CONTEST_WHERE);

            query.append(_FINDER_COLUMN_CONTESTACTIVECONTESTPRIVATE_CONTESTACTIVE_2);

            query.append(_FINDER_COLUMN_CONTESTACTIVECONTESTPRIVATE_CONTESTPRIVATE_2);

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                qPos.add(contestActive);

                qPos.add(contestPrivate);

                count = (Long) q.uniqueResult();

                FinderCacheUtil.putResult(finderPath, finderArgs, count);
            } catch (Exception e) {
                FinderCacheUtil.removeResult(finderPath, finderArgs);

                throw processException(e);
            } finally {
                closeSession(session);
            }
        }

        return count.intValue();
    }

    /**
     * Returns all the contests where contestActive = ?.
     *
     * @param contestActive the contest active
     * @return the matching contests
     * @throws SystemException if a system exception occurred
     */
    @Override
    public List findByContestActive(boolean contestActive)
        throws SystemException {
        return findByContestActive(contestActive, QueryUtil.ALL_POS,
            QueryUtil.ALL_POS, null);
    }

    /**
     * Returns a range of all the contests where contestActive = ?.
     *
     * 

query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_CONTESTACTIVE_CONTESTACTIVE_2); if (orderByComparator != null) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator); } else if (pagination) { query.append(ContestModelImpl.ORDER_BY_JPQL); } * 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByContestActive(boolean contestActive, int start, int end) throws SystemException { return findByContestActive(contestActive, start, end, null); } /** * Returns an ordered range of all the contests where contestActive = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByContestActive(boolean contestActive, int start, int end, OrderByComparator orderByComparator) throws SystemException { boolean pagination = true; FinderPath finderPath = null; Object[] finderArgs = null; if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && (orderByComparator == null)) { pagination = false; finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVE; finderArgs = new Object[] { contestActive }; } else { finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_CONTESTACTIVE; finderArgs = new Object[] { contestActive, start, end, orderByComparator }; } List list = (List) FinderCacheUtil.getResult(finderPath, finderArgs, this); if ((list != null) && !list.isEmpty()) { for (Contest contest : list) { if ((contestActive != contest.getContestActive())) { list = null; break; } } } if (list == null) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(3 + (orderByComparator.getOrderByFields().length * 3)); } else { query = new StringBundler(3); } String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); if (!pagination) { list = (List) QueryUtil.list(q, getDialect(), start, end, false); Collections.sort(list); list = new UnmodifiableList(list); } else { list = (List) QueryUtil.list(q, getDialect(), start, end); } cacheResult(list); FinderCacheUtil.putResult(finderPath, finderArgs, list); } catch (Exception e) { FinderCacheUtil.removeResult(finderPath, finderArgs); throw processException(e); } finally { closeSession(session); } } return list; } /** * Returns the first contest in the ordered set where contestActive = ?. * * @param contestActive the contest active * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByContestActive_First(boolean contestActive, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByContestActive_First(contestActive, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } /** * Returns the first contest in the ordered set where contestActive = ?. * * @param contestActive the contest active * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByContestActive_First(boolean contestActive, OrderByComparator orderByComparator) throws SystemException { List list = findByContestActive(contestActive, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the last contest in the ordered set where contestActive = ?. * * @param contestActive the contest active * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest query = new StringBundler(6 + * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByContestActive_Last(boolean contestActive, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByContestActive_Last(contestActive, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } /** * Returns the last contest in the ordered set where contestActive = ?. * * @param contestActive the contest active * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByContestActive_Last(boolean contestActive, OrderByComparator orderByComparator) throws SystemException { int count = countByContestActive(contestActive); if (count == 0) { return null; } List list = findByContestActive(contestActive, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the contests before and after the current contest in the ordered set where contestActive = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ @Override public Contest[] findByContestActive_PrevAndNext(long ContestPK, boolean contestActive, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = findByPrimaryKey(ContestPK); Session session = null; try { session = openSession(); Contest[] array = new ContestImpl[3]; array[0] = getByContestActive_PrevAndNext(session, contest, contestActive, orderByComparator, true); array[1] = contest; array[2] = getByContestActive_PrevAndNext(session, contest, contestActive, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } } protected Contest getByContestActive_PrevAndNext(Session session, Contest contest, boolean contestActive, OrderByComparator orderByComparator, boolean previous) { StringBundler query = null; if (orderByComparator != null) { (orderByComparator.getOrderByFields().length * 6)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_CONTESTACTIVE_CONTESTACTIVE_2); if (orderByComparator != null) { String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); if (orderByConditionFields.length > 0) { query.append(WHERE_AND); } for (int i = 0; i < orderByConditionFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByConditionFields[i]); if ((i + 1) < orderByConditionFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN_HAS_NEXT); } else { query.append(WHERE_LESSER_THAN_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN); } else { query.append(WHERE_LESSER_THAN); } } } query.append(ORDER_BY_CLAUSE); String[] orderByFields = orderByComparator.getOrderByFields(); for (int i = 0; i < orderByFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByFields[i]); if ((i + 1) < orderByFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC_HAS_NEXT); } else { query.append(ORDER_BY_DESC_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC); } else { query.append(ORDER_BY_DESC); } } } } else { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Query q = session.createQuery(sql); q.setFirstResult(0); q.setMaxResults(2); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); if (orderByComparator != null) { Object[] values = orderByComparator.getOrderByConditionValues(contest); for (Object value : values) { qPos.add(value); } } List list = q.list(); if (list.size() == 2) { return list.get(1); } else { return null; } } ======= * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ @Override public Contest[] findByContestActive_PrevAndNext(long ContestPK, boolean contestActive, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = findByPrimaryKey(ContestPK); Session session = null; try { session = openSession(); Contest[] array = new ContestImpl[3]; array[0] = getByContestActive_PrevAndNext(session, contest, contestActive, orderByComparator, true); array[1] = contest; array[2] = getByContestActive_PrevAndNext(session, contest, contestActive, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } } protected Contest getByContestActive_PrevAndNext(Session session, Contest contest, boolean contestActive, OrderByComparator orderByComparator, boolean previous) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(6 + (orderByComparator.getOrderByFields().length * 6)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_CONTESTACTIVE_CONTESTACTIVE_2); if (orderByComparator != null) { String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); if (orderByConditionFields.length > 0) { query.append(WHERE_AND); } for (int i = 0; i < orderByConditionFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByConditionFields[i]); if ((i + 1) < orderByConditionFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN_HAS_NEXT); } else { query.append(WHERE_LESSER_THAN_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN); } else { query.append(WHERE_LESSER_THAN); } } } query.append(ORDER_BY_CLAUSE); String[] orderByFields = orderByComparator.getOrderByFields(); for (int i = 0; i < orderByFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByFields[i]); if ((i + 1) < orderByFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC_HAS_NEXT); } else { query.append(ORDER_BY_DESC_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC); } else { query.append(ORDER_BY_DESC); } } } } else { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Query q = session.createQuery(sql); q.setFirstResult(0); q.setMaxResults(2); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); if (orderByComparator != null) { Object[] values = orderByComparator.getOrderByConditionValues(contest); for (Object value : values) { qPos.add(value); } } List list = q.list(); if (list.size() == 2) { return list.get(1); } else { return null; } } >>>>>>> copyProposal /** * Removes all the contests where contestActive = ? from the database. *
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Annotation
Comment
Method declaration
Chunk
Conflicting content
                QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
     * 

remove(contest); } <<<<<<< HEAD } /** * Returns the number of contests where contestActive = ?. * * @param contestActive the contest active * @return the number of matching contests * @throws SystemException if a system exception occurred */ @Override public int countByContestActive(boolean contestActive) throws SystemException { FinderPath finderPath = FINDER_PATH_COUNT_BY_CONTESTACTIVE; Object[] finderArgs = new Object[] { contestActive }; Long count = (Long) FinderCacheUtil.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(2); query.append(_SQL_COUNT_CONTEST_WHERE); query.append(_FINDER_COLUMN_CONTESTACTIVE_CONTESTACTIVE_2); String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); count = (Long) q.uniqueResult(); FinderCacheUtil.putResult(finderPath, finderArgs, count); } catch (Exception e) { FinderCacheUtil.removeResult(finderPath, finderArgs); throw processException(e); } finally { closeSession(session); } } return count.intValue(); } /** * Returns all the contests where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @return the matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFeatured(boolean contestActive, boolean featured) throws SystemException { return findByActiveFeatured(contestActive, featured, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); } /** * Returns a range of all the contests where contestActive = ? and featured = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFeatured(boolean contestActive, boolean featured, int start, int end) throws SystemException { return findByActiveFeatured(contestActive, featured, start, end, null); } /** * Returns an ordered range of all the contests where contestActive = ? and featured = ?. * * 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFeatured(boolean contestActive, boolean featured, int start, int end, OrderByComparator orderByComparator) throws SystemException { boolean pagination = true; FinderPath finderPath = null; Object[] finderArgs = null; if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && (orderByComparator == null)) { pagination = false; finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVEFEATURED; finderArgs = new Object[] { contestActive, featured }; } else { finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_ACTIVEFEATURED; finderArgs = new Object[] { contestActive, featured, start, end, orderByComparator }; } List list = (List) FinderCacheUtil.getResult(finderPath, finderArgs, this); if ((list != null) && !list.isEmpty()) { for (Contest contest : list) { if ((contestActive != contest.getContestActive()) || (featured != contest.getFeatured())) { list = null; break; } } } if (list == null) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(4 + (orderByComparator.getOrderByFields().length * 3)); } else { query = new StringBundler(4); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFEATURED_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFEATURED_FEATURED_2); if (orderByComparator != null) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator); } else if (pagination) { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(featured); if (!pagination) { list = (List) QueryUtil.list(q, getDialect(), start, end, false); Collections.sort(list); list = new UnmodifiableList(list); } else { list = (List) QueryUtil.list(q, getDialect(), start, end); } cacheResult(list); FinderCacheUtil.putResult(finderPath, finderArgs, list); } catch (Exception e) { FinderCacheUtil.removeResult(finderPath, finderArgs); throw processException(e); } finally { closeSession(session); } } return list; } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByActiveFeatured_First(boolean contestActive, boolean featured, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByActiveFeatured_First(contestActive, featured, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(", featured="); msg.append(featured); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByActiveFeatured_First(boolean contestActive, boolean featured, OrderByComparator orderByComparator) throws SystemException { List list = findByActiveFeatured(contestActive, featured, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override } else { public Contest findByActiveFeatured_Last(boolean contestActive, boolean featured, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByActiveFeatured_Last(contestActive, featured, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(", featured="); msg.append(featured); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByActiveFeatured_Last(boolean contestActive, boolean featured, OrderByComparator orderByComparator) throws SystemException { int count = countByActiveFeatured(contestActive, featured); if (count == 0) { return null; } List list = findByActiveFeatured(contestActive, featured, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and featured = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ @Override public Contest[] findByActiveFeatured_PrevAndNext(long ContestPK, boolean contestActive, boolean featured, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = findByPrimaryKey(ContestPK); Session session = null; try { session = openSession(); Contest[] array = new ContestImpl[3]; array[0] = getByActiveFeatured_PrevAndNext(session, contest, contestActive, featured, orderByComparator, true); array[1] = contest; array[2] = getByActiveFeatured_PrevAndNext(session, contest, contestActive, featured, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } } protected Contest getByActiveFeatured_PrevAndNext(Session session, Contest contest, boolean contestActive, boolean featured, OrderByComparator orderByComparator, boolean previous) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(6 + (orderByComparator.getOrderByFields().length * 6)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFEATURED_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFEATURED_FEATURED_2); if (orderByComparator != null) { String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); if (orderByConditionFields.length > 0) { query.append(WHERE_AND); } for (int i = 0; i < orderByConditionFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByConditionFields[i]); if ((i + 1) < orderByConditionFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN_HAS_NEXT); } else { query.append(WHERE_LESSER_THAN_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN); } else { query.append(WHERE_LESSER_THAN); } } } query.append(ORDER_BY_CLAUSE); String[] orderByFields = orderByComparator.getOrderByFields(); for (int i = 0; i < orderByFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByFields[i]); if ((i + 1) < orderByFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC_HAS_NEXT); } else { query.append(ORDER_BY_DESC_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC); } else { query.append(ORDER_BY_DESC); } } } } else { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Query q = session.createQuery(sql); q.setFirstResult(0); q.setMaxResults(2); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(featured); if (orderByComparator != null) { Object[] values = orderByComparator.getOrderByConditionValues(contest); for (Object value : values) { qPos.add(value); } } List list = q.list(); if (list.size() == 2) { return list.get(1); } else { return null; } } /** * Removes all the contests where contestActive = ? and featured = ? from the database. * * @param contestActive the contest active * @param featured the featured * @throws SystemException if a system exception occurred */ @Override public void removeByActiveFeatured(boolean contestActive, boolean featured) throws SystemException { for (Contest contest : findByActiveFeatured(contestActive, featured, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(contest); } } /** * Returns the number of contests where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @return the number of matching contests * @throws SystemException if a system exception occurred */ @Override public int countByActiveFeatured(boolean contestActive, boolean featured) throws SystemException { FinderPath finderPath = FINDER_PATH_COUNT_BY_ACTIVEFEATURED; Object[] finderArgs = new Object[] { contestActive, featured }; Long count = (Long) FinderCacheUtil.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(3); query.append(_SQL_COUNT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFEATURED_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFEATURED_FEATURED_2); String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(featured); count = (Long) q.uniqueResult(); FinderCacheUtil.putResult(finderPath, finderArgs, count); } catch (Exception e) { FinderCacheUtil.removeResult(finderPath, finderArgs); throw processException(e); } finally { closeSession(session); } } return count.intValue(); } /** * Returns all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @return the matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate) throws SystemException { return findByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); } /** * Returns a range of all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * *

break; } } } if (list == null) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(5 + (orderByComparator.getOrderByFields().length * 3)); * 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate, int start, int end) throws SystemException { return findByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate, start, end, null); } /** * Returns an ordered range of all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate, int start, int end, OrderByComparator orderByComparator) throws SystemException { boolean pagination = true; FinderPath finderPath = null; Object[] finderArgs = null; if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && (orderByComparator == null)) { pagination = false; finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVEFEATUREDCONTESTPRIVATE; finderArgs = new Object[] { contestActive, featured, contestPrivate }; } else { finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_ACTIVEFEATUREDCONTESTPRIVATE; finderArgs = new Object[] { contestActive, featured, contestPrivate, start, end, orderByComparator }; } List list = (List) FinderCacheUtil.getResult(finderPath, finderArgs, this); if ((list != null) && !list.isEmpty()) { for (Contest contest : list) { if ((contestActive != contest.getContestActive()) || (featured != contest.getFeatured()) || (contestPrivate != contest.getContestPrivate())) { list = null; query = new StringBundler(5); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_FEATURED_2); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_CONTESTPRIVATE_2); if (orderByComparator != null) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator); } else if (pagination) { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(featured); qPos.add(contestPrivate); if (!pagination) { list = (List) QueryUtil.list(q, getDialect(), start, end, false); Collections.sort(list); list = new UnmodifiableList(list); } else { list = (List) QueryUtil.list(q, getDialect(), start, end); } cacheResult(list); FinderCacheUtil.putResult(finderPath, finderArgs, list); } catch (Exception e) { FinderCacheUtil.removeResult(finderPath, finderArgs); throw processException(e); } finally { closeSession(session); } } return list; } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByActiveFeaturedcontestPrivate_First( boolean contestActive, boolean featured, boolean contestPrivate, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByActiveFeaturedcontestPrivate_First(contestActive, featured, contestPrivate, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(8); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(", featured="); msg.append(featured); msg.append(", contestPrivate="); msg.append(contestPrivate); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByActiveFeaturedcontestPrivate_First( boolean contestActive, boolean featured, boolean contestPrivate, OrderByComparator orderByComparator) throws SystemException { List list = findByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByActiveFeaturedcontestPrivate_Last( boolean contestActive, boolean featured, boolean contestPrivate, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByActiveFeaturedcontestPrivate_Last(contestActive, featured, contestPrivate, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(8); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(", featured="); msg.append(featured); msg.append(", contestPrivate="); msg.append(contestPrivate); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByActiveFeaturedcontestPrivate_Last( boolean contestActive, boolean featured, boolean contestPrivate, OrderByComparator orderByComparator) throws SystemException { int count = countByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate); if (count == 0) { return null; } List list = findByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ @Override public Contest[] findByActiveFeaturedcontestPrivate_PrevAndNext( long ContestPK, boolean contestActive, boolean featured, boolean contestPrivate, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = findByPrimaryKey(ContestPK); Session session = null; try { session = openSession(); Contest[] array = new ContestImpl[3]; array[0] = getByActiveFeaturedcontestPrivate_PrevAndNext(session, contest, contestActive, featured, contestPrivate, orderByComparator, true); array[1] = contest; array[2] = getByActiveFeaturedcontestPrivate_PrevAndNext(session, contest, contestActive, featured, contestPrivate, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } } protected Contest getByActiveFeaturedcontestPrivate_PrevAndNext( Session session, Contest contest, boolean contestActive, boolean featured, boolean contestPrivate, OrderByComparator orderByComparator, boolean previous) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(6 + (orderByComparator.getOrderByFields().length * 6)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_FEATURED_2); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_CONTESTPRIVATE_2); if (orderByComparator != null) { String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); if (orderByConditionFields.length > 0) { query.append(WHERE_AND); } for (int i = 0; i < orderByConditionFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByConditionFields[i]); if ((i + 1) < orderByConditionFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN_HAS_NEXT); } else { query.append(WHERE_LESSER_THAN_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN); } else { query.append(WHERE_LESSER_THAN); } } } query.append(ORDER_BY_CLAUSE); String[] orderByFields = orderByComparator.getOrderByFields(); for (int i = 0; i < orderByFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByFields[i]); if ((i + 1) < orderByFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC_HAS_NEXT); } else { query.append(ORDER_BY_DESC_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC); } else { query.append(ORDER_BY_DESC); } } } } else { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Query q = session.createQuery(sql); q.setFirstResult(0); q.setMaxResults(2); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(featured); qPos.add(contestPrivate); if (orderByComparator != null) { Object[] values = orderByComparator.getOrderByConditionValues(contest); for (Object value : values) { qPos.add(value); } } List list = q.list(); if (list.size() == 2) { return list.get(1); } else { return null; } } /** * Removes all the contests where contestActive = ? and featured = ? and contestPrivate = ? from the database. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @throws SystemException if a system exception occurred */ @Override public void removeByActiveFeaturedcontestPrivate(boolean contestActive, boolean featured, boolean contestPrivate) throws SystemException { for (Contest contest : findByActiveFeaturedcontestPrivate( contestActive, featured, contestPrivate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(contest); } } /** * Returns the number of contests where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @return the number of matching contests * @throws SystemException if a system exception occurred */ @Override public int countByActiveFeaturedcontestPrivate(boolean contestActive, boolean featured, boolean contestPrivate) throws SystemException { FinderPath finderPath = FINDER_PATH_COUNT_BY_ACTIVEFEATUREDCONTESTPRIVATE; Object[] finderArgs = new Object[] { contestActive, featured, contestPrivate }; Long count = (Long) FinderCacheUtil.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(4); query.append(_SQL_COUNT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_FEATURED_2); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_CONTESTPRIVATE_2); String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(featured); qPos.add(contestPrivate); count = (Long) q.uniqueResult(); FinderCacheUtil.putResult(finderPath, finderArgs, count); } catch (Exception e) { FinderCacheUtil.removeResult(finderPath, finderArgs); throw processException(e); } finally { closeSession(session); } } return count.intValue(); } /** * Returns all the contests where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @return the matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFlag(boolean contestActive, int flag) throws SystemException { return findByActiveFlag(contestActive, flag, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); } /** * Returns a range of all the contests where contestActive = ? and flag = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param flag the flag * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFlag(boolean contestActive, int flag, int start, int end) throws SystemException { return findByActiveFlag(contestActive, flag, start, end, null); } /** * Returns an ordered range of all the contests where contestActive = ? and flag = ?. * *

list = (List) QueryUtil.list(q, getDialect(), start, end, false); Collections.sort(list); list = new UnmodifiableList(list); } else { * 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param flag the flag * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFlag(boolean contestActive, int flag, int start, int end, OrderByComparator orderByComparator) throws SystemException { boolean pagination = true; FinderPath finderPath = null; Object[] finderArgs = null; if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && (orderByComparator == null)) { pagination = false; finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVEFLAG; finderArgs = new Object[] { contestActive, flag }; } else { finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_ACTIVEFLAG; finderArgs = new Object[] { contestActive, flag, start, end, orderByComparator }; } List list = (List) FinderCacheUtil.getResult(finderPath, finderArgs, this); if ((list != null) && !list.isEmpty()) { for (Contest contest : list) { if ((contestActive != contest.getContestActive()) || (flag != contest.getFlag())) { list = null; break; } } } if (list == null) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(4 + (orderByComparator.getOrderByFields().length * 3)); } else { query = new StringBundler(4); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFLAG_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFLAG_FLAG_2); if (orderByComparator != null) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator); } else if (pagination) { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(flag); if (!pagination) { list = (List) QueryUtil.list(q, getDialect(), start, end); } cacheResult(list); FinderCacheUtil.putResult(finderPath, finderArgs, list); } catch (Exception e) { FinderCacheUtil.removeResult(finderPath, finderArgs); throw processException(e); } finally { closeSession(session); } } return list; } /** * Returns the first contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByActiveFlag_First(boolean contestActive, int flag, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByActiveFlag_First(contestActive, flag, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(", flag="); msg.append(flag); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } /** * Returns the first contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByActiveFlag_First(boolean contestActive, int flag, OrderByComparator orderByComparator) throws SystemException { List list = findByActiveFlag(contestActive, flag, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the last contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByActiveFlag_Last(boolean contestActive, int flag, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByActiveFlag_Last(contestActive, flag, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(", flag="); msg.append(flag); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } /** * Returns the last contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByActiveFlag_Last(boolean contestActive, int flag, OrderByComparator orderByComparator) throws SystemException { int count = countByActiveFlag(contestActive, flag); if (count == 0) { return null; } List list = findByActiveFlag(contestActive, flag, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and flag = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ @Override public Contest[] findByActiveFlag_PrevAndNext(long ContestPK, boolean contestActive, int flag, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = findByPrimaryKey(ContestPK); Session session = null; try { session = openSession(); Contest[] array = new ContestImpl[3]; array[0] = getByActiveFlag_PrevAndNext(session, contest, contestActive, flag, orderByComparator, true); array[1] = contest; array[2] = getByActiveFlag_PrevAndNext(session, contest, contestActive, flag, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } } protected Contest getByActiveFlag_PrevAndNext(Session session, Contest contest, boolean contestActive, int flag, OrderByComparator orderByComparator, boolean previous) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(6 + (orderByComparator.getOrderByFields().length * 6)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFLAG_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFLAG_FLAG_2); if (orderByComparator != null) { String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); if (orderByConditionFields.length > 0) { query.append(WHERE_AND); } for (int i = 0; i < orderByConditionFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByConditionFields[i]); if ((i + 1) < orderByConditionFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN_HAS_NEXT); } else { query.append(WHERE_LESSER_THAN_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN); } else { query.append(WHERE_LESSER_THAN); } } } query.append(ORDER_BY_CLAUSE); String[] orderByFields = orderByComparator.getOrderByFields(); for (int i = 0; i < orderByFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByFields[i]); if ((i + 1) < orderByFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC_HAS_NEXT); } else { query.append(ORDER_BY_DESC_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC); } else { query.append(ORDER_BY_DESC); } } } } else { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Query q = session.createQuery(sql); q.setFirstResult(0); q.setMaxResults(2); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(flag); if (orderByComparator != null) { Object[] values = orderByComparator.getOrderByConditionValues(contest); for (Object value : values) { qPos.add(value); } } List list = q.list(); if (list.size() == 2) { return list.get(1); } else { return null; } } /** * Removes all the contests where contestActive = ? and flag = ? from the database. * * @param contestActive the contest active * @param flag the flag * @throws SystemException if a system exception occurred */ @Override public void removeByActiveFlag(boolean contestActive, int flag) throws SystemException { for (Contest contest : findByActiveFlag(contestActive, flag, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { /** remove(contest); } ======= >>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b }
Solution content
     *
                QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
            remove(contest);
        }
<<<<<<< HEAD
    }

    /**
     * Returns the number of contests where contestActive = ?.
     *
     * @param contestActive the contest active
     * @return the number of matching contests
     * @throws SystemException if a system exception occurred
     */
    @Override
    public int countByContestActive(boolean contestActive)
        throws SystemException {
        FinderPath finderPath = FINDER_PATH_COUNT_BY_CONTESTACTIVE;

        Object[] finderArgs = new Object[] { contestActive };

        Long count = (Long) FinderCacheUtil.getResult(finderPath, finderArgs,
                this);

        if (count == null) {
            StringBundler query = new StringBundler(2);

            query.append(_SQL_COUNT_CONTEST_WHERE);

            query.append(_FINDER_COLUMN_CONTESTACTIVE_CONTESTACTIVE_2);

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                qPos.add(contestActive);

                count = (Long) q.uniqueResult();

                FinderCacheUtil.putResult(finderPath, finderArgs, count);
            } catch (Exception e) {
                FinderCacheUtil.removeResult(finderPath, finderArgs);

                throw processException(e);
            } finally {
                closeSession(session);
            }
        }

        return count.intValue();
    }

    /**
     * Returns all the contests where contestActive = ? and featured = ?.
     * @param contestActive the contest active
     * @param featured the featured
     * @return the matching contests
     * @throws SystemException if a system exception occurred
     */
    @Override
    public List findByActiveFeatured(boolean contestActive,
        boolean featured) throws SystemException {
        return findByActiveFeatured(contestActive, featured, QueryUtil.ALL_POS,
            QueryUtil.ALL_POS, null);
    }

    /**
     * Returns a range of all the contests where contestActive = ? and featured = ?.
     *
     * 

(orderByComparator.getOrderByFields().length * 3)); } else { } * 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFeatured(boolean contestActive, boolean featured, int start, int end) throws SystemException { return findByActiveFeatured(contestActive, featured, start, end, null); } /** * Returns an ordered range of all the contests where contestActive = ? and featured = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFeatured(boolean contestActive, boolean featured, int start, int end, OrderByComparator orderByComparator) throws SystemException { boolean pagination = true; FinderPath finderPath = null; Object[] finderArgs = null; if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && (orderByComparator == null)) { pagination = false; finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVEFEATURED; finderArgs = new Object[] { contestActive, featured }; } else { finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_ACTIVEFEATURED; finderArgs = new Object[] { contestActive, featured, start, end, orderByComparator }; } List list = (List) FinderCacheUtil.getResult(finderPath, finderArgs, this); if ((list != null) && !list.isEmpty()) { for (Contest contest : list) { if ((contestActive != contest.getContestActive()) || (featured != contest.getFeatured())) { list = null; break; } } } if (list == null) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(4 + query = new StringBundler(4); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFEATURED_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFEATURED_FEATURED_2); if (orderByComparator != null) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator); } else if (pagination) { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(featured); if (!pagination) { list = (List) QueryUtil.list(q, getDialect(), start, end, false); Collections.sort(list); list = new UnmodifiableList(list); } else { list = (List) QueryUtil.list(q, getDialect(), start, end); } cacheResult(list); FinderCacheUtil.putResult(finderPath, finderArgs, list); } catch (Exception e) { FinderCacheUtil.removeResult(finderPath, finderArgs); throw processException(e); } finally { closeSession(session); } } return list; } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByActiveFeatured_First(boolean contestActive, boolean featured, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByActiveFeatured_First(contestActive, featured, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(", featured="); msg.append(featured); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByActiveFeatured_First(boolean contestActive, boolean featured, OrderByComparator orderByComparator) throws SystemException { List list = findByActiveFeatured(contestActive, featured, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByActiveFeatured_Last(boolean contestActive, boolean featured, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByActiveFeatured_Last(contestActive, featured, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(", featured="); msg.append(featured); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByActiveFeatured_Last(boolean contestActive, boolean featured, OrderByComparator orderByComparator) throws SystemException { int count = countByActiveFeatured(contestActive, featured); if (count == 0) { return null; } List list = findByActiveFeatured(contestActive, featured, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and featured = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param featured the featured * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ @Override public Contest[] findByActiveFeatured_PrevAndNext(long ContestPK, boolean contestActive, boolean featured, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = findByPrimaryKey(ContestPK); Session session = null; try { session = openSession(); Contest[] array = new ContestImpl[3]; array[0] = getByActiveFeatured_PrevAndNext(session, contest, contestActive, featured, orderByComparator, true); array[1] = contest; array[2] = getByActiveFeatured_PrevAndNext(session, contest, contestActive, featured, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } } protected Contest getByActiveFeatured_PrevAndNext(Session session, Contest contest, boolean contestActive, boolean featured, OrderByComparator orderByComparator, boolean previous) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(6 + (orderByComparator.getOrderByFields().length * 6)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFEATURED_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFEATURED_FEATURED_2); if (orderByComparator != null) { String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); if (orderByConditionFields.length > 0) { query.append(WHERE_AND); } for (int i = 0; i < orderByConditionFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByConditionFields[i]); if ((i + 1) < orderByConditionFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN_HAS_NEXT); } else { query.append(WHERE_LESSER_THAN_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN); } else { query.append(WHERE_LESSER_THAN); } } } query.append(ORDER_BY_CLAUSE); String[] orderByFields = orderByComparator.getOrderByFields(); for (int i = 0; i < orderByFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByFields[i]); if ((i + 1) < orderByFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC_HAS_NEXT); } else { query.append(ORDER_BY_DESC_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC); } else { query.append(ORDER_BY_DESC); } } } } else { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Query q = session.createQuery(sql); q.setFirstResult(0); q.setMaxResults(2); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(featured); if (orderByComparator != null) { Object[] values = orderByComparator.getOrderByConditionValues(contest); for (Object value : values) { qPos.add(value); } } List list = q.list(); if (list.size() == 2) { return list.get(1); } else { return null; } } /** * Removes all the contests where contestActive = ? and featured = ? from the database. * * @param contestActive the contest active * @param featured the featured * @throws SystemException if a system exception occurred */ @Override public void removeByActiveFeatured(boolean contestActive, boolean featured) throws SystemException { for (Contest contest : findByActiveFeatured(contestActive, featured, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(contest); } } /** * Returns the number of contests where contestActive = ? and featured = ?. * * @param contestActive the contest active * @param featured the featured * @return the number of matching contests * @throws SystemException if a system exception occurred */ @Override public int countByActiveFeatured(boolean contestActive, boolean featured) throws SystemException { FinderPath finderPath = FINDER_PATH_COUNT_BY_ACTIVEFEATURED; Object[] finderArgs = new Object[] { contestActive, featured }; Long count = (Long) FinderCacheUtil.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(3); query.append(_SQL_COUNT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFEATURED_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFEATURED_FEATURED_2); String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(featured); count = (Long) q.uniqueResult(); FinderCacheUtil.putResult(finderPath, finderArgs, count); } catch (Exception e) { FinderCacheUtil.removeResult(finderPath, finderArgs); throw processException(e); } finally { closeSession(session); } } return count.intValue(); } /** * Returns all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @return the matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate) throws SystemException { return findByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); } /** * Returns a range of all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate, int start, int end) throws SystemException { return findByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate, start, end, null); } /** * Returns an ordered range of all the contests where contestActive = ? and featured = ? and contestPrivate = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFeaturedcontestPrivate( boolean contestActive, boolean featured, boolean contestPrivate, int start, int end, OrderByComparator orderByComparator) throws SystemException { boolean pagination = true; FinderPath finderPath = null; Object[] finderArgs = null; if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && (orderByComparator == null)) { pagination = false; finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVEFEATUREDCONTESTPRIVATE; finderArgs = new Object[] { contestActive, featured, contestPrivate }; } else { finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_ACTIVEFEATUREDCONTESTPRIVATE; finderArgs = new Object[] { contestActive, featured, contestPrivate, start, end, orderByComparator }; } List list = (List) FinderCacheUtil.getResult(finderPath, finderArgs, this); if ((list != null) && !list.isEmpty()) { for (Contest contest : list) { if ((contestActive != contest.getContestActive()) || (featured != contest.getFeatured()) || (contestPrivate != contest.getContestPrivate())) { list = null; break; } } } if (list == null) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(5 + (orderByComparator.getOrderByFields().length * 3)); } else { query = new StringBundler(5); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_FEATURED_2); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_CONTESTPRIVATE_2); if (orderByComparator != null) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator); } else if (pagination) { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(featured); qPos.add(contestPrivate); if (!pagination) { list = (List) QueryUtil.list(q, getDialect(), start, end, false); Collections.sort(list); list = new UnmodifiableList(list); } else { list = (List) QueryUtil.list(q, getDialect(), start, end); } cacheResult(list); FinderCacheUtil.putResult(finderPath, finderArgs, list); } catch (Exception e) { FinderCacheUtil.removeResult(finderPath, finderArgs); throw processException(e); } finally { closeSession(session); } } return list; } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByActiveFeaturedcontestPrivate_First( boolean contestActive, boolean featured, boolean contestPrivate, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByActiveFeaturedcontestPrivate_First(contestActive, featured, contestPrivate, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(8); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(", featured="); msg.append(featured); msg.append(", contestPrivate="); msg.append(contestPrivate); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } /** * Returns the first contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByActiveFeaturedcontestPrivate_First( boolean contestActive, boolean featured, boolean contestPrivate, OrderByComparator orderByComparator) throws SystemException { List list = findByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByActiveFeaturedcontestPrivate_Last( boolean contestActive, boolean featured, boolean contestPrivate, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByActiveFeaturedcontestPrivate_Last(contestActive, featured, contestPrivate, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(8); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(", featured="); msg.append(featured); msg.append(", contestPrivate="); msg.append(contestPrivate); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } /** * Returns the last contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByActiveFeaturedcontestPrivate_Last( boolean contestActive, boolean featured, boolean contestPrivate, OrderByComparator orderByComparator) throws SystemException { int count = countByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate); if (count == 0) { return null; } List list = findByActiveFeaturedcontestPrivate(contestActive, featured, contestPrivate, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and featured = ? and contestPrivate = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ @Override public Contest[] findByActiveFeaturedcontestPrivate_PrevAndNext( long ContestPK, boolean contestActive, boolean featured, boolean contestPrivate, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = findByPrimaryKey(ContestPK); Session session = null; try { session = openSession(); Contest[] array = new ContestImpl[3]; array[0] = getByActiveFeaturedcontestPrivate_PrevAndNext(session, contest, contestActive, featured, contestPrivate, orderByComparator, true); array[1] = contest; array[2] = getByActiveFeaturedcontestPrivate_PrevAndNext(session, contest, contestActive, featured, contestPrivate, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } } protected Contest getByActiveFeaturedcontestPrivate_PrevAndNext( Session session, Contest contest, boolean contestActive, boolean featured, boolean contestPrivate, OrderByComparator orderByComparator, boolean previous) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(6 + (orderByComparator.getOrderByFields().length * 6)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_FEATURED_2); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_CONTESTPRIVATE_2); if (orderByComparator != null) { String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); if (orderByConditionFields.length > 0) { query.append(WHERE_AND); } for (int i = 0; i < orderByConditionFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByConditionFields[i]); if ((i + 1) < orderByConditionFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN_HAS_NEXT); } else { query.append(WHERE_LESSER_THAN_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN); } else { query.append(WHERE_LESSER_THAN); } } } query.append(ORDER_BY_CLAUSE); String[] orderByFields = orderByComparator.getOrderByFields(); for (int i = 0; i < orderByFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByFields[i]); if ((i + 1) < orderByFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC_HAS_NEXT); } else { query.append(ORDER_BY_DESC_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC); } else { query.append(ORDER_BY_DESC); } } } } else { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Query q = session.createQuery(sql); q.setFirstResult(0); q.setMaxResults(2); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(featured); qPos.add(contestPrivate); if (orderByComparator != null) { Object[] values = orderByComparator.getOrderByConditionValues(contest); for (Object value : values) { qPos.add(value); } } List list = q.list(); if (list.size() == 2) { return list.get(1); } else { return null; } } /** * Removes all the contests where contestActive = ? and featured = ? and contestPrivate = ? from the database. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @throws SystemException if a system exception occurred */ @Override if (orderByComparator != null) { public void removeByActiveFeaturedcontestPrivate(boolean contestActive, boolean featured, boolean contestPrivate) throws SystemException { for (Contest contest : findByActiveFeaturedcontestPrivate( contestActive, featured, contestPrivate, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(contest); } } /** * Returns the number of contests where contestActive = ? and featured = ? and contestPrivate = ?. * * @param contestActive the contest active * @param featured the featured * @param contestPrivate the contest private * @return the number of matching contests * @throws SystemException if a system exception occurred */ @Override public int countByActiveFeaturedcontestPrivate(boolean contestActive, boolean featured, boolean contestPrivate) throws SystemException { FinderPath finderPath = FINDER_PATH_COUNT_BY_ACTIVEFEATUREDCONTESTPRIVATE; Object[] finderArgs = new Object[] { contestActive, featured, contestPrivate }; Long count = (Long) FinderCacheUtil.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(4); query.append(_SQL_COUNT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_FEATURED_2); query.append(_FINDER_COLUMN_ACTIVEFEATUREDCONTESTPRIVATE_CONTESTPRIVATE_2); String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(featured); qPos.add(contestPrivate); count = (Long) q.uniqueResult(); FinderCacheUtil.putResult(finderPath, finderArgs, count); } catch (Exception e) { FinderCacheUtil.removeResult(finderPath, finderArgs); throw processException(e); } finally { closeSession(session); } } return count.intValue(); } /** * Returns all the contests where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @return the matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFlag(boolean contestActive, int flag) throws SystemException { return findByActiveFlag(contestActive, flag, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); } /** * Returns a range of all the contests where contestActive = ? and flag = ?. * *

(orderByComparator.getOrderByFields().length * 3)); } else { query = new StringBundler(4); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFLAG_CONTESTACTIVE_2); * 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param flag the flag * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @return the range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFlag(boolean contestActive, int flag, int start, int end) throws SystemException { return findByActiveFlag(contestActive, flag, start, end, null); } /** * Returns an ordered range of all the contests where contestActive = ? and flag = ?. * *

* 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 {@link com.liferay.portal.kernel.dao.orm.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 {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.ext.portlet.model.impl.ContestModelImpl}. 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. *

* * @param contestActive the contest active * @param flag the flag * @param start the lower bound of the range of contests * @param end the upper bound of the range of contests (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching contests * @throws SystemException if a system exception occurred */ @Override public List findByActiveFlag(boolean contestActive, int flag, int start, int end, OrderByComparator orderByComparator) throws SystemException { boolean pagination = true; FinderPath finderPath = null; Object[] finderArgs = null; if ((start == QueryUtil.ALL_POS) && (end == QueryUtil.ALL_POS) && (orderByComparator == null)) { pagination = false; finderPath = FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ACTIVEFLAG; finderArgs = new Object[] { contestActive, flag }; } else { finderPath = FINDER_PATH_WITH_PAGINATION_FIND_BY_ACTIVEFLAG; finderArgs = new Object[] { contestActive, flag, start, end, orderByComparator }; } msg.append(StringPool.CLOSE_CURLY_BRACE); List list = (List) FinderCacheUtil.getResult(finderPath, finderArgs, this); if ((list != null) && !list.isEmpty()) { for (Contest contest : list) { if ((contestActive != contest.getContestActive()) || (flag != contest.getFlag())) { list = null; break; } } } if (list == null) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(4 + query.append(_FINDER_COLUMN_ACTIVEFLAG_FLAG_2); if (orderByComparator != null) { appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS, orderByComparator); } else if (pagination) { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Session session = null; try { session = openSession(); Query q = session.createQuery(sql); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(flag); if (!pagination) { list = (List) QueryUtil.list(q, getDialect(), start, end, false); Collections.sort(list); list = new UnmodifiableList(list); } else { list = (List) QueryUtil.list(q, getDialect(), start, end); } cacheResult(list); FinderCacheUtil.putResult(finderPath, finderArgs, list); } catch (Exception e) { FinderCacheUtil.removeResult(finderPath, finderArgs); throw processException(e); } finally { closeSession(session); } } return list; } /** * Returns the first contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByActiveFlag_First(boolean contestActive, int flag, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByActiveFlag_First(contestActive, flag, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(", flag="); msg.append(flag); throw new NoSuchContestException(msg.toString()); } /** * Returns the first contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the first matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByActiveFlag_First(boolean contestActive, int flag, OrderByComparator orderByComparator) throws SystemException { List list = findByActiveFlag(contestActive, flag, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the last contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest * @throws com.ext.portlet.NoSuchContestException if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest findByActiveFlag_Last(boolean contestActive, int flag, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = fetchByActiveFlag_Last(contestActive, flag, orderByComparator); if (contest != null) { return contest; } StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("contestActive="); msg.append(contestActive); msg.append(", flag="); msg.append(flag); msg.append(StringPool.CLOSE_CURLY_BRACE); throw new NoSuchContestException(msg.toString()); } /** * Returns the last contest in the ordered set where contestActive = ? and flag = ?. * * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the last matching contest, or null if a matching contest could not be found * @throws SystemException if a system exception occurred */ @Override public Contest fetchByActiveFlag_Last(boolean contestActive, int flag, OrderByComparator orderByComparator) throws SystemException { int count = countByActiveFlag(contestActive, flag); if (count == 0) { return null; } List list = findByActiveFlag(contestActive, flag, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; } /** * Returns the contests before and after the current contest in the ordered set where contestActive = ? and flag = ?. * * @param ContestPK the primary key of the current contest * @param contestActive the contest active * @param flag the flag * @param orderByComparator the comparator to order the set by (optionally null) * @return the previous, current, and next contest * @throws com.ext.portlet.NoSuchContestException if a contest with the primary key could not be found * @throws SystemException if a system exception occurred */ @Override public Contest[] findByActiveFlag_PrevAndNext(long ContestPK, boolean contestActive, int flag, OrderByComparator orderByComparator) throws NoSuchContestException, SystemException { Contest contest = findByPrimaryKey(ContestPK); Session session = null; try { session = openSession(); Contest[] array = new ContestImpl[3]; array[0] = getByActiveFlag_PrevAndNext(session, contest, contestActive, flag, orderByComparator, true); array[1] = contest; array[2] = getByActiveFlag_PrevAndNext(session, contest, contestActive, flag, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } } protected Contest getByActiveFlag_PrevAndNext(Session session, Contest contest, boolean contestActive, int flag, OrderByComparator orderByComparator, boolean previous) { StringBundler query = null; if (orderByComparator != null) { query = new StringBundler(6 + (orderByComparator.getOrderByFields().length * 6)); } else { query = new StringBundler(3); } query.append(_SQL_SELECT_CONTEST_WHERE); query.append(_FINDER_COLUMN_ACTIVEFLAG_CONTESTACTIVE_2); query.append(_FINDER_COLUMN_ACTIVEFLAG_FLAG_2); if (orderByComparator != null) { String[] orderByConditionFields = orderByComparator.getOrderByConditionFields(); if (orderByConditionFields.length > 0) { query.append(WHERE_AND); } for (int i = 0; i < orderByConditionFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByConditionFields[i]); if ((i + 1) < orderByConditionFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN_HAS_NEXT); } else { query.append(WHERE_LESSER_THAN_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(WHERE_GREATER_THAN); } else { query.append(WHERE_LESSER_THAN); } } } query.append(ORDER_BY_CLAUSE); String[] orderByFields = orderByComparator.getOrderByFields(); for (int i = 0; i < orderByFields.length; i++) { query.append(_ORDER_BY_ENTITY_ALIAS); query.append(orderByFields[i]); if ((i + 1) < orderByFields.length) { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC_HAS_NEXT); } else { query.append(ORDER_BY_DESC_HAS_NEXT); } } else { if (orderByComparator.isAscending() ^ previous) { query.append(ORDER_BY_ASC); } else { query.append(ORDER_BY_DESC); } } } } else { query.append(ContestModelImpl.ORDER_BY_JPQL); } String sql = query.toString(); Query q = session.createQuery(sql); q.setFirstResult(0); q.setMaxResults(2); QueryPos qPos = QueryPos.getInstance(q); qPos.add(contestActive); qPos.add(flag); Object[] values = orderByComparator.getOrderByConditionValues(contest); for (Object value : values) { qPos.add(value); } } List list = q.list(); if (list.size() == 2) { return list.get(1); } else { return null; } } /** * Removes all the contests where contestActive = ? and flag = ? from the database. * * @param contestActive the contest active * @param flag the flag * @throws SystemException if a system exception occurred */ @Override public void removeByActiveFlag(boolean contestActive, int flag) throws SystemException { for (Contest contest : findByActiveFlag(contestActive, flag, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(contest); } ======= >>>>>>> copyProposal } /**
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Annotation
Comment
For statement
Method declaration
Method signature
Chunk
Conflicting content
     * @throws SystemException if a system exception occurred
     */
    @Override
<<<<<<< HEAD
    public int countByActiveFlag(boolean contestActive, int flag)
=======
    public int countByContestActive(boolean contestActive)
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
        throws SystemException {
        FinderPath finderPath = FINDER_PATH_COUNT_BY_ACTIVEFLAG;
Solution content
     * @throws SystemException if a system exception occurred
     */
    @Override
<<<<<<< HEAD
    public int countByActiveFlag(boolean contestActive, int flag)
=======
    public int countByContestActive(boolean contestActive)
>>>>>>> copyProposal
        throws SystemException {
        FinderPath finderPath = FINDER_PATH_COUNT_BY_ACTIVEFLAG;
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
Method signature
Chunk
Conflicting content
            }

            if ((contestModelImpl.getColumnBitmask() &
<<<<<<< HEAD
                    FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVECONTESTPRIVATE.getColumnBitmask()) != 0) {
                Object[] args = new Object[] {
                        contestModelImpl.getOriginalContestActive(),
                        contestModelImpl.getOriginalContestPrivate()
                    };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CONTESTACTIVECONTESTPRIVATE,
                    args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVECONTESTPRIVATE,
                    args);

                args = new Object[] {
                        contestModelImpl.getContestActive(),
                        contestModelImpl.getContestPrivate()
                    };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CONTESTACTIVECONTESTPRIVATE,
                    args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVECONTESTPRIVATE,
                    args);
            }

            if ((contestModelImpl.getColumnBitmask() &
=======
>>>>>>> bab262a1fc6af94ffa98bccaed7bada1bb26df8b
                    FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVE.getColumnBitmask()) != 0) {
                Object[] args = new Object[] {
                        contestModelImpl.getOriginalContestActive()
Solution content
            }

            if ((contestModelImpl.getColumnBitmask() &
<<<<<<< HEAD
                    FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVECONTESTPRIVATE.getColumnBitmask()) != 0) {
                Object[] args = new Object[] {
                        contestModelImpl.getOriginalContestActive(),
                        contestModelImpl.getOriginalContestPrivate()
                    };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CONTESTACTIVECONTESTPRIVATE,
                    args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVECONTESTPRIVATE,
                    args);

                args = new Object[] {
                        contestModelImpl.getContestActive(),
                        contestModelImpl.getContestPrivate()
                    };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_CONTESTACTIVECONTESTPRIVATE,
                    args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVECONTESTPRIVATE,
                    args);
            }

            if ((contestModelImpl.getColumnBitmask() &
=======
>>>>>>> copyProposal
                    FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_CONTESTACTIVE.getColumnBitmask()) != 0) {
                Object[] args = new Object[] {
                        contestModelImpl.getOriginalContestActive()
File
ContestPersistenceImpl.java
Developer's decision
Manual
Kind of conflict
If statement
Method invocation
Variable