BEA Systems, Inc.

theory.smart.ebusiness.inventory
Class ItemInventoryImpl

java.lang.Object
  |
  +--theory.smart.foundation.EntityImpl
        |
        +--theory.smart.ebusiness.inventory.ItemInventoryImpl

public class ItemInventoryImpl
extends EntityImpl

The ItemInventory is an optimization for locating inventory records. When Inventory Records are created they are registered with the appropriate Item Inventory so that the can be effeciently located.

 Primary Key = theory.smart.ebusiness.inventory.ItemInventoryPk
 

See Also:
ItemInventory, ItemInventoryHome, ItemInventoryValue, Serialized Form

Field Summary
 com.sun.java.util.collections.LinkedList inventoryRecords
           inventoryRecord (List) [ItemInventory] <>------> [theory.smart.ebusiness.inventory.InventoryRecord] 0..*
 java.lang.String itemKey
           itemKey [ItemInventory] <*>------> [String] (Primary Key)
 
Fields inherited from class theory.smart.foundation.EntityImpl
ctx, isDirty, isLoaded
 
Constructor Summary
ItemInventoryImpl()
           
 
Method Summary
 void addFirstInventoryRecord(InventoryRecord inventoryRecord)
          Inserts the given inventoryRecord at the beginning of the inventoryRecord list.
 void addInventoryRecord(int index, InventoryRecord inventoryRecord)
          Inserts the specified inventoryRecord at the specified position in the inventoryRecord list.
 boolean addInventoryRecord(InventoryRecord inventoryRecord)
          Appends the specified inventoryRecord to the end of the inventoryRecord list.
 boolean addInventoryRecords(int index, com.sun.java.util.collections.LinkedList inventoryRecords)
          Inserts all of the inventoryRecords in the specified collection into this list, starting at the specified position.
 boolean addInventoryRecords(com.sun.java.util.collections.LinkedList inventoryRecords)
          Appends all of the inventoryRecords in the specified collection to the end of the inventoryRecord list, in the order that they are returned by the specified collection's iterator.
 void addLastInventoryRecord(InventoryRecord inventoryRecord)
          Appends the given inventoryRecord to the end of the inventoryRecord list.
 boolean containsInventoryRecord(InventoryRecord inventoryRecord)
          Returns true if the inventoryRecord list contains the specified element.
 void ejbActivate()
          ejbActivate method.
 ItemInventoryPk ejbCreate(ItemInventoryPk itemInventoryPk)
           
 java.util.Enumeration ejbFindAll()
           
 ItemInventoryPk ejbFindByPrimaryKey(ItemInventoryPk pk)
           
 void ejbLoad()
          ejbLoad method.
 void ejbPassivate()
          ejbPassivate method.
 void ejbPostCreate(ItemInventoryPk itemInventoryPk)
           
 void ejbRemove()
          ejbRemove method.
 void ejbStore()
          ejbStore method.
 InventoryRecord getFirstInventoryRecord()
          Returns the first inventoryRecord in the inventoryRecord list.
 InventoryRecord getInventoryRecord(int index)
          Returns the inventoryRecord at the specified position in the inventoryRecord list.
 com.sun.java.util.collections.LinkedList getInventoryRecords()
          Returns all of the inventoryRecords in the inventoryRecord list.
 com.sun.java.util.collections.LinkedList getInventoryRecords(int fromIndex, int toIndex)
          Returns a view of the portion of the inventoryRecord list between fromIndex, inclusive, and toIndex, exclusive.
 ItemInventoryValue getItemInventoryByValue()
          Get all of ItemInventory's attributes.
 java.lang.String getItemKey()
           
 InventoryRecord getLastInventoryRecord()
          Returns the last inventoryRecord in the inventoryRecord list.
 int getNumberOfInventoryRecords()
          Returns the number of inventoryRecords in the inventoryRecord list.
 int indexOfInventoryRecord(InventoryRecord inventoryRecord)
          Returns the index in the inventoryRecord list of the first occurrence of the specified element, or -1 if the inventoryRecord list does not contain this element.
 boolean isInventoryRecordsEmtpy()
          Returns true if the inventoryRecord list contains no inventoryRecords.
 int lastIndexOfInventoryRecord(InventoryRecord inventoryRecord)
          Returns the index in the inventoryRecord list of the last occurrence of the specified element, or -1 if the inventoryRecord list does not contain this element.
 void removeAllInventoryRecords()
          Removes all of the inventoryRecords from the inventoryRecord list.
 InventoryRecord removeFirstInventoryRecord()
          Removes and returns the first inventoryRecord from the inventoryRecord list.
 InventoryRecord removeInventoryRecord(int index)
          Removes the inventoryRecord at the specified position in the inventoryRecord list.
 boolean removeInventoryRecord(InventoryRecord inventoryRecord)
          Removes the first occurrence of the specified inventoryRecord in the inventoryRecord list.
 InventoryRecord removeLastInventoryRecord()
          Removes and returns the last inventoryRecord from the inventoryRecord list.
 void setEntityContext(javax.ejb.EntityContext ctx)
          setEntityContext method.
 InventoryRecord setInventoryRecord(int index, InventoryRecord inventoryRecord)
          Replaces the inventoryRecord at the specified position in the inventoryRecord list with the specified element.
 void setItemInventoryByValue(ItemInventoryValue value)
          Set all of ItemInventory's attributes to the passed in value.
 void unsetEntityContext()
          unsetEntityContext method.
 
Methods inherited from class theory.smart.foundation.EntityImpl
ejbCreate, ejbPostCreate, getEntityContext, isModified
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

itemKey

public java.lang.String itemKey
                  itemKey
 [ItemInventory] <*>------> [String] (Primary Key)

 

inventoryRecords

public com.sun.java.util.collections.LinkedList inventoryRecords
                  inventoryRecord (List)
 [ItemInventory] <>------> [theory.smart.ebusiness.inventory.InventoryRecord] 
                     0..*
 
Constructor Detail

ItemInventoryImpl

public ItemInventoryImpl()
                  throws javax.ejb.CreateException
Method Detail

getItemInventoryByValue

public ItemInventoryValue getItemInventoryByValue()
                                           throws java.rmi.RemoteException
Get all of ItemInventory's attributes.
Returns:
ItemInventoryValue the ItemInventory value object

setItemInventoryByValue

public void setItemInventoryByValue(ItemInventoryValue value)
                             throws java.rmi.RemoteException
Set all of ItemInventory's attributes to the passed in value. Note: Primary key attributes are not set.
Parameters:
ItemInventoryValue - the ItemInventory value object

ejbCreate

public ItemInventoryPk ejbCreate(ItemInventoryPk itemInventoryPk)
                          throws javax.ejb.CreateException,
                                 java.rmi.RemoteException

ejbPostCreate

public void ejbPostCreate(ItemInventoryPk itemInventoryPk)
                   throws javax.ejb.CreateException,
                          java.rmi.RemoteException

ejbLoad

public void ejbLoad()
             throws java.rmi.RemoteException
Description copied from class: EntityImpl
ejbLoad method.
Overrides:
ejbLoad in class EntityImpl

ejbStore

public void ejbStore()
              throws java.rmi.RemoteException
Description copied from class: EntityImpl
ejbStore method.
Overrides:
ejbStore in class EntityImpl

ejbRemove

public void ejbRemove()
               throws java.rmi.RemoteException,
                      javax.ejb.RemoveException
Description copied from class: EntityImpl
ejbRemove method.
Overrides:
ejbRemove in class EntityImpl

ejbActivate

public void ejbActivate()
                 throws java.rmi.RemoteException
Description copied from class: EntityImpl
ejbActivate method.
Overrides:
ejbActivate in class EntityImpl

ejbPassivate

public void ejbPassivate()
                  throws java.rmi.RemoteException
Description copied from class: EntityImpl
ejbPassivate method.
Overrides:
ejbPassivate in class EntityImpl

setEntityContext

public void setEntityContext(javax.ejb.EntityContext ctx)
                      throws java.rmi.RemoteException
Description copied from class: EntityImpl
setEntityContext method.
Overrides:
setEntityContext in class EntityImpl

unsetEntityContext

public void unsetEntityContext()
                        throws java.rmi.RemoteException
Description copied from class: EntityImpl
unsetEntityContext method.
Overrides:
unsetEntityContext in class EntityImpl

ejbFindByPrimaryKey

public ItemInventoryPk ejbFindByPrimaryKey(ItemInventoryPk pk)
                                    throws javax.ejb.FinderException,
                                           java.rmi.RemoteException

ejbFindAll

public java.util.Enumeration ejbFindAll()
                                 throws javax.ejb.FinderException,
                                        java.rmi.RemoteException

getItemKey

public java.lang.String getItemKey()
                            throws java.rmi.RemoteException

addFirstInventoryRecord

public void addFirstInventoryRecord(InventoryRecord inventoryRecord)
                             throws java.rmi.RemoteException
Inserts the given inventoryRecord at the beginning of the inventoryRecord list.

addLastInventoryRecord

public void addLastInventoryRecord(InventoryRecord inventoryRecord)
                            throws java.rmi.RemoteException
Appends the given inventoryRecord to the end of the inventoryRecord list. (Identical in function to the add method; included only for consistency.)

addInventoryRecord

public void addInventoryRecord(int index,
                               InventoryRecord inventoryRecord)
                        throws java.rmi.RemoteException
Inserts the specified inventoryRecord at the specified position in the inventoryRecord list. Shifts the inventoryRecord currently at that position (if any) and any subsequent inventoryRecords to the right (adds one to their indices).
Parameters:
index - index at which the specified inventoryRecord is to be inserted.
inventoryRecord - inventoryRecord to be inserted.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).

addInventoryRecord

public boolean addInventoryRecord(InventoryRecord inventoryRecord)
                           throws java.rmi.RemoteException
Appends the specified inventoryRecord to the end of the inventoryRecord list.
Parameters:
inventoryRecord - inventoryRecord to be appended to the inventoryRecord list.
Returns:
true (as per the general contract of Collection.add).

addInventoryRecords

public boolean addInventoryRecords(int index,
                                   com.sun.java.util.collections.LinkedList inventoryRecords)
                            throws java.rmi.RemoteException
Inserts all of the inventoryRecords in the specified collection into this list, starting at the specified position. Shifts the element currently at that position (if any) and any subsequent inventoryRecords to the right (increases their indices). The new inventoryRecords will appear in the inventoryRecord list in the order that they are returned by the specified collection's iterator.
Parameters:
index - index at which to insert first element from the specified collection.
inventoryRecords - inventoryRecords to be inserted into the inventoryRecord list.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).

addInventoryRecords

public boolean addInventoryRecords(com.sun.java.util.collections.LinkedList inventoryRecords)
                            throws java.rmi.RemoteException
Appends all of the inventoryRecords in the specified collection to the end of the inventoryRecord list, in the order that they are returned by the specified collection's iterator. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection is the inventoryRecord list, and the inventoryRecord list is nonempty.)
Parameters:
inventoryRecords - inventoryRecords to be inserted into the inventoryRecord list.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).

containsInventoryRecord

public boolean containsInventoryRecord(InventoryRecord inventoryRecord)
                                throws java.rmi.RemoteException
Returns true if the inventoryRecord list contains the specified element. More formally, returns true if and only if the inventoryRecord list contains at least one inventoryRecord e such that (o==null ? e==null : o.equals(e)).
Parameters:
inventoryRecord - inventoryRecord whose presence in the inventoryRecord list is to be tested.
Returns:
true if the inventoryRecord list contains the specified element.

getFirstInventoryRecord

public InventoryRecord getFirstInventoryRecord()
                                        throws java.rmi.RemoteException
Returns the first inventoryRecord in the inventoryRecord list.
Returns:
the first inventoryRecord in the inventoryRecord list.

getLastInventoryRecord

public InventoryRecord getLastInventoryRecord()
                                       throws java.rmi.RemoteException
Returns the last inventoryRecord in the inventoryRecord list.
Returns:
the last inventoryRecord in the inventoryRecord list.
Throws:
java.util.NoSuchElementException - if the inventoryRecord list is empty.

getNumberOfInventoryRecords

public int getNumberOfInventoryRecords()
                                throws java.rmi.RemoteException
Returns the number of inventoryRecords in the inventoryRecord list.
Returns:
the number of inventoryRecords in the inventoryRecord list.

getInventoryRecord

public InventoryRecord getInventoryRecord(int index)
                                   throws java.rmi.RemoteException
Returns the inventoryRecord at the specified position in the inventoryRecord list.
Parameters:
index - index of inventoryRecord to return.
Returns:
the inventoryRecord at the specified position in the inventoryRecord list.
Throws:
IndexOutOfBoundsException - if the specified index is is out of range (index < 0 || index >= size()).

getInventoryRecords

public com.sun.java.util.collections.LinkedList getInventoryRecords(int fromIndex,
                                                                    int toIndex)
                                                             throws java.rmi.RemoteException
Returns a view of the portion of the inventoryRecord list between fromIndex, inclusive, and toIndex, exclusive.
Parameters:
fromIndex - low endpoint (inclusive) of the subList.
toKey - high endpoint (exclusive) of the subList.
Returns:
a view of the specified range within the inventoryRecord list.
Throws:
IndexOutOfBoundsException - endpoint index value out of range (fromIndex < 0 || toIndex > size)
java.lang.IllegalArgumentException - endpoint indices out of order (fromIndex > toIndex)

getInventoryRecords

public com.sun.java.util.collections.LinkedList getInventoryRecords()
                                                             throws java.rmi.RemoteException
Returns all of the inventoryRecords in the inventoryRecord list.
Returns:
all of the inventoryRecords in the inventoryRecord list.

indexOfInventoryRecord

public int indexOfInventoryRecord(InventoryRecord inventoryRecord)
                           throws java.rmi.RemoteException
Returns the index in the inventoryRecord list of the first occurrence of the specified element, or -1 if the inventoryRecord list does not contain this element. More formally, returns the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.
Parameters:
inventoryRecord - inventoryRecord to search for.
Returns:
the index in the inventoryRecord list of the first occurrence of the specified element, or -1 if the inventoryRecord list does not contain this element.

isInventoryRecordsEmtpy

public boolean isInventoryRecordsEmtpy()
                                throws java.rmi.RemoteException
Returns true if the inventoryRecord list contains no inventoryRecords.

Returns:
true if the inventoryRecord list contains no inventoryRecords.

lastIndexOfInventoryRecord

public int lastIndexOfInventoryRecord(InventoryRecord inventoryRecord)
                               throws java.rmi.RemoteException
Returns the index in the inventoryRecord list of the last occurrence of the specified element, or -1 if the inventoryRecord list does not contain this element. More formally, returns the highest index i such that (o==null ? get(i)==null : o.equals(get(i))), or -1 if there is no such index.
Parameters:
inventoryRecord - inventoryRecord to search for.
Returns:
the index in the inventoryRecord list of the last occurrence of the specified element, or -1 if the inventoryRecord list does not contain this element.

removeAllInventoryRecords

public void removeAllInventoryRecords()
                               throws java.rmi.RemoteException
Removes all of the inventoryRecords from the inventoryRecord list. This also removes them from the theory.smart.ebusiness.inventory.InventoryRecordHome.

removeFirstInventoryRecord

public InventoryRecord removeFirstInventoryRecord()
                                           throws java.rmi.RemoteException
Removes and returns the first inventoryRecord from the inventoryRecord list.
Returns:
the first inventoryRecord from the inventoryRecord list.
Throws:
java.util.NoSuchElementException - if the inventoryRecord list is empty.

removeLastInventoryRecord

public InventoryRecord removeLastInventoryRecord()
                                          throws java.rmi.RemoteException
Removes and returns the last inventoryRecord from the inventoryRecord list.
Returns:
the last inventoryRecord from the inventoryRecord list.
Throws:
java.util.NoSuchElementException - if the inventoryRecord list is empty.

removeInventoryRecord

public InventoryRecord removeInventoryRecord(int index)
                                      throws java.rmi.RemoteException
Removes the inventoryRecord at the specified position in the inventoryRecord list. Shifts any subsequent inventoryRecords to the left (subtracts one from their indices). Returns the inventoryRecord that was removed from the inventoryRecord list.
Parameters:
index - the index of the inventoryRecord to removed.
Returns:
the inventoryRecord previously at the specified position.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index >= size()).

removeInventoryRecord

public boolean removeInventoryRecord(InventoryRecord inventoryRecord)
                              throws java.rmi.RemoteException
Removes the first occurrence of the specified inventoryRecord in the inventoryRecord list. If the inventoryRecord list does not contain the element, it is unchanged. More formally, removes the inventoryRecord with the lowest index i such that (o==null ? get(i)==null : o.equals(get(i))) (if such an inventoryRecord exists).
Parameters:
inventoryRecord - inventoryRecord to be removed from the inventoryRecord list, if present.
Returns:
true if the inventoryRecord list contained the specified element.

setInventoryRecord

public InventoryRecord setInventoryRecord(int index,
                                          InventoryRecord inventoryRecord)
                                   throws java.rmi.RemoteException
Replaces the inventoryRecord at the specified position in the inventoryRecord list with the specified element.
Parameters:
index - index of inventoryRecord to replace.
inventoryRecord - inventoryRecord to be stored at the specified position.
Returns:
the inventoryRecord previously at the specified position.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index >= size()).

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved