comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/CollectionRecord.java @ 3:9cf5a40b62c7

Added an interface and a default implementation of a Collection. flys-client/trunk@1311 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 10 Feb 2011 14:45:14 +0000
parents
children 0bec0112c8b3
comparison
equal deleted inserted replaced
2:bc5d4d2297b9 3:9cf5a40b62c7
1 package de.intevation.flys.client.shared.model;
2
3 import java.util.Date;
4
5 import com.smartgwt.client.widgets.grid.ListGridRecord;
6
7
8 /**
9 * The CollectionRecord is a wrapper to put Collection objects into a ListGrid.
10 *
11 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
12 */
13 public class CollectionRecord extends ListGridRecord {
14
15 /** The artifact collection. */
16 protected Collection collection;
17
18
19 /**
20 * The default constructor.
21 *
22 * @param collection The artifact collection.
23 */
24 public CollectionRecord(Collection collection) {
25 this.collection = collection;
26 }
27
28
29 /**
30 * Returns the date of the last modification.
31 *
32 * @return the last modification date.
33 */
34 public Date getDate() {
35 return collection.getLastAccess();
36 }
37
38
39 /**
40 * Returns the name of the collection.
41 *
42 * @return the name of the collection.
43 */
44 public String getName() {
45 return collection.getName();
46 }
47 }
48 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org