BrightSide Workbench Full Report + Source Code
org.turro.students.model.ChallengesVM Class Reference

Public Member Functions

 ChallengesVM ()
 
void update ()
 
List< ChallengegetModel ()
 
String getSearchValue ()
 
void setSearchValue (String searchValue)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 35 of file ChallengesVM.java.

Constructor & Destructor Documentation

◆ ChallengesVM()

org.turro.students.model.ChallengesVM.ChallengesVM ( )

Definition at line 39 of file ChallengesVM.java.

39  {
40  }

Member Function Documentation

◆ getModel()

List<Challenge> org.turro.students.model.ChallengesVM.getModel ( )

Definition at line 46 of file ChallengesVM.java.

46  {
47  WhereClause wc = new WhereClause();
48  wc.addClause("select s from Challenge s");
49  wc.addClause("where 1=1");
50  if(!Strings.isBlank(searchValue)) {
51  wc.addClause("and s.question like :searchValue");
52  wc.addNamedValue("searchValue", SQLHelper.convertToPartialLike(searchValue));
53  }
54  wc.addClause("order by s.creation desc");
55 
56  return getDao().getResultList(wc);
57  }
Here is the call graph for this function:

◆ getSearchValue()

String org.turro.students.model.ChallengesVM.getSearchValue ( )

Definition at line 59 of file ChallengesVM.java.

59  {
60  return searchValue;
61  }

◆ setSearchValue()

void org.turro.students.model.ChallengesVM.setSearchValue ( String  searchValue)

Definition at line 63 of file ChallengesVM.java.

63  {
64  this.searchValue = searchValue;
65  }

◆ update()

void org.turro.students.model.ChallengesVM.update ( )

Definition at line 44 of file ChallengesVM.java.

44 {}

The documentation for this class was generated from the following file: