01: /*
02: * MyGWT Widget Library
03: * Copyright(c) 2007, MyGWT.
04: * licensing@mygwt.net
05: *
06: * http://mygwt.net/license
07: */
08: package net.mygwt.samples.resources.client;
09:
10: import net.mygwt.ui.client.data.Model;
11:
12: public class Music extends Model {
13:
14: public Music() {
15:
16: }
17:
18: public Music(String name) {
19: set("name", name);
20: }
21:
22: public Music(String name, String author, String genre) {
23: set("name", name);
24: set("author", author);
25: set("genre", genre);
26: }
27:
28: public String getName() {
29: return getAsString("name");
30: }
31:
32: public String getAuthor() {
33: return getAsString("author");
34: }
35:
36: public String getGenre() {
37: return getAsString("genre");
38: }
39:
40: public String toString() {
41: return getName();
42: }
43: }
|