01: /* ====================================================================
02: *
03: * L2FProd.com Common Components 7.3 License.
04: *
05: * Copyright (c) 2005-2007 L2FProd.com. All rights reserved.
06: *
07: * Redistribution and use in source and binary forms, with or without
08: * modification, are permitted provided that the following conditions
09: * are met:
10: *
11: * 1. Redistributions of source code must retain the above copyright
12: * notice, this list of conditions and the following disclaimer.
13: *
14: * 2. Redistributions in binary form must reproduce the above copyright
15: * notice, this list of conditions and the following disclaimer in
16: * the documentation and/or other materials provided with the
17: * distribution.
18: *
19: * 3. The end-user documentation included with the redistribution, if
20: * any, must include the following acknowlegement:
21: * "This product includes software developed by L2FProd.com
22: * (http://www.L2FProd.com/)."
23: * Alternately, this acknowlegement may appear in the software itself,
24: * if and wherever such third-party acknowlegements normally appear.
25: *
26: * 4. The names "L2FProd.com Common Components", "l2fprod-common" and "L2FProd.com" must not
27: * be used to endorse or promote products derived from this software
28: * without prior written permission. For written permission, please
29: * contact info@L2FProd.com.
30: *
31: * 5. Products derived from this software may not be called "l2fprod-common"
32: * nor may "l2fprod-common" appear in their names without prior written
33: * permission of L2FProd.com.
34: *
35: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
36: * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
37: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
38: * DISCLAIMED. IN NO EVENT SHALL L2FPROD.COM OR ITS CONTRIBUTORS BE
39: * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
40: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
41: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
42: * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
43: * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
44: * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
45: * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46: * ====================================================================
47: */
48: package com.l2fprod.common.model;
49:
50: import java.util.Observable;
51:
52: /**
53: * BaseObject.<br>
54: *
55: */
56: public class BaseObject extends Observable implements HasId {
57:
58: private Object id;
59:
60: public void setId(Object id) {
61: this .id = id;
62: }
63:
64: public Object getId() {
65: return id;
66: }
67:
68: public String toString() {
69: return super .toString() + "[" + paramString() + "]";
70: }
71:
72: protected String paramString() {
73: return "id=" + getId();
74: }
75:
76: }
|