01: /*
02: * $Id: AbstractModel.java 460492 2006-05-02 19:02:12Z ivaynberg $ $Revision: 460492 $
03: * $Date: 2006-05-02 21:02:12 +0200 (Tue, 02 May 2006) $
04: *
05: * ==============================================================================
06: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
07: * use this file except in compliance with the License. You may obtain a copy of
08: * the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15: * License for the specific language governing permissions and limitations under
16: * the License.
17: */
18: package wicket.model;
19:
20: /**
21: * AbstractModel is an adapter base class for implementing models which have no
22: * detach logic.
23: *
24: * @author Jonathan Locke
25: */
26: public abstract class AbstractModel implements IModel {
27: /**
28: * @see wicket.model.IModel#detach()
29: */
30: public void detach() {
31: }
32:
33: /**
34: * @see Object#toString()
35: */
36: public String toString() {
37: StringBuffer sb = new StringBuffer("Model:classname=[");
38: sb.append(getClass().getName()).append("]");
39: return sb.toString();
40: }
41:
42: /**
43: * This default implementation of getNestedModel unconditionally returns
44: * null.
45: *
46: * @see wicket.model.IModel#getNestedModel()
47: *
48: * @return null
49: */
50: public IModel getNestedModel() {
51: return null;
52: }
53: }
|