View Javadoc

1   package com.atlassian.bonnie;
2   
3   import java.io.Serializable;
4   
5   /**
6    * A token by which the AnyTypeObjectDao (for example) can resolve any persistent object. Handle is marker-interface with
7    * no required methods, but implementors must follow the contract for the <code>toString</code> method.
8    *
9    * <p>Handles are used to represent persistent objects in places such as the full-search index, providing a way
10   * to go back from some text representation to a full object.
11   */
12  public interface Handle extends Serializable
13  {
14      /**
15       * The <code>toString()</code> method of a Handle must be written so that the AnyTypeObjectDao (for example) can
16       * resolve the String representation of a Handle back to a Handle object, and thus find the referenced object
17       *
18       * @return a String representation of this Handle that can be resolved back to the same object.
19       */
20      String toString();
21  }