01: /*****************************************************************************
02: * Copyright (c) PicoContainer Organization. All rights reserved. *
03: * ------------------------------------------------------------------------- *
04: * The software in this package is published under the terms of the BSD *
05: * style license a copy of which has been included with this distribution in *
06: * the LICENSE.txt file. *
07: * *
08: * Idea by Rachel Davies, Original code by various *
09: *****************************************************************************/package org.nanocontainer.testmodel;
10:
11: import java.io.Serializable;
12:
13: /**
14: * @author Stephen Molitor
15: */
16: public class IdentifiableMixin implements Identifiable,
17: AnotherInterface {
18:
19: private Serializable id;
20:
21: public IdentifiableMixin(IdGenerator generator) {
22: this .id = generator.nextId();
23: }
24:
25: public IdentifiableMixin() {
26: this (new IdGeneratorImpl());
27: }
28:
29: public Serializable getId() {
30: return id;
31: }
32:
33: public void setId(Serializable id) {
34: this.id = id;
35: }
36:
37: }
|