01: /*
02: * Copyright (c) 2001 - 2005 ivata limited.
03: * All rights reserved.
04: * -----------------------------------------------------------------------------
05: * ivata masks may be redistributed under the GNU General Public
06: * License as published by the Free Software Foundation;
07: * version 2 of the License.
08: *
09: * These programs are free software; you can redistribute them and/or
10: * modify them under the terms of the GNU General Public License
11: * as published by the Free Software Foundation; version 2 of the License.
12: *
13: * These programs are distributed in the hope that they will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16: *
17: * See the GNU General Public License in the file LICENSE.txt for more
18: * details.
19: *
20: * If you would like a copy of the GNU General Public License write to
21: *
22: * Free Software Foundation, Inc.
23: * 59 Temple Place - Suite 330
24: * Boston, MA 02111-1307, USA.
25: *
26: *
27: * To arrange commercial support and licensing, contact ivata at
28: * http://www.ivata.com/contact.jsp
29: * -----------------------------------------------------------------------------
30: * $Log: ValueObject.java,v $
31: * Revision 1.3 2005/04/09 18:04:16 colinmacleod
32: * Changed copyright text to GPL v2 explicitly.
33: *
34: * Revision 1.2 2005/01/06 22:13:22 colinmacleod
35: * Moved up a version number.
36: * Changed copyright notices to 2005.
37: * Updated the documentation:
38: * - started working on multiproject:site docu.
39: * - changed the logo.
40: * Added checkstyle and fixed LOADS of style issues.
41: * Added separate thirdparty subproject.
42: * Added struts (in web), util and webgui (in webtheme) from ivata op.
43: *
44: * Revision 1.1 2004/12/29 20:07:08 colinmacleod
45: * Renamed subproject masks to mask.
46: *
47: * Revision 1.2 2004/11/11 13:33:42 colinmacleod
48: * Added getDisplayValue().
49: *
50: * Revision 1.1.1.1 2004/05/16 20:40:32 colinmacleod
51: * Ready for 0.1 release
52: * -----------------------------------------------------------------------------
53: */
54: package com.ivata.mask.valueobject;
55:
56: import java.io.Serializable;
57:
58: /**
59: * <p>
60: * For the purposes of <strong>ivata masks</strong>, a value object or data
61: * object (we use the two synonymously) defines any object which may be
62: * listed, edited, displayed or persisted by the system.
63: * </p>
64: *
65: * <p>
66: * Classic examples are the kinds of 'noun' of a problem domain, such as the
67: * <i>order</i>, <i>order item</i>, <i>product</i> and <i>customer</i> value
68: * objects in the <a href='http://demo.masks.ivata.org'>demo application</a>.
69: * </p>
70: *
71: * <p>
72: * All <strong>ivata masks</strong> value objects implement this interface.
73: * </p>
74: *
75: * @author Colin MacLeod
76: * <a href='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
77: * @since ivata masks 0.4 (2004-05-10)
78: * @version $Revision: 1.3 $
79: */
80: public interface ValueObject extends Serializable {
81: /**
82: * <p>
83: * Identifies this value object uniquely. This value may only be
84: * <code>null</code> for a new value object.
85: * </p>
86: *
87: * @return unique identifier for this value object.
88: */
89: String getIdString();
90:
91: /**
92: * <p>
93: * Get the string representation of this value object to show to the user.
94: * </p>
95: *
96: * @return valid string representation.
97: */
98: String getDisplayValue();
99: }
|