BEA Systems, Inc.

theory.smart.ebusiness.inventory
Class InventoryRecordImpl

java.lang.Object
  |
  +--theory.smart.foundation.EntityImpl
        |
        +--theory.smart.foundation.ConfigurableEntityImpl
              |
              +--theory.smart.axiom.accounting.AccountImpl
                    |
                    +--theory.smart.ebusiness.inventory.InventoryRecordImpl

public class InventoryRecordImpl
extends AccountImpl

This represents a virtual storage unit for an item type. It has a reference to the class of item that is stored there and is derived from account. Account is a mechanism for keeping track of the quantity of something and controlling allocation of that something through transactions.

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

See Also:
InventoryRecord, InventoryRecordHome, InventoryRecordValue, Serialized Form

Field Summary
 SmartHandle item
           item [InventoryRecord] <>------> [theory.smart.ebusiness.item.Item]
 com.sun.java.util.collections.LinkedList locators
           locator (List) [InventoryRecord] <*>------> [theory.smart.ebusiness.inventory.Locator] 0..*
 
Fields inherited from class theory.smart.axiom.accounting.AccountImpl
accountEntries, balances, chargeds, identifier
 
Fields inherited from class theory.smart.foundation.EntityImpl
ctx, isDirty, isLoaded
 
Constructor Summary
InventoryRecordImpl()
           
 
Method Summary
 void addFirstLocator(Locator locator)
          Inserts the given locator at the beginning of the locator list.
 void addLastLocator(Locator locator)
          Appends the given locator to the end of the locator list.
 void addLocator(int index, Locator locator)
          Inserts the specified locator at the specified position in the locator list.
 boolean addLocator(Locator locator)
          Appends the specified locator to the end of the locator list.
 boolean addLocators(int index, com.sun.java.util.collections.LinkedList locators)
          Inserts all of the locators in the specified collection into this list, starting at the specified position.
 boolean addLocators(com.sun.java.util.collections.LinkedList locators)
          Appends all of the locators in the specified collection to the end of the locator list, in the order that they are returned by the specified collection's iterator.
 boolean containsLocator(Locator locator)
          Returns true if the locator list contains the specified element.
 void ejbActivate()
          ejbActivate method.
 InventoryRecordPk ejbCreate(InventoryRecordPk inventoryRecordPk)
           
 java.util.Enumeration ejbFindAll()
           
 InventoryRecordPk ejbFindByPrimaryKey(InventoryRecordPk pk)
           
 void ejbLoad()
          ejbLoad method.
 void ejbPassivate()
          ejbPassivate method.
 void ejbPostCreate(InventoryRecordPk inventoryRecordPk)
           
 void ejbRemove()
          ejbRemove method.
 void ejbStore()
          ejbStore method.
 Locator getFirstLocator()
          Returns the first locator in the locator list.
 InventoryRecordValue getInventoryRecordByValue()
          Get all of InventoryRecord's attributes.
 Item getItem()
          Get the remote object reference of item
 Locator getLastLocator()
          Returns the last locator in the locator list.
 Locator getLocator(int index)
          Returns the locator at the specified position in the locator list.
 com.sun.java.util.collections.LinkedList getLocators()
          Returns all of the locators in the locator list.
 com.sun.java.util.collections.LinkedList getLocators(int fromIndex, int toIndex)
          Returns a view of the portion of the locator list between fromIndex, inclusive, and toIndex, exclusive.
 int getNumberOfLocators()
          Returns the number of locators in the locator list.
 int indexOfLocator(Locator locator)
          Returns the index in the locator list of the first occurrence of the specified element, or -1 if the locator list does not contain this element.
 boolean isLocatorsEmtpy()
          Returns true if the locator list contains no locators.
 int lastIndexOfLocator(Locator locator)
          Returns the index in the locator list of the last occurrence of the specified element, or -1 if the locator list does not contain this element.
 void removeAllLocators()
          Removes all of the locators from the locator list.
 Locator removeFirstLocator()
          Removes and returns the first locator from the locator list.
 Locator removeLastLocator()
          Removes and returns the last locator from the locator list.
 Locator removeLocator(int index)
          Removes the locator at the specified position in the locator list.
 boolean removeLocator(Locator locator)
          Removes the first occurrence of the specified locator in the locator list.
 void setEntityContext(javax.ejb.EntityContext ctx)
          setEntityContext method.
 void setInventoryRecordByValue(InventoryRecordValue value)
          Set all of InventoryRecord's attributes to the passed in value.
 void setItem(Item item)
          Set the remote object reference of item
 Locator setLocator(int index, Locator locator)
          Replaces the locator at the specified position in the locator list with the specified element.
 void unsetEntityContext()
          unsetEntityContext method.
 
Methods inherited from class theory.smart.axiom.accounting.AccountImpl
add, addAccountEntries, addAccountEntries, addAccountEntry, addAccountEntry, addFirstAccountEntry, addLastAccountEntry, applyDeposit, applyTransaction, applyWithdrawal, charge, charge, containsAccountEntry, containsBalanceKey, containsBalanceValue, containsChargedKey, containsChargedValue, deposit, ejbCreate, ejbFindByPrimaryKey, ejbPostCreate, getAccountByValue, getAccountEntries, getAccountEntries, getAccountEntry, getBalanceByKey, getBalances, getChargedByKey, getChargeds, getFirstAccountEntry, getIdentifier, getLastAccountEntry, getNumberOfAccountEntries, getNumberOfBalances, getNumberOfChargeds, indexOfAccountEntry, isAccountEntriesEmtpy, isBalancesEmpty, isChargedsEmpty, lastIndexOfAccountEntry, post, post, putBalance, putBalances, putCharged, putChargeds, remove, removeAccountEntry, removeAccountEntry, removeAllAccountEntries, removeAllBalances, removeAllChargeds, removeBalanceByKey, removeChargedByKey, removeFirstAccountEntry, removeLastAccountEntry, reverse, setAccountByValue, setAccountEntry, setDefaultChargingRule, setDefaultPostingRule, withdraw
 
Methods inherited from class theory.smart.foundation.ConfigurableEntityImpl
addBusinessPolicy, addProperty, ejbCreate, ejbPostCreate, getBusinessPolicy, getProperty, removeBusinessPolicy, removeProperty, setSuccessorAtClassLevel, setSuccessorAtInstanceLevel
 
Methods inherited from class theory.smart.foundation.EntityImpl
getEntityContext, isModified
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

item

public SmartHandle item
                  item
 [InventoryRecord] <>------> [theory.smart.ebusiness.item.Item] 

 

locators

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

InventoryRecordImpl

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

getInventoryRecordByValue

public InventoryRecordValue getInventoryRecordByValue()
                                               throws java.rmi.RemoteException
Get all of InventoryRecord's attributes.
Returns:
InventoryRecordValue the InventoryRecord value object

setInventoryRecordByValue

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

ejbCreate

public InventoryRecordPk ejbCreate(InventoryRecordPk inventoryRecordPk)
                            throws javax.ejb.CreateException,
                                   java.rmi.RemoteException

ejbPostCreate

public void ejbPostCreate(InventoryRecordPk inventoryRecordPk)
                   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 AccountImpl

ejbStore

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

ejbRemove

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

ejbActivate

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

ejbPassivate

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

setEntityContext

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

unsetEntityContext

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

ejbFindByPrimaryKey

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

ejbFindAll

public java.util.Enumeration ejbFindAll()
                                 throws javax.ejb.FinderException,
                                        java.rmi.RemoteException
Overrides:
ejbFindAll in class AccountImpl

getItem

public Item getItem()
             throws java.rmi.RemoteException
Get the remote object reference of item
Returns:
item.

setItem

public void setItem(Item item)
             throws java.rmi.RemoteException
Set the remote object reference of item
Parameters:
items - item to be added

addLocator

public void addLocator(int index,
                       Locator locator)
Inserts the specified locator at the specified position in the locator list. Shifts the locator currently at that position (if any) and any subsequent locators to the right (adds one to their indices).
Parameters:
index - index at which the specified locator is to be inserted.
locator - locator to be inserted.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).

addLocator

public boolean addLocator(Locator locator)
Appends the specified locator to the end of the locator list.
Parameters:
locator - locator to be appended to the locator list.
Returns:
true (as per the general contract of Collection.add).

addLocators

public boolean addLocators(int index,
                           com.sun.java.util.collections.LinkedList locators)
Inserts all of the locators in the specified collection into this list, starting at the specified position. Shifts the element currently at that position (if any) and any subsequent locators to the right (increases their indices). The new locators will appear in the locator 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.
locators - locators to be inserted into the locator list.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).

addLocators

public boolean addLocators(com.sun.java.util.collections.LinkedList locators)
Appends all of the locators in the specified collection to the end of the locator 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 locator list, and the locator list is nonempty.)
Parameters:
locators - locators to be inserted into the locator list.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index > size()).

addFirstLocator

public void addFirstLocator(Locator locator)
Inserts the given locator at the beginning of the locator list.

addLastLocator

public void addLastLocator(Locator locator)
Appends the given locator to the end of the locator list. (Identical in function to the add method; included only for consistency.)

containsLocator

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

getLocator

public Locator getLocator(int index)
Returns the locator at the specified position in the locator list.
Parameters:
index - index of locator to return.
Returns:
the locator at the specified position in the locator list.
Throws:
IndexOutOfBoundsException - if the specified index is is out of range (index < 0 || index >= size()).

getLocators

public com.sun.java.util.collections.LinkedList getLocators(int fromIndex,
                                                            int toIndex)
Returns a view of the portion of the locator 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 locator list.
Throws:
IndexOutOfBoundsException - endpoint index value out of range (fromIndex < 0 || toIndex > size)
java.lang.IllegalArgumentException - endpoint indices out of order (fromIndex > toIndex)

getLocators

public com.sun.java.util.collections.LinkedList getLocators()
Returns all of the locators in the locator list.
Returns:
all of the locators in the locator list.

getFirstLocator

public Locator getFirstLocator()
Returns the first locator in the locator list.
Returns:
the first locator in the locator list.

getLastLocator

public Locator getLastLocator()
Returns the last locator in the locator list.
Returns:
the last locator in the locator list.
Throws:
java.util.NoSuchElementException - if the locator list is empty.

getNumberOfLocators

public int getNumberOfLocators()
Returns the number of locators in the locator list.
Returns:
the number of locators in the locator list.

indexOfLocator

public int indexOfLocator(Locator locator)
Returns the index in the locator list of the first occurrence of the specified element, or -1 if the locator 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:
locator - locator to search for.
Returns:
the index in the locator list of the first occurrence of the specified element, or -1 if the locator list does not contain this element.

isLocatorsEmtpy

public boolean isLocatorsEmtpy()
Returns true if the locator list contains no locators.

Returns:
true if the locator list contains no locators.

lastIndexOfLocator

public int lastIndexOfLocator(Locator locator)
Returns the index in the locator list of the last occurrence of the specified element, or -1 if the locator 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:
locator - locator to search for.
Returns:
the index in the locator list of the last occurrence of the specified element, or -1 if the locator list does not contain this element.

removeAllLocators

public void removeAllLocators()
Removes all of the locators from the locator list.

removeLocator

public Locator removeLocator(int index)
Removes the locator at the specified position in the locator list. Shifts any subsequent locators to the left (subtracts one from their indices). Returns the locator that was removed from the locator list.
Parameters:
index - the index of the locator to removed.
Returns:
the locator previously at the specified position.
Throws:
IndexOutOfBoundsException - if the specified index is out of range (index < 0 || index >= size()).

removeLocator

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

removeFirstLocator

public Locator removeFirstLocator()
Removes and returns the first locator from the locator list.
Returns:
the first locator from the locator list.
Throws:
java.util.NoSuchElementException - if the locator list is empty.

removeLastLocator

public Locator removeLastLocator()
Removes and returns the last locator from the locator list.
Returns:
the last locator from the locator list.
Throws:
java.util.NoSuchElementException - if the locator list is empty.

setLocator

public Locator setLocator(int index,
                          Locator locator)
Replaces the locator at the specified position in the locator list with the specified element.
Parameters:
index - index of locator to replace.
locator - locator to be stored at the specified position.
Returns:
the locator 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