java/nekurak.net-lib/src/cz/frantovo/nekurak/xml/ClanekXML.java
author František Kučera <franta-hg@frantovo.cz>
Sun Aug 15 22:20:10 2010 +0200 (2010-08-15)
changeset 151 d7b5099bf65e
parent 96 9f6225d83611
permissions -rw-r--r--
chat
     1 package cz.frantovo.nekurak.xml;
     2 
     3 import cz.frantovo.nekurak.dto.Clanek;
     4 import javax.xml.bind.annotation.XmlElement;
     5 import javax.xml.bind.annotation.XmlRootElement;
     6 
     7 /**
     8  * Převaděč do XML
     9  * @author fiki
    10  */
    11 @XmlRootElement(name = "clanek")
    12 public class ClanekXML {
    13 
    14 	private Clanek clanek;
    15 
    16 	public ClanekXML() {
    17 		clanek = new Clanek();
    18 	}
    19 
    20 	public ClanekXML(Clanek clanek) {
    21 		this.clanek = clanek;
    22 	}
    23 
    24 	@XmlElement
    25 	public int getId() {
    26 		return clanek.getId();
    27 	}
    28 
    29 	public void setId(int id) {
    30 		clanek.setId(id);
    31 	}
    32 
    33 	@XmlElement
    34 	public String getNadpis() {
    35 		return clanek.getNadpis();
    36 	}
    37 
    38 	public void setNadpis(String nadpis) {
    39 		clanek.setNadpis(nadpis);
    40 	}
    41 
    42 	@XmlElement
    43 	public String getText() {
    44 		return clanek.getText();
    45 	}
    46 
    47 	public void setText(String text) {
    48 		clanek.setText(text);
    49 	}
    50 
    51 	public Clanek getClanek() {
    52 		return clanek;
    53 	}
    54 }