java/nekurak.net-lib/src/cz/frantovo/nekurak/xml/ClanekXML.java
author František Kučera <franta-hg@frantovo.cz>
Tue Apr 06 00:50:30 2010 +0200 (2010-04-06)
changeset 94 ac4a5fc868eb
parent 78 77d86ffbf55b
child 96 9f6225d83611
permissions -rw-r--r--
REST: mazání
     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     }
    18 
    19     public ClanekXML(Clanek clanek) {
    20 	this.clanek = clanek;
    21     }
    22 
    23     @XmlElement
    24     public int getId() {
    25 	return clanek.getId();
    26     }
    27 
    28     public void setId(int id) {
    29 	clanek.setId(id);
    30     }
    31 
    32     @XmlElement
    33     public String getNadpis() {
    34 	return clanek.getNadpis();
    35     }
    36 
    37     public void setNadpis(String nadpis) {
    38 	clanek.setNadpis(nadpis);
    39     }
    40 
    41     @XmlElement
    42     public String getText() {
    43 	return clanek.getText();
    44     }
    45 
    46     public void setText(String text) {
    47 	clanek.setText(text);
    48     }
    49 }