TrackBean

Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## thegroup.projectcddb.database
Class TrackBean

    java.lang.Object
      thegroup.projectcddb.database.TrackBean

All Implemented Interfaces:
  javax.ejb.EnterpriseBean, javax.ejb.EntityBean, java.io.Serializable

public class TrackBean
extends java.lang.Object
implements javax.ejb.EntityBean

Class which encapsulates the abstract idea of a track from a CD according to the data available from the CDDB entry

Author:
  diana abbas < dabbas @ umail ucsb edu >, kyle dorman
See Also:
  Serialized Form

Field Summary
`javax.ejb.EntityContext` | `context` The runtime context of the entity bean
`java.lang.String` | `discId` the CDDB disc id of the CD that this track is on
`java.lang.String` | `ext` Extended data which may or may not be present
`java.lang.Integer` | `id` Primary Key ID
`java.lang.String` | `trackName` Name of the track
`java.lang.Integer` | `trackNumber` Number of the track on the disc

Constructor Summary
`TrackBean()` Constructor for the Track object

Method Summary
`void` | `ejbActivate()` A container invokes this method when the instance is taken out of the pool of available instances to become associated with a specific EJB object.
`java.lang.Integer` | `ejbCreate(java.lang.String discId, java.lang.String trackName, java.lang.Integer trackNumber, java.lang.String ext)` Creates a bean with the information given to it
`void` | `ejbLoad()` A container invokes this method to instruct the instance to synchronize its state by loading it state from the underlying database
`void` | `ejbPassivate()` A container invokes this method on an instance before the instance becomes disassociated with a specific EJB object.
`void` | `ejbPostCreate(java.lang.String discId, java.lang.String trackName, java.lang.Integer trackNumber, java.lang.String ext)` Manages the already created bean
`void` | `ejbRemove()` A container invokes this method before it removes the EJB object that is currently associated with the instance.
`void` | `ejbStore()` A container invokes this method to instruct the instance to synchronize its state by storing it to the underlying database.
`java.lang.String` | `getDiscId()` Gets the DiscId attribute of the Track object
`java.lang.String` | `getExt()` Gets the Ext attribute of the Track object
`java.lang.Integer` | `getId()` Gets the Id attribute of the TrackBean object
`java.lang.String` | `getTrackName()` Gets the TrackName attribute of the Track object
`java.lang.Integer` | `getTrackNumber()` Gets the TrackNumber attribute of the Track object
`void` | `setDiscId(java.lang.String discId)` Sets the DiscId attribute of the Track object
`void` | `setEntityContext(javax.ejb.EntityContext context)` Sets the EntityContext attribute of the TrackBean object
`void` | `setExt(java.lang.String ext)` Sets the Ext attribute of the Track object
`void` | `setId(java.lang.Integer id)` Sets the Id attribute of the TrackBean object
`void` | `setTrackName(java.lang.String trackName)` Sets the TrackName attribute of the Track object
`void` | `setTrackNumber(java.lang.Integer trackNumber)` Sets the TrackNumber attribute of the Track object
`java.lang.String` | `toString()` Converts to a String which is the SQL INSERT statement to be used to add this data to a database.
`void` | `unsetEntityContext()` Unset the associated entity context.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### context

    public javax.ejb.EntityContext context

  The runtime context of the entity bean

### id

    public java.lang.Integer id

  Primary Key ID

### trackName

    public java.lang.String trackName

  Name of the track

### ext

    public java.lang.String ext

  Extended data which may or may not be present

### trackNumber

    public java.lang.Integer trackNumber

  Number of the track on the disc

### discId

    public java.lang.String discId

  the CDDB disc id of the CD that this track is on

Constructor Detail

### TrackBean

    public TrackBean()

  Constructor for the Track object

Method Detail

### setTrackName

    public void setTrackName(java.lang.String trackName)

  Sets the TrackName attribute of the Track object

  Parameters:
    `trackName` - The new TrackName value

### setExt

    public void setExt(java.lang.String ext)

  Sets the Ext attribute of the Track object

  Parameters:
    `ext` - The new Ext value

### setTrackNumber

    public void setTrackNumber(java.lang.Integer trackNumber)

  Sets the TrackNumber attribute of the Track object

  Parameters:
    `trackNumber` - The new TrackNumber value

### setDiscId

    public void setDiscId(java.lang.String discId)

  Sets the DiscId attribute of the Track object

  Parameters:
    `discId` - The new DiscId value

### setId

    public void setId(java.lang.Integer id)

  Sets the Id attribute of the TrackBean object

  Parameters:
    `id` - The new Id value

### setEntityContext

    public void setEntityContext(javax.ejb.EntityContext context)
                          throws javax.ejb.EJBException,
                                 java.rmi.RemoteException

  Sets the EntityContext attribute of the TrackBean object

  Specified by:
    `setEntityContext` in interface `javax.ejb.EntityBean`
  Parameters:
    `context` - The new EntityContext value
  Throws:
    `javax.ejb.EJBException` - Indicates a failure caused by a system-level error
    `java.rmi.RemoteException` - Provides backward compatibility for enterprise beans

### getTrackName

    public java.lang.String getTrackName()

  Gets the TrackName attribute of the Track object

  Returns:
    The TrackName value

### getExt

    public java.lang.String getExt()

  Gets the Ext attribute of the Track object

  Returns:
    The Ext value

### getTrackNumber

    public java.lang.Integer getTrackNumber()

  Gets the TrackNumber attribute of the Track object

  Returns:
    The TrackNumber value

### getDiscId

    public java.lang.String getDiscId()

  Gets the DiscId attribute of the Track object

  Returns:
    The DiscId value

### getId

    public java.lang.Integer getId()

  Gets the Id attribute of the TrackBean object

  Returns:
    The Id value

### toString

    public java.lang.String toString()

  Converts to a String which is the SQL INSERT statement to be used to add this data to a database.

  Returns:
    A string representation of the object.

### unsetEntityContext

    public void unsetEntityContext()
                            throws javax.ejb.EJBException,
                                   java.rmi.RemoteException

  Unset the associated entity context. The container calls this method before removing the instance

  Specified by:
    `unsetEntityContext` in interface `javax.ejb.EntityBean`
  Throws:
    `javax.ejb.EJBException` - Indicates a failure caused by a system-level error
    `java.rmi.RemoteException` - Provides backward compatibility for enterprise beans

### ejbActivate

    public void ejbActivate()
                     throws javax.ejb.EJBException,
                            java.rmi.RemoteException

  A container invokes this method when the instance is taken out of the pool of available instances to become associated with a specific EJB object. This method transitions the instance to the ready state.

  Specified by:
    `ejbActivate` in interface `javax.ejb.EntityBean`
  Throws:
    `javax.ejb.EJBException` - Indicates a failure caused by a system-level error
    `java.rmi.RemoteException` - Provides backward compatibility for enterprise beans

### ejbLoad

    public void ejbLoad()
                 throws javax.ejb.EJBException,
                        java.rmi.RemoteException

  A container invokes this method to instruct the instance to synchronize its state by loading it state from the underlying database

  Specified by:
    `ejbLoad` in interface `javax.ejb.EntityBean`
  Throws:
    `javax.ejb.EJBException` - Indicates a failure caused by a system-level error
    `java.rmi.RemoteException` - Provides backward compatibility for enterprise beans

### ejbPassivate

    public void ejbPassivate()
                      throws javax.ejb.EJBException,
                             java.rmi.RemoteException

  A container invokes this method on an instance before the instance becomes disassociated with a specific EJB object. After this method completes, the container will place the instance into the pool of available instances.

  Specified by:
    `ejbPassivate` in interface `javax.ejb.EntityBean`
  Throws:
    `javax.ejb.EJBException` - Indicates a failure caused by a system-level error
    `java.rmi.RemoteException` - Provides backward compatibility for enterprise beans
  Since:
    empty

### ejbRemove

    public void ejbRemove()
                   throws javax.ejb.EJBException,
                          java.rmi.RemoteException,
                          javax.ejb.RemoveException

  A container invokes this method before it removes the EJB object that is currently associated with the instance.

  Specified by:
    `ejbRemove` in interface `javax.ejb.EntityBean`
  Throws:
    `javax.ejb.RemoveException` - An attempt to remove an EJB object when the enterprise Bean or the container does not allow the EJB object to be removed
    `javax.ejb.EJBException` - Indicates a failure caused by a system-level error
    `java.rmi.RemoteException` - Provides backward compatibility for enterprise beans

### ejbStore

    public void ejbStore()
                  throws javax.ejb.EJBException,
                         java.rmi.RemoteException

  A container invokes this method to instruct the instance to synchronize its state by storing it to the underlying database.

  Specified by:
    `ejbStore` in interface `javax.ejb.EntityBean`
  Throws:
    `javax.ejb.EJBException` - Indicates a failure caused by a system-level error
    `java.rmi.RemoteException` - Provides backward compatibility for enterprise beans

### ejbCreate

    public java.lang.Integer ejbCreate(java.lang.String discId,
                                       java.lang.String trackName,
                                       java.lang.Integer trackNumber,
                                       java.lang.String ext)
                                throws javax.ejb.CreateException

  Creates a bean with the information given to it

  Parameters:
    `discId` -
    `trackName` -
    `trackNumber` -
    `ext` - Extended Data
  Returns:
    Returns a track bean
  Throws:
    `javax.ejb.CreateException` - Failure to create an entity EJB object

### ejbPostCreate

    public void ejbPostCreate(java.lang.String discId,
                              java.lang.String trackName,
                              java.lang.Integer trackNumber,
                              java.lang.String ext)
                       throws javax.ejb.CreateException

  Manages the already created bean

  Parameters:
    `discId` -
    `trackName` -
    `trackNumber` -
    `ext` - Extended Data
  Throws:
    `javax.ejb.CreateException` - Failure to create an entity EJB object

Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD