com.primix.vlib.ejb
Class Book

java.lang.Object
  |
  +--com.primix.vlib.ejb.Book
All Implemented Interfaces:
java.io.Serializable

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

Represents a single result row from a IBookQuery. In effect, this is a light-wieght, serializable, read-only version of an IBook bean, plus it contains the owner and holder name (which means we don't have to go find the correct IPerson to dig out the name).

This is provided for efficient access when doing various queries.

Version:
$Id: Book.java,v 1.7 2001/08/27 22:19:12 hship Exp $
Author:
Howard Ship
See Also:
Serialized Form

Field Summary
static int AUTHOR_COLUMN
           
static int DATE_ADDED_COLUMN
           
static int DESCRIPTION_COLUMN
           
static int HIDDEN_COLUMN
           
static int HOLDER_NAME_COLUMN
           
static int HOLDER_PK_COLUMN
           
static int ISBN_COLUMN
           
static int LENDABLE_COLUMN
           
static int N_COLUMNS
          Number of columns in the result.
static int OWNER_NAME_COLUMN
          Column index for a presentable version of the holder's name.
static int OWNER_PK_COLUMN
           
static int PRIMARY_KEY_COLUMN
          Column index for the Book's primary key.
static int PUBLISHER_NAME_COLUMN
           
static int PUBLISHER_PK_COLUMN
           
static int TITLE_COLUMN
          Column index for the book title.
 
Constructor Summary
Book(java.lang.Object[] columns)
          Constructs a new BookQueryResult, making an internal copy of the columns passed.
 
Method Summary
 java.lang.String getAuthor()
           
 java.sql.Timestamp getDateAdded()
           
 java.lang.String getDescription()
           
 java.lang.String getHolderName()
           
 java.lang.Integer getHolderPrimaryKey()
           
 java.lang.String getISBN()
           
 java.lang.String getOwnerName()
           
 java.lang.Integer getOwnerPrimaryKey()
           
 java.lang.Integer getPrimaryKey()
           
 java.lang.String getPublisherName()
           
 java.lang.Integer getPublisherPrimaryKey()
           
 java.lang.String getTitle()
           
 boolean isBorrowed()
          Returns true if the book is borrowed; that is, if its holder doesn't match its owner.
 boolean isHidden()
           
 boolean isLendable()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PRIMARY_KEY_COLUMN

public static final int PRIMARY_KEY_COLUMN
Column index for the Book's primary key.

TITLE_COLUMN

public static final int TITLE_COLUMN
Column index for the book title.

DESCRIPTION_COLUMN

public static final int DESCRIPTION_COLUMN

ISBN_COLUMN

public static final int ISBN_COLUMN

OWNER_PK_COLUMN

public static final int OWNER_PK_COLUMN

OWNER_NAME_COLUMN

public static final int OWNER_NAME_COLUMN
Column index for a presentable version of the holder's name.
See Also:
IPerson.getNaturalName()

HOLDER_PK_COLUMN

public static final int HOLDER_PK_COLUMN

HOLDER_NAME_COLUMN

public static final int HOLDER_NAME_COLUMN

PUBLISHER_PK_COLUMN

public static final int PUBLISHER_PK_COLUMN

PUBLISHER_NAME_COLUMN

public static final int PUBLISHER_NAME_COLUMN

AUTHOR_COLUMN

public static final int AUTHOR_COLUMN

HIDDEN_COLUMN

public static final int HIDDEN_COLUMN

LENDABLE_COLUMN

public static final int LENDABLE_COLUMN

DATE_ADDED_COLUMN

public static final int DATE_ADDED_COLUMN

N_COLUMNS

public static final int N_COLUMNS
Number of columns in the result.
Constructor Detail

Book

public Book(java.lang.Object[] columns)
Constructs a new BookQueryResult, making an internal copy of the columns passed.
Method Detail

getPrimaryKey

public java.lang.Integer getPrimaryKey()

getTitle

public java.lang.String getTitle()

getDescription

public java.lang.String getDescription()

getISBN

public java.lang.String getISBN()

getOwnerPrimaryKey

public java.lang.Integer getOwnerPrimaryKey()

getOwnerName

public java.lang.String getOwnerName()

getHolderPrimaryKey

public java.lang.Integer getHolderPrimaryKey()

getHolderName

public java.lang.String getHolderName()

getPublisherPrimaryKey

public java.lang.Integer getPublisherPrimaryKey()

getPublisherName

public java.lang.String getPublisherName()

getAuthor

public java.lang.String getAuthor()

getDateAdded

public java.sql.Timestamp getDateAdded()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isBorrowed

public boolean isBorrowed()
Returns true if the book is borrowed; that is, if its holder doesn't match its owner.

isHidden

public boolean isHidden()

isLendable

public boolean isLendable()