001    /*****************************************************************************
002     * Copyright (c) PicoContainer Organization. All rights reserved.            *
003     * ------------------------------------------------------------------------- *
004     * The software in this package is published under the terms of the BSD      *
005     * style license a copy of which has been included with this distribution in *
006     * the LICENSE.txt file.                                                     *
007     *                                                                           *
008     * Idea by Rachel Davies, Original code by various                           *
009     *****************************************************************************/
010    package org.picocontainer.script.testmodel;
011    
012    import java.io.Serializable;
013    
014    /**
015     * @author Stephen Molitor
016     */
017    public class IdentifiableMixin implements Identifiable, AnotherInterface {
018    
019        private Serializable id;
020    
021        public IdentifiableMixin(IdGenerator generator) {
022            this.id = generator.nextId();
023        }
024    
025        public IdentifiableMixin() {
026            this(new IdGeneratorImpl());
027        }
028    
029        public Serializable getId() {
030            return id;
031        }
032    
033        public void setId(Serializable id) {
034            this.id = id;
035        }
036    
037    }