author | František Kučera <franta-hg@frantovo.cz> |
Fri, 18 Nov 2011 22:07:46 +0100 | |
changeset 199 | 2af6fa1a1833 |
parent 198 | 3464334db89a |
child 201 | c2caffa729fc |
permissions | -rw-r--r-- |
franta-hg@127 | 1 |
package cz.frantovo.nekurak.dto; |
franta-hg@127 | 2 |
|
franta-hg@127 | 3 |
import java.util.Date; |
franta-hg@127 | 4 |
|
franta-hg@127 | 5 |
/** |
franta-hg@127 | 6 |
* Komentář k podniku |
franta-hg@127 | 7 |
* @author fiki |
franta-hg@127 | 8 |
*/ |
franta-hg@127 | 9 |
public class Komentar { |
franta-hg@127 | 10 |
|
franta-hg@145 | 11 |
private int id; |
franta-hg@145 | 12 |
private int podnik; |
franta-hg@145 | 13 |
private String uzivatel; |
franta-hg@145 | 14 |
private Date datum; |
franta-hg@145 | 15 |
private String nadpis; |
franta-hg@145 | 16 |
private String komentar; |
franta-hg@145 | 17 |
private TYP typ; |
franta-hg@130 | 18 |
|
franta-hg@145 | 19 |
public TYP getTyp() { |
franta-hg@145 | 20 |
return typ; |
franta-hg@145 | 21 |
} |
franta-hg@130 | 22 |
|
franta-hg@145 | 23 |
public void setTyp(TYP typ) { |
franta-hg@145 | 24 |
this.typ = typ; |
franta-hg@145 | 25 |
} |
franta-hg@130 | 26 |
|
franta-hg@145 | 27 |
public enum TYP { |
franta-hg@127 | 28 |
|
franta-hg@145 | 29 |
PROSTY_TEXT, |
franta-hg@145 | 30 |
XHTML, |
franta-hg@197 | 31 |
MARKDOWN, |
franta-hg@145 | 32 |
TEXY |
franta-hg@145 | 33 |
} |
franta-hg@127 | 34 |
|
franta-hg@145 | 35 |
public int getId() { |
franta-hg@145 | 36 |
return id; |
franta-hg@145 | 37 |
} |
franta-hg@127 | 38 |
|
franta-hg@145 | 39 |
public void setId(int id) { |
franta-hg@145 | 40 |
this.id = id; |
franta-hg@145 | 41 |
} |
franta-hg@127 | 42 |
|
franta-hg@145 | 43 |
public int getPodnik() { |
franta-hg@145 | 44 |
return podnik; |
franta-hg@145 | 45 |
} |
franta-hg@127 | 46 |
|
franta-hg@145 | 47 |
public void setPodnik(int podnik) { |
franta-hg@145 | 48 |
this.podnik = podnik; |
franta-hg@145 | 49 |
} |
franta-hg@127 | 50 |
|
franta-hg@145 | 51 |
public String getUzivatel() { |
franta-hg@145 | 52 |
return uzivatel; |
franta-hg@145 | 53 |
} |
franta-hg@127 | 54 |
|
franta-hg@145 | 55 |
public void setUzivatel(String uzivatel) { |
franta-hg@145 | 56 |
this.uzivatel = uzivatel; |
franta-hg@145 | 57 |
} |
franta-hg@127 | 58 |
|
franta-hg@145 | 59 |
public Date getDatum() { |
franta-hg@145 | 60 |
return datum; |
franta-hg@145 | 61 |
} |
franta-hg@127 | 62 |
|
franta-hg@145 | 63 |
public void setDatum(Date datum) { |
franta-hg@145 | 64 |
this.datum = datum; |
franta-hg@145 | 65 |
} |
franta-hg@127 | 66 |
|
franta-hg@145 | 67 |
public String getNadpis() { |
franta-hg@145 | 68 |
return nadpis; |
franta-hg@145 | 69 |
} |
franta-hg@127 | 70 |
|
franta-hg@145 | 71 |
public void setNadpis(String nadpis) { |
franta-hg@145 | 72 |
this.nadpis = nadpis; |
franta-hg@145 | 73 |
} |
franta-hg@127 | 74 |
|
franta-hg@145 | 75 |
public String getKomentar() { |
franta-hg@145 | 76 |
return komentar; |
franta-hg@145 | 77 |
} |
franta-hg@145 | 78 |
|
franta-hg@145 | 79 |
public void setKomentar(String komentar) { |
franta-hg@145 | 80 |
this.komentar = komentar; |
franta-hg@145 | 81 |
} |
franta-hg@198 | 82 |
|
franta-hg@198 | 83 |
/** |
franta-hg@198 | 84 |
* Zjišťujeme, zda uživatel nezapomněl na háčky a čárky. |
franta-hg@198 | 85 |
* @return true, pokud text komentáře nebo předmět obsahují alespoň jeden znak s diakritikou |
franta-hg@198 | 86 |
*/ |
franta-hg@198 | 87 |
public boolean isČeština() { |
franta-hg@198 | 88 |
return (komentar + nadpis).matches(".*(ě|š|č|ř|ž|ý|á|í|é|ú|ů|ť|ď).*"); |
franta-hg@198 | 89 |
} |
franta-hg@127 | 90 |
} |