001    package org.apache.turbine.om;
002    
003    
004    /*
005     * Licensed to the Apache Software Foundation (ASF) under one
006     * or more contributor license agreements.  See the NOTICE file
007     * distributed with this work for additional information
008     * regarding copyright ownership.  The ASF licenses this file
009     * to you under the Apache License, Version 2.0 (the
010     * "License"); you may not use this file except in compliance
011     * with the License.  You may obtain a copy of the License at
012     *
013     *   http://www.apache.org/licenses/LICENSE-2.0
014     *
015     * Unless required by applicable law or agreed to in writing,
016     * software distributed under the License is distributed on an
017     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
018     * KIND, either express or implied.  See the License for the
019     * specific language governing permissions and limitations
020     * under the License.
021     */
022    
023    
024    /**
025     * This interface specifies methods for uniquely identifying an object.
026     *
027     * @author <a href="mailto:jmcnally@collab.net">John D. McNally</a>
028     * @version $Id: Retrievable.java 615328 2008-01-25 20:25:05Z tv $
029     */
030    public interface Retrievable
031    {
032        /**
033         * get an id that differentiates this object from others
034         * of its class.
035         *
036         * @return The id value
037         */
038        String getQueryKey();
039    
040        /**
041         * set an id that differentiates this object from others
042         * of its class.
043         *
044         * @param key The new id value
045         *
046         * @throws Exception A problem occured while setting the id.
047         */
048        void setQueryKey(String key)
049            throws Exception;
050    
051    }