Package sk.iway.iwcm.qa
Class QADB
java.lang.Object
sk.iway.iwcm.qa.QADB
praca z databazou otazok a odpovedi
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringaddQuestion(QABean qa, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) static booleanstatic booleanstatic StringexecuteAnswer(QABean qa, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) filterQaByGroups(List<QABean> original, Collection<LabelValueDetails> groups) Vyfiltruje QA beany podla danych skupin, vrati tie tkore do danych skupin patriaprotected static intgetNewPriority(String groupName) Vrati novu prioritu pre qa pre danu grupu, najde doteraz najvyssiu + 10static QABeangetQA(javax.servlet.http.HttpServletRequest request) Ziska QABean pre admin cast (zadanie odpovede)static QABeangetQAById(int questionId) getQAList(String groupName, boolean onlyForWeb, boolean ascending, javax.servlet.http.HttpServletRequest request) getQAList(String groupName, boolean onlyForWeb, int orderType, boolean ascending, int startPage, int pageSize, javax.servlet.http.HttpServletRequest request) getQAList(String groupName, boolean onlyForWeb, int orderType, boolean ascending, int startPage, int pageSize, javax.servlet.http.HttpServletRequest request, String categoryName, String fullTextSearchString) getQAList(String groupName, boolean onlyForWeb, int orderType, boolean ascending, javax.servlet.http.HttpServletRequest request) getQAList(String groupName, boolean onlyForWeb, int orderType, boolean ascending, javax.servlet.http.HttpServletRequest request, String categoryName, String fullTextSearchString) Vrati zoznam otazok a odpovedi v danej skupinestatic intgetQAListSize(String groupName, boolean onlyForWeb, javax.servlet.http.HttpServletRequest request) Vrati pocet otazok a odpovedi v danej skupinestatic intgetQAListSize(String groupName, boolean onlyForWeb, javax.servlet.http.HttpServletRequest request, String categoryName, String fullTextSearchString) Vrati pocet otazok a odpovedi v danej skupinestatic List<LabelValueDetails>getQARoots(javax.servlet.http.HttpServletRequest request) static booleanDescription of the Methodstatic booleansendAdminMail(QABean qa, javax.servlet.http.HttpServletRequest request)
-
Field Details
-
ORDER_DATE
public static final int ORDER_DATE- See Also:
-
ORDER_PRIORITY
public static final int ORDER_PRIORITY- See Also:
-
-
Constructor Details
-
QADB
protected QADB()
-
-
Method Details
-
getQAList
-
getQAList
-
getQAList
-
getQAList
-
filterQaByGroups
public static List<QABean> filterQaByGroups(List<QABean> original, Collection<LabelValueDetails> groups) Vyfiltruje QA beany podla danych skupin, vrati tie tkore do danych skupin patria- Parameters:
original-groups-- Returns:
-
getQAList
public static List<QABean> getQAList(String groupName, boolean onlyForWeb, int orderType, boolean ascending, javax.servlet.http.HttpServletRequest request, String categoryName, String fullTextSearchString) Vrati zoznam otazok a odpovedi v danej skupine- Parameters:
groupName- - nazov skupinyonlyForWeb- - ak true, iba tie co su urcene na weborderType- - sposob usporiadaniaascending- - ak true, tak usporiada ASCrequest-categoryName- - kategoriafullTextSearchString- - tento text hlada v question a answer- Returns:
- - zoznam otazok a odpovedi
-
getQAListSize
public static int getQAListSize(String groupName, boolean onlyForWeb, javax.servlet.http.HttpServletRequest request) Vrati pocet otazok a odpovedi v danej skupine- Parameters:
groupName- - nazov skupinyonlyForWeb- - ak true spocita len tie, ktore su urcene na webrequest-- Returns:
-
getQAListSize
public static int getQAListSize(String groupName, boolean onlyForWeb, javax.servlet.http.HttpServletRequest request, String categoryName, String fullTextSearchString) Vrati pocet otazok a odpovedi v danej skupine- Parameters:
groupName- - nazov skupinyonlyForWeb- - ak true spocita len tie, ktore su urcene na webrequest-categoryName- - kategoriafullTextSearchString- - tento text hlada v question a answer- Returns:
-
getQARoots
-
getQAById
-
getQA
Ziska QABean pre admin cast (zadanie odpovede)- Parameters:
request-- Returns:
-
save
Description of the Method- Parameters:
qa- Description of the Parameterrequest- Description of the Parameter- Returns:
- Description of the Return Value
-
answer
-
delete
-
getNewPriority
Vrati novu prioritu pre qa pre danu grupu, najde doteraz najvyssiu + 10- Parameters:
groupName- groupName- Returns:
-
addQuestion
public static String addQuestion(QABean qa, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException - Throws:
IOExceptionjavax.servlet.ServletException
-
executeAnswer
public static String executeAnswer(QABean qa, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException - Throws:
IOExceptionjavax.servlet.ServletException
-
sendAdminMail
-