* @throws ObjectAlreadyInitializedException Thrown if some PuzzleInfo is already attached to this object.
* @throws InvalidObjectException If the attached puzzle details are invalid for this puzzle.
*/
public void attachToPuzzleInfo(PuzzleInfoImpl puzzleInfo) throws ObjectAlreadyInitializedException, InvalidObjectException {
if (this.puzzleInfo != null) {
throw new ObjectAlreadyInitializedException("PuzzleInfo already set in PuzzleDetailsImpl.");
}
if (puzzleInfoKey == null) {
puzzleInfoKey = puzzleInfo.createKey();
} else if (puzzleInfo.getId() != puzzleInfoKey.getId()) {
throw new InvalidObjectException("PuzzleInfo id doesn't match the one in PuzzleDetailsImpl.");