org.opensubsystems.inventory.data
Class ItemUnitIdentificationView

java.lang.Object
  extended by org.opensubsystems.core.data.DataObject
      extended by org.opensubsystems.core.data.BasicDataObject
          extended by org.opensubsystems.inventory.data.ItemUnitView
              extended by org.opensubsystems.inventory.data.ItemUnitIdentificationView
All Implemented Interfaces:
java.io.Serializable

public class ItemUnitIdentificationView
extends ItemUnitView

This data object represents union of information between identification, unit and item. Since this is a combination of these three objects and cannot be modified on its own, we will use identification data type to represent this object rather then define new data type. In this case it is critical to reuse the constants from the original objects especially for the id attribute since the combination of the data type (identification) and id (which then has to be unit id) is being used for acccess rights checking. This class is immutable since it is a view and it should be never modified.

Version:
$Id: ItemUnitIdentificationView.java,v 1.8 2007/01/28 06:54:39 bastafidli Exp $
Author:
Miro Halas
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
1.3 2006/02/21 06:01:03 bastafidli

Field Summary
static int[] ALL_ITEM_UNIT_IDENTIFICATION_VIEW_COLUMNS
          Static variable for array of all columns codes.
static int COL_ITEM_UNIT_IDENTIFICATION_VIEW_COMMENTS
          Code for attribute.
static int COL_ITEM_UNIT_IDENTIFICATION_VIEW_COST
          Code for attribute.
static int COL_ITEM_UNIT_IDENTIFICATION_VIEW_CREATION_DATE
          Code for attribute.
static int COL_ITEM_UNIT_IDENTIFICATION_VIEW_EXTERNAL_NUMBER
          Code for attribute.
static int COL_ITEM_UNIT_IDENTIFICATION_VIEW_ID
          Code for attribute.
static int COL_ITEM_UNIT_IDENTIFICATION_VIEW_INTERNAL_NUMBER
          Code for attribute.
static int COL_ITEM_UNIT_IDENTIFICATION_VIEW_MANUFACTURER_ID
          Code for attribute.
static int COL_ITEM_UNIT_IDENTIFICATION_VIEW_MODIFICATION_DATE
          Code for attribute.
static int COL_ITEM_UNIT_IDENTIFICATION_VIEW_RENTER_ID
          Code for attribute.
static int COL_ITEM_UNIT_IDENTIFICATION_VIEW_RETIRED
          Code for attribute.
static int ITEM_UNIT_IDENTIFICATION_VIEW_ADDITIONAL_COLUMNS
          How many columns have to be added in addition to the base class.
protected  Identification m_identification
          Identification object.
 
Fields inherited from class org.opensubsystems.inventory.data.ItemUnitView
ALL_FILTER_COLUMNS, ALL_ITEM_UNIT_VIEW_COLUMNS, COL_ITEM_UNIT_VIEW_AVAILABLE_COUNT, COL_ITEM_UNIT_VIEW_AVAILABLE_COUNT2, COL_ITEM_UNIT_VIEW_AVERAGE_COST, COL_ITEM_UNIT_VIEW_COST, COL_ITEM_UNIT_VIEW_CREATION_DATE, COL_ITEM_UNIT_VIEW_CREATION_DATE2, COL_ITEM_UNIT_VIEW_DESCRIPTION, COL_ITEM_UNIT_VIEW_DISPLAY_ORDER, COL_ITEM_UNIT_VIEW_DOMAIN_ID, COL_ITEM_UNIT_VIEW_EXPENSE_TYPE, COL_ITEM_UNIT_VIEW_FOUND_HOLDER, COL_ITEM_UNIT_VIEW_ID, COL_ITEM_UNIT_VIEW_INVENTORY_ID, COL_ITEM_UNIT_VIEW_ITEM_ID, COL_ITEM_UNIT_VIEW_LAST_RECOUNT_TIMESTAMP, COL_ITEM_UNIT_VIEW_MINIMAL_AVAILABLE_COUNT, COL_ITEM_UNIT_VIEW_MODIFICATION_DATE, COL_ITEM_UNIT_VIEW_MODIFICATION_DATE2, COL_ITEM_UNIT_VIEW_NAME, COL_ITEM_UNIT_VIEW_NAME_STEM, COL_ITEM_UNIT_VIEW_ONHOLD_COUNT, COL_ITEM_UNIT_VIEW_PERMANENTLY_ASSIGNED, COL_ITEM_UNIT_VIEW_POPULARITY_RANK, COL_ITEM_UNIT_VIEW_PRICE, COL_ITEM_UNIT_VIEW_REUSABLE, COL_ITEM_UNIT_VIEW_SHIPPED_COUNT, COL_ITEM_UNIT_VIEW_SHIPPED_COUNT2, COL_ITEM_UNIT_VIEW_SIZE, COL_ITEM_UNIT_VIEW_UNIQUELY_TRACKED, COL_ITEM_UNIT_VIEW_UNIT_OF_MEASURE, DEFAULT_LIST_COLUMNS, DEFAULT_LIST_SORT_COLUMNS, DEFAULT_LIST_SORT_ORDER, m_item, m_unit, UNIT_BY_CATEGORY, UNIT_BY_CATEGORY_OBJ
 
Fields inherited from class org.opensubsystems.core.data.BasicDataObject
m_creationTimestamp, m_iDomainId
 
Fields inherited from class org.opensubsystems.core.data.DataObject
NEW_ID, NEW_ID_OBJ, NEW_ID_STR
 
Constructor Summary
ItemUnitIdentificationView()
          Empty constructor
ItemUnitIdentificationView(int iUnitId, int iDomainId, int iInventoryId, int iItemId, int iShippedCount, int iAvailableCount, double dCost, boolean bFoundHolder, java.sql.Timestamp creationDate, java.sql.Timestamp modificationDate, java.lang.String strName, java.lang.String strDescription, int iUnitOfMeasure, boolean bReusable, int iExpenseType, int iAvailableCount2, int iOnHoldCount, int iPopularityRank, int iShippedCount2, boolean bUniquelyTracked, int iMinimalAvailableCount, boolean bPermanentlyAssigned, double dAverageCost, double dPrice, int iDisplayOrder, java.lang.String strNameStem, java.lang.String strSize, java.sql.Timestamp lastRecountDate, java.sql.Timestamp creationDate2, java.sql.Timestamp modificationDate2, int iIdentificationId, java.lang.String strExternalNumber, int iManufacturerId, java.lang.String strInternalNumber, int iRenterId, java.lang.String strComments, boolean bRetired, double dCost2, java.sql.Timestamp creationDate3, java.sql.Timestamp modificationDate3)
          Full constructor.
ItemUnitIdentificationView(Item item, Unit unit, Identification identification)
          Constructor
 
Method Summary
 boolean equals(java.lang.Object oObject)
          
 java.sql.Timestamp getCreationTimestamp()
          
 int getDomainId()
          
 int getId()
          
 java.lang.Integer getIdAsObject()
          
 Identification getIdentification()
          Return identification object
 int hashCode()
          
 boolean isSame(java.lang.Object oObject)
          
 void setCreationTimestamp(java.sql.Timestamp creationTimestamp)
          Creation timestamp is timestamp when the data object was created.
 void setId(int iNewId)
          
 
Methods inherited from class org.opensubsystems.inventory.data.ItemUnitView
getItem, getUnit
 
Methods inherited from class org.opensubsystems.core.data.BasicDataObject
restore
 
Methods inherited from class org.opensubsystems.core.data.DataObject
isFromPersistenceStore, setFromPersistenceStore
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COL_ITEM_UNIT_IDENTIFICATION_VIEW_ID

public static final int COL_ITEM_UNIT_IDENTIFICATION_VIEW_ID
Code for attribute.

See Also:
Constant Field Values

COL_ITEM_UNIT_IDENTIFICATION_VIEW_EXTERNAL_NUMBER

public static final int COL_ITEM_UNIT_IDENTIFICATION_VIEW_EXTERNAL_NUMBER
Code for attribute.

See Also:
Constant Field Values

COL_ITEM_UNIT_IDENTIFICATION_VIEW_MANUFACTURER_ID

public static final int COL_ITEM_UNIT_IDENTIFICATION_VIEW_MANUFACTURER_ID
Code for attribute.

See Also:
Constant Field Values

COL_ITEM_UNIT_IDENTIFICATION_VIEW_INTERNAL_NUMBER

public static final int COL_ITEM_UNIT_IDENTIFICATION_VIEW_INTERNAL_NUMBER
Code for attribute.

See Also:
Constant Field Values

COL_ITEM_UNIT_IDENTIFICATION_VIEW_RENTER_ID

public static final int COL_ITEM_UNIT_IDENTIFICATION_VIEW_RENTER_ID
Code for attribute.

See Also:
Constant Field Values

COL_ITEM_UNIT_IDENTIFICATION_VIEW_COMMENTS

public static final int COL_ITEM_UNIT_IDENTIFICATION_VIEW_COMMENTS
Code for attribute.

See Also:
Constant Field Values

COL_ITEM_UNIT_IDENTIFICATION_VIEW_RETIRED

public static final int COL_ITEM_UNIT_IDENTIFICATION_VIEW_RETIRED
Code for attribute.

See Also:
Constant Field Values

COL_ITEM_UNIT_IDENTIFICATION_VIEW_COST

public static final int COL_ITEM_UNIT_IDENTIFICATION_VIEW_COST
Code for attribute.

See Also:
Constant Field Values

COL_ITEM_UNIT_IDENTIFICATION_VIEW_CREATION_DATE

public static final int COL_ITEM_UNIT_IDENTIFICATION_VIEW_CREATION_DATE
Code for attribute.

See Also:
Constant Field Values

COL_ITEM_UNIT_IDENTIFICATION_VIEW_MODIFICATION_DATE

public static final int COL_ITEM_UNIT_IDENTIFICATION_VIEW_MODIFICATION_DATE
Code for attribute.

See Also:
Constant Field Values

ITEM_UNIT_IDENTIFICATION_VIEW_ADDITIONAL_COLUMNS

public static final int ITEM_UNIT_IDENTIFICATION_VIEW_ADDITIONAL_COLUMNS
How many columns have to be added in addition to the base class.

See Also:
Constant Field Values

ALL_ITEM_UNIT_IDENTIFICATION_VIEW_COLUMNS

public static final int[] ALL_ITEM_UNIT_IDENTIFICATION_VIEW_COLUMNS
Static variable for array of all columns codes. This array is initialized in static initializer below.


m_identification

protected Identification m_identification
Identification object.

Constructor Detail

ItemUnitIdentificationView

public ItemUnitIdentificationView()
Empty constructor


ItemUnitIdentificationView

public ItemUnitIdentificationView(Item item,
                                  Unit unit,
                                  Identification identification)
Constructor

Parameters:
item - - item object
unit - - unit object
identification - - identification object

ItemUnitIdentificationView

public ItemUnitIdentificationView(int iUnitId,
                                  int iDomainId,
                                  int iInventoryId,
                                  int iItemId,
                                  int iShippedCount,
                                  int iAvailableCount,
                                  double dCost,
                                  boolean bFoundHolder,
                                  java.sql.Timestamp creationDate,
                                  java.sql.Timestamp modificationDate,
                                  java.lang.String strName,
                                  java.lang.String strDescription,
                                  int iUnitOfMeasure,
                                  boolean bReusable,
                                  int iExpenseType,
                                  int iAvailableCount2,
                                  int iOnHoldCount,
                                  int iPopularityRank,
                                  int iShippedCount2,
                                  boolean bUniquelyTracked,
                                  int iMinimalAvailableCount,
                                  boolean bPermanentlyAssigned,
                                  double dAverageCost,
                                  double dPrice,
                                  int iDisplayOrder,
                                  java.lang.String strNameStem,
                                  java.lang.String strSize,
                                  java.sql.Timestamp lastRecountDate,
                                  java.sql.Timestamp creationDate2,
                                  java.sql.Timestamp modificationDate2,
                                  int iIdentificationId,
                                  java.lang.String strExternalNumber,
                                  int iManufacturerId,
                                  java.lang.String strInternalNumber,
                                  int iRenterId,
                                  java.lang.String strComments,
                                  boolean bRetired,
                                  double dCost2,
                                  java.sql.Timestamp creationDate3,
                                  java.sql.Timestamp modificationDate3)
Full constructor.

Parameters:
iUnitId - - see unit object
iDomainId - - see unit object
iInventoryId - - see unit object
iItemId - - see unit object
iShippedCount - - see unit object
iAvailableCount - - see unit object
dCost - - see unit object
bFoundHolder - - see unit object
creationDate - - see unit object
modificationDate - - see unit object
strName - - see item object
strDescription - - see item object
iUnitOfMeasure - - see item object
bReusable - - see item object
iExpenseType - - see item object
iAvailableCount2 - - see item object
iOnHoldCount - - see item object
iPopularityRank - - see item object
iShippedCount2 - - see item object
bUniquelyTracked - - see item object
iMinimalAvailableCount - - see item object
bPermanentlyAssigned - - see item object
dAverageCost - - see item object
dPrice - - see item object
iDisplayOrder - - see item object
strNameStem - - see item object
strSize - - see item object
lastRecountDate - - see item object
creationDate2 - - see item object
modificationDate2 - - see item object
iIdentificationId - - unique database generated ID for this identification
strExternalNumber - - unique identification for an item assigned by manufacturer. This is combination of characters and digits and it is only unique in combination with manufacturer.
iManufacturerId - - since two manufacturers can use the same mechanism to generate serial numbers, we need to track, who is the manufacturer, who generated this number.
strInternalNumber - - This is inventory wide unique number assigned by user which allows them to track uniquely their items independently from the manufacturer's external numbers. User can edit this number when the item is created. Even though it is called number this is combination of characters and digits.
iRenterId - - Items which have serial numbers are often rented and we need to identify them so they can be later returned. This will contain ID of the company we are renting it from or DataObject.NEW_ID if not rented.
dCost2 - - cost of item with external number
strComments - - Any comments about this item, e.g. who to return it to when rented.
bRetired - - If this external number should not be used again (for order) or issue, then user can retire the item by setting this flag.
creationDate3 - - timestamp when was the identification created
modificationDate3 - - timestamp when was the identification last time modified.
Method Detail

getDomainId

public int getDomainId()

Overrides:
getDomainId in class ItemUnitView

getId

public int getId()

Overrides:
getId in class ItemUnitView

getIdAsObject

public java.lang.Integer getIdAsObject()

Overrides:
getIdAsObject in class ItemUnitView

setId

public void setId(int iNewId)

Overrides:
setId in class ItemUnitView

getCreationTimestamp

public java.sql.Timestamp getCreationTimestamp()

Overrides:
getCreationTimestamp in class ItemUnitView

setCreationTimestamp

public void setCreationTimestamp(java.sql.Timestamp creationTimestamp)
Creation timestamp is timestamp when the data object was created.

Overrides:
setCreationTimestamp in class ItemUnitView
Parameters:
creationTimestamp - - new creation timestamp

getIdentification

public Identification getIdentification()
Return identification object

Returns:
Unit - identification object

equals

public boolean equals(java.lang.Object oObject)

Overrides:
equals in class ItemUnitView

hashCode

public int hashCode()

Overrides:
hashCode in class ItemUnitView

isSame

public boolean isSame(java.lang.Object oObject)

Overrides:
isSame in class ItemUnitView


Copyright © 2003 - 2006 OpenSubsystems s.r.o.