|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.core.data.DataObject
org.opensubsystems.core.data.BasicDataObject
org.opensubsystems.core.data.ModifiableDataObject
org.opensubsystems.inventory.data.Identification
public class Identification
Unique identification assigned to an item by manufacturer or by user. It is used to track unique items in the inventory. Units, which are unique (flag uniquely tracked in an item the unit represents) should have assigned identification which uniquely identifies them. Once unique identification is associated to an unit, it is used to track it, whenever unit is ordered, issued or returned. Identification allows two unique identifiers to be matched together, one is assigned by manufacturer (e.g. serial number) and one assigned by user (e.g. identification in user's inventory). Since majority of the items have only a single unique identifier and since majority of users have only one numbering schema for their items, we store these two numbers together. This design doesn't allow for more than 2 unique numbers per item, but it will satisfy majority of the scenarios.
| Field Summary | |
|---|---|
static int[] |
ALL_FILTER_COLUMNS
Static variable for array of all filter columns codes. |
static int[] |
ALL_IDENTIFICATION_COLUMNS
Static variable for array of all columns codes. |
static int |
COL_IDENTIFICATION_COMMENTS
Code for attribute. |
static int |
COL_IDENTIFICATION_COST
Code for attribute. |
static int |
COL_IDENTIFICATION_CREATION_DATE
Code for attribute. |
static int |
COL_IDENTIFICATION_DOMAIN_ID
Code for attribute. |
static int |
COL_IDENTIFICATION_EXTERNAL_NUMBER
Code for attribute. |
static java.lang.Integer |
COL_IDENTIFICATION_EXTERNAL_NUMBER_OBJ
Object code for table column. |
static int |
COL_IDENTIFICATION_ID
Code for attribute. |
static int |
COL_IDENTIFICATION_INTERNAL_NUMBER
Code for attribute. |
static java.lang.Integer |
COL_IDENTIFICATION_INTERNAL_NUMBER_OBJ
Object code for table column. |
static int |
COL_IDENTIFICATION_INVENTORY_ID
Code for attribute. |
static int |
COL_IDENTIFICATION_ITEM_ID
Code for attribute. |
static int |
COL_IDENTIFICATION_MANUFACTURER_ID
Code for attribute. |
static int |
COL_IDENTIFICATION_MODIFICATION_DATE
Code for attribute. |
static int |
COL_IDENTIFICATION_RENTER_ID
Code for attribute. |
static int |
COL_IDENTIFICATION_RETIRED
Code for attribute. |
static int |
COL_IDENTIFICATION_UNIT_ID
Code for attribute. |
static java.lang.String |
DEFAULT_INTERNAL_NUMBER
Default value for internal number |
static int[] |
DEFAULT_LIST_COLUMNS
Default columns to retrieve when asked for list of objects. |
static int[] |
DEFAULT_LIST_SORT_COLUMNS
Default columns to sort by when asked for list of objects. |
static java.lang.String[] |
DEFAULT_LIST_SORT_ORDER
Default order in which the columns will be sorted. |
protected boolean |
m_bRetired
If this external number should not be used again for order or issue, then user can retire the item by setting this flag. |
protected double |
m_dCost
Cost of item with identification. |
protected int |
m_iInventoryId
What inventory this identification belongs to. |
protected int |
m_iItemId
What item this identification represents. |
protected int |
m_iManufacturerId
Since two manufacturers can use the same mechanism to generate external numbers, we need to track, who is the manufacturer, who generated this number. |
protected int |
m_iRenterId
Items, which have external numbers are often rented or borrowed and we need to identify them so they can be returned later. |
protected int |
m_iUnitId
What unit this identification belongs to. |
protected java.lang.String |
m_strComments
Any comments about this item, for example who or when to return it to. |
protected java.lang.String |
m_strExternalNumber
Unique identification for an item assigned by manufacturer. |
protected java.lang.String |
m_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. |
protected static int |
s_iCommentsMaxLength
Maximal length of identification comments in chars |
protected static int |
s_iExternalNumberMaxLength
Maximal length of identification external number in chars |
protected static int |
s_iInternalNumberMaxLength
Maximal length of identification internal number in chars |
| Fields inherited from class org.opensubsystems.core.data.ModifiableDataObject |
|---|
m_modificationTimestamp |
| 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 | |
|---|---|
Identification()
Empty constructor |
|
Identification(int iDomainId)
Empty identification for a specified domain initialized to default parameters. |
|
Identification(int iId,
int iDomainId,
int iInventoryId,
int iItemId,
int iUnitId,
java.lang.String strExternalNumber,
int iManufacturerId,
java.lang.String strInternalNumber,
int iRenterId,
java.lang.String strComments,
boolean bRetired,
double dCost,
java.sql.Timestamp creationTimestamp,
java.sql.Timestamp modificationTimestamp)
Full constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
getComments()
|
static int |
getCommentsMaxLengthStatic()
Get static description max length parameter. |
double |
getCost()
|
java.lang.String |
getExternalNumber()
|
static int |
getExternalNumberMaxLengthStatic()
Get static description max length parameter. |
java.lang.String |
getInternalNumber()
|
static int |
getInternalNumberMaxLengthStatic()
Get static description max length parameter. |
int |
getInventoryId()
|
int |
getItemId()
|
int |
getManufacturerId()
|
int |
getRenterId()
|
int |
getUnitId()
|
boolean |
isRetired()
|
boolean |
isSame(java.lang.Object oObject)
|
void |
setComments(java.lang.String strComments)
|
static void |
setCommentsMaxLength(int iNewCommentsMaxLength)
Set static description max length parameter. |
void |
setCost(double dCost)
|
void |
setExternalNumber(java.lang.String strExternalNumber)
|
static void |
setExternalNumberMaxLength(int iNewExternalNumberMaxLength)
Set static description max length parameter. |
void |
setInternalNumber(java.lang.String strInternalNumber)
|
static void |
setInternalNumberMaxLength(int iNewInternalNumberMaxLength)
Set static description max length parameter. |
void |
setInventoryId(int iInventoryId)
|
void |
setItemId(int iItemId)
|
void |
setRenterId(int renterId)
|
void |
setRetired(boolean bRetired)
|
| Methods inherited from class org.opensubsystems.core.data.ModifiableDataObject |
|---|
equals, getModificationTimestamp, hashCode, restore, setModificationTimestamp |
| Methods inherited from class org.opensubsystems.core.data.BasicDataObject |
|---|
getCreationTimestamp, getDomainId, getId, getIdAsObject, restore, setCreationTimestamp, setId |
| 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 |
|---|
public static final int COL_IDENTIFICATION_ID
public static final int COL_IDENTIFICATION_DOMAIN_ID
public static final int COL_IDENTIFICATION_INVENTORY_ID
public static final int COL_IDENTIFICATION_ITEM_ID
public static final int COL_IDENTIFICATION_UNIT_ID
public static final int COL_IDENTIFICATION_EXTERNAL_NUMBER
public static final java.lang.Integer COL_IDENTIFICATION_EXTERNAL_NUMBER_OBJ
public static final int COL_IDENTIFICATION_MANUFACTURER_ID
public static final int COL_IDENTIFICATION_INTERNAL_NUMBER
public static final java.lang.Integer COL_IDENTIFICATION_INTERNAL_NUMBER_OBJ
public static final int COL_IDENTIFICATION_RENTER_ID
public static final int COL_IDENTIFICATION_COMMENTS
public static final int COL_IDENTIFICATION_RETIRED
public static final int COL_IDENTIFICATION_COST
public static final int COL_IDENTIFICATION_CREATION_DATE
public static final int COL_IDENTIFICATION_MODIFICATION_DATE
public static final java.lang.String DEFAULT_INTERNAL_NUMBER
public static final int[] ALL_IDENTIFICATION_COLUMNS
public static final int[] ALL_FILTER_COLUMNS
public static final int[] DEFAULT_LIST_COLUMNS
public static final int[] DEFAULT_LIST_SORT_COLUMNS
public static final java.lang.String[] DEFAULT_LIST_SORT_ORDER
protected static int s_iExternalNumberMaxLength
protected static int s_iInternalNumberMaxLength
protected static int s_iCommentsMaxLength
protected int m_iInventoryId
protected int m_iItemId
protected int m_iUnitId
protected java.lang.String m_strExternalNumber
protected int m_iManufacturerId
protected java.lang.String m_strInternalNumber
protected int m_iRenterId
protected java.lang.String m_strComments
protected boolean m_bRetired
protected double m_dCost
| Constructor Detail |
|---|
public Identification()
public Identification(int iDomainId)
iDomainId - - Id of the domain this identification belongs to
public Identification(int iId,
int iDomainId,
int iInventoryId,
int iItemId,
int iUnitId,
java.lang.String strExternalNumber,
int iManufacturerId,
java.lang.String strInternalNumber,
int iRenterId,
java.lang.String strComments,
boolean bRetired,
double dCost,
java.sql.Timestamp creationTimestamp,
java.sql.Timestamp modificationTimestamp)
iId - - unique database generated id for this identificationiDomainId - - what domain this identification belongs toiInventoryId - - what inventory this identification belongs to.iItemId - - What item this external number represents. This
is here to speed up searches since it has to be the
same as the one in inventory id.iUnitId - - what unit this external number belongs to.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 external 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. Even though it is called number
this is combination of characters and digits.iRenterId - - Items which have external 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.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.dCost - - cost of item with this internal numbercreationTimestamp - - timestamp when was the identification createdmodificationTimestamp - - timestamp when was the identification last
time modified.| Method Detail |
|---|
public static int getExternalNumberMaxLengthStatic()
public static void setExternalNumberMaxLength(int iNewExternalNumberMaxLength)
iNewExternalNumberMaxLength - - new external number max lengthpublic static int getInternalNumberMaxLengthStatic()
public static void setInternalNumberMaxLength(int iNewInternalNumberMaxLength)
iNewInternalNumberMaxLength - - new internal number max lengthpublic static int getCommentsMaxLengthStatic()
public static void setCommentsMaxLength(int iNewCommentsMaxLength)
iNewCommentsMaxLength - - new comments max lengthpublic int getInventoryId()
public void setInventoryId(int iInventoryId)
iInventoryId - - what inventory this identification belongs topublic int getUnitId()
public int getItemId()
public void setItemId(int iItemId)
iItemId - - what item this identification representspublic int getManufacturerId()
public java.lang.String getInternalNumber()
public java.lang.String getExternalNumber()
public int getRenterId()
public java.lang.String getComments()
public void setRenterId(int renterId)
renterId - - Items, which have external numbers are often rented or
borrowed and we need to identify them so they can be
returned later.public void setComments(java.lang.String strComments)
strComments - - Any comments about this item, for example who to
return it to.public void setInternalNumber(java.lang.String strInternalNumber)
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.public void setExternalNumber(java.lang.String strExternalNumber)
strExternalNumber - - unique identification for an item assigned by
manufacturer.public boolean isRetired()
public double getCost()
public void setCost(double dCost)
dCost - - cost of item with item number.public void setRetired(boolean bRetired)
bRetired - - If this external number should not be used again for
order or issue, then user can retire the item by setting
this flag.public boolean isSame(java.lang.Object oObject)
isSame in class org.opensubsystems.core.data.DataObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||