Rakesh API

org.rakeshv.xml.album
Class Photo

java.lang.Object
  extended by org.rakeshv.xml.album.Photo
All Implemented Interfaces:
java.io.Serializable

public class Photo
extends java.lang.Object
implements java.io.Serializable

A Java bean that represents a photo. Bean fields map all the first-level child elements under the photo node in the XML tree.

© Copyright 2003 Rakesh Vidyadharan

Version:
$Id: Photo.java,v 1.2 2004/05/26 11:42:40 rakesh Exp $
Author:
Rakesh Vidyadharan 2003 October 31
See Also:
Serialized Form

Field Summary
private  java.lang.String description
          The description element value that is used to describe the photo.
private  Image fullImage
          The fullImage element value that is stored as an instance of the Image java bean.
private  java.lang.Integer photoId
          The photoId value that is used as the primary key for each photo.
private  Image thumbnail
          The thumbnail element value that is stored as an instance of the Image java bean.
private  java.lang.String title
          The title value that is used to identify a photo.
 
Constructor Summary
Photo(int photoId)
          Creates a new instance of the bean using the specified value as the primary key value for this photo.
Photo(java.lang.Integer photoId)
          Creates a new instance of the bean using the specified value as the primary key value for this photo.
 
Method Summary
 boolean equals(java.lang.Object object)
          Indicates whether some other object is "equal to" this one.
 java.lang.String getDescription()
          Returns description.
 Image getFullImage()
          Returns fullImage.
 java.lang.Integer getPhotoId()
          Returns photoId.
 Image getThumbnail()
          Returns thumbnail.
 java.lang.String getTitle()
          Returns title.
 int hashCode()
          Returns a hash code value for the object.
 void setDescription(java.lang.String description)
          Set description.
 void setFullImage(Image fullImage)
          Set fullImage.
 void setThumbnail(Image thumbnail)
          Set thumbnail.
 void setTitle(java.lang.String title)
          Set title.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

photoId

private java.lang.Integer photoId
The photoId value that is used as the primary key for each photo.


title

private java.lang.String title
The title value that is used to identify a photo.


fullImage

private Image fullImage
The fullImage element value that is stored as an instance of the Image java bean.


thumbnail

private Image thumbnail
The thumbnail element value that is stored as an instance of the Image java bean.


description

private java.lang.String description
The description element value that is used to describe the photo.

Constructor Detail

Photo

public Photo(int photoId)
Creates a new instance of the bean using the specified value as the primary key value for this photo.

Parameters:
photoId - - The unique identified used for each photo.

Photo

public Photo(java.lang.Integer photoId)
Creates a new instance of the bean using the specified value as the primary key value for this photo. The photoId instance variable is set to a new Integer object having the same underlying int value as the object passed in.

Parameters:
photoId - - The unique identified used for each photo.
Method Detail

equals

public boolean equals(java.lang.Object object)
Indicates whether some other object is "equal to" this one. Returns true if the specified object is an instance of Photo, and the values of photoId are the same.

Overrides:
equals in class java.lang.Object
Parameters:
object - - The object that is to be compared with this instance.

hashCode

public int hashCode()
Returns a hash code value for the object. Returns the hash code associated with the photoId instance variable.

Overrides:
hashCode in class java.lang.Object
Returns:
int - The hash code value.

toString

public java.lang.String toString()
Returns a string representation of the object. Return the value of title if it is not empty, else if returns the value as returned by the method defined in the super class.

Overrides:
toString in class java.lang.Object
Returns:
String - The string represenetation of this instance.

getPhotoId

public final java.lang.Integer getPhotoId()
Returns photoId.

Returns:
Integer - The value/reference of/to photoId.

getTitle

public final java.lang.String getTitle()
Returns title.

Returns:
String - The value/reference of/to title.

setTitle

public final void setTitle(java.lang.String title)
Set title.

Parameters:
title - - The value to set.

getFullImage

public final Image getFullImage()
Returns fullImage.

Returns:
Image - The value/reference of/to fullImage.

setFullImage

public final void setFullImage(Image fullImage)
Set fullImage.

Parameters:
fullImage - - The value to set.

getThumbnail

public final Image getThumbnail()
Returns thumbnail.

Returns:
Image - The value/reference of/to thumbnail.

setThumbnail

public final void setThumbnail(Image thumbnail)
Set thumbnail.

Parameters:
thumbnail - - The value to set.

getDescription

public final java.lang.String getDescription()
Returns description.

Returns:
String - The value/reference of/to description.

setDescription

public final void setDescription(java.lang.String description)
Set description.

Parameters:
description - - The value to set.

Rakesh API

Copyright © 2002-2005 - Rakesh Vidyadharan