|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.core.persist.db.DatabaseFactoryImpl
org.opensubsystems.patterns.listdata.persist.db.impl.ListDatabaseFactoryImpl
org.opensubsystems.inventory.persist.db.IdentificationDatabaseFactory
public class IdentificationDatabaseFactory
Data factory to retrieve and manipulate identifications in persistence store.
| Field Summary | |
|---|---|
protected IdentificationDatabaseSchema |
m_schema
Schema to use to execute database dependent operations. |
| Fields inherited from class org.opensubsystems.patterns.listdata.persist.db.impl.ListDatabaseFactoryImpl |
|---|
m_arrOrderColumnCodes, m_arrOrderDirections, m_arrShowColumnCodes, m_listSchema |
| Fields inherited from class org.opensubsystems.core.persist.db.DatabaseFactoryImpl |
|---|
m_connectionFactory, m_iConcurrencySelectListResultSet, m_iDataType, m_iTypeSelectListResultSet, m_transactionFactory |
| Constructor Summary | |
|---|---|
IdentificationDatabaseFactory()
Default constructor. |
|
| Method Summary | |
|---|---|
int |
create(java.util.Collection colDataObject)
|
org.opensubsystems.core.data.DataObject |
create(org.opensubsystems.core.data.DataObject data)
|
Identification |
create(Identification identification,
boolean bCheckName)
Create Identification in the persistance store. |
void |
create(java.util.List lstIdentifications,
boolean bCheckUnique)
Create list of Identifications in the persistance store. |
void |
delete(int iId,
int iDomainId)
|
org.opensubsystems.core.data.DataObject |
get(int iId,
int iDomainId)
|
Identification |
get(int iInventoryId,
java.lang.String strInternalNumber)
Get specific identification identified by the number assigned to it by user, which should be unique in the inventory. |
java.util.Set |
getAllExternalNumbers(int iInventoryId)
Get all manufacturer specified external numbers in inventory. |
java.util.Set |
getAllInternalNumbers(int iInventoryId)
Get all user specified internal numbers for particular inventory. |
protected java.util.Map |
getDataWithExistingSerialNumbers(java.util.List lstSerialNumbers,
int iInventoryId)
Get all existing serial numbers and belonging IDs for specified inventory |
java.lang.String |
getExtNumberUniqueException(boolean bIsInsert,
boolean bIsList)
Method constructs and returns unique constraint exception for created or modified identifications |
java.util.List |
getForItem(int iItemId)
Get list with all identifications for specified item. |
java.lang.String |
getInternalNumberForExternalNumber(int iInventoryId,
java.lang.String strExternalNumber)
Get internal numbers for external number in inventory. |
java.lang.String |
getInternalNumberForNotUniquelyTracked(int iItemId)
Return unique internal number associated with this non uniquely tracked item. |
java.lang.String |
getNextInternalNumber(int iInventoryId)
Try to get the next internal number for particular inventory. |
org.opensubsystems.core.data.DataObject |
load(java.sql.ResultSet rsQueryResults,
int initialIndex)
|
org.opensubsystems.core.data.DataObject |
load(java.sql.ResultSet rsQueryResults,
int[] selectedColumns,
int initialIndex)
|
int |
save(java.util.Collection colDataObject)
Update collection of Identifications |
Identification |
save(Identification identification,
boolean bCheckName)
Updates Identification in the persistence store. |
void |
save(java.util.List lstIdentifications,
boolean bCheckUnique)
Update list of Identifications in the persistance store. |
org.opensubsystems.core.data.ModifiableDataObject |
save(org.opensubsystems.core.data.ModifiableDataObject data)
|
void |
setAllRetired(int iInventoryId)
Set all identifications in the inventory as retired since they should not be used anymore. |
void |
setRetired(java.util.Set idList)
Set all identifications in the specified list as retired since they should not be used anymore. |
int |
setValuesForInsert(java.sql.PreparedStatement insertStatement,
org.opensubsystems.core.data.DataObject data,
int iIndex)
|
int |
setValuesForUpdate(java.sql.PreparedStatement updateStatement,
org.opensubsystems.core.data.DataObject data,
int iIndex)
|
boolean |
verifyUniqueExternalNumber(Identification data,
boolean checkName)
Check external number, inventory, manufacturer is not used yet |
| Methods inherited from class org.opensubsystems.patterns.listdata.persist.db.impl.ListDatabaseFactoryImpl |
|---|
get, getDefaultListDefinition, getListDatabaseSchema |
| Methods inherited from class org.opensubsystems.core.persist.db.DatabaseFactoryImpl |
|---|
getConcurrencySelectListResultSet, getDataType, getTypeSelectListResultSet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opensubsystems.core.persist.DataFactory |
|---|
getDataType |
| Methods inherited from interface org.opensubsystems.patterns.listdata.persist.ListFactory |
|---|
get, getDefaultListDefinition |
| Field Detail |
|---|
protected IdentificationDatabaseSchema m_schema
| Constructor Detail |
|---|
public IdentificationDatabaseFactory()
throws org.opensubsystems.core.error.OSSException
org.opensubsystems.core.error.OSSException - - an error has occured| Method Detail |
|---|
public org.opensubsystems.core.data.DataObject load(java.sql.ResultSet rsQueryResults,
int[] selectedColumns,
int initialIndex)
throws org.opensubsystems.core.error.OSSDatabaseAccessException
load in interface org.opensubsystems.patterns.listdata.persist.db.ListDatabaseFactoryorg.opensubsystems.core.error.OSSDatabaseAccessException
public int setValuesForInsert(java.sql.PreparedStatement insertStatement,
org.opensubsystems.core.data.DataObject data,
int iIndex)
throws org.opensubsystems.core.error.OSSException,
java.sql.SQLException
setValuesForInsert in interface org.opensubsystems.core.persist.db.BasicDatabaseFactoryorg.opensubsystems.core.error.OSSException
java.sql.SQLException
public int setValuesForUpdate(java.sql.PreparedStatement updateStatement,
org.opensubsystems.core.data.DataObject data,
int iIndex)
throws org.opensubsystems.core.error.OSSException,
java.sql.SQLException
setValuesForUpdate in interface org.opensubsystems.core.persist.db.ModifiableDatabaseFactoryorg.opensubsystems.core.error.OSSException
java.sql.SQLException
public org.opensubsystems.core.data.DataObject get(int iId,
int iDomainId)
throws org.opensubsystems.core.error.OSSException
get in interface org.opensubsystems.core.persist.DataFactoryorg.opensubsystems.core.error.OSSException
public org.opensubsystems.core.data.DataObject load(java.sql.ResultSet rsQueryResults,
int initialIndex)
throws org.opensubsystems.core.error.OSSDatabaseAccessException
load in interface org.opensubsystems.core.persist.db.DatabaseFactoryorg.opensubsystems.core.error.OSSDatabaseAccessException
public org.opensubsystems.core.data.DataObject create(org.opensubsystems.core.data.DataObject data)
throws org.opensubsystems.core.error.OSSException
create in interface org.opensubsystems.core.persist.BasicDataFactoryorg.opensubsystems.core.error.OSSException
public Identification create(Identification identification,
boolean bCheckName)
throws org.opensubsystems.core.error.OSSException
create in interface IdentificationFactoryidentification - - item number item to createbCheckName - - if true external number has to be unique in the
inventory
org.opensubsystems.core.error.OSSException - - an error has occured
public int create(java.util.Collection colDataObject)
throws org.opensubsystems.core.error.OSSException
create in interface org.opensubsystems.core.persist.BasicDataFactoryorg.opensubsystems.core.error.OSSException
public void delete(int iId,
int iDomainId)
throws org.opensubsystems.core.error.OSSException
delete in interface org.opensubsystems.core.persist.BasicDataFactoryorg.opensubsystems.core.error.OSSException
public org.opensubsystems.core.data.ModifiableDataObject save(org.opensubsystems.core.data.ModifiableDataObject data)
throws org.opensubsystems.core.error.OSSException
save in interface org.opensubsystems.core.persist.ModifiableDataFactoryorg.opensubsystems.core.error.OSSException
public Identification save(Identification identification,
boolean bCheckName)
throws org.opensubsystems.core.error.OSSException
save in interface IdentificationFactoryidentification - - Identification item to createbCheckName - - if true external number has to be unique in the
inventory
org.opensubsystems.core.error.OSSException - - an error has occured
public int save(java.util.Collection colDataObject)
throws org.opensubsystems.core.error.OSSException
save in interface IdentificationFactorycolDataObject - - collection of identifications that have to be updated
org.opensubsystems.core.error.OSSException - - an error has occured
public void create(java.util.List lstIdentifications,
boolean bCheckUnique)
throws org.opensubsystems.core.error.OSSException
create in interface IdentificationFactorylstIdentifications - - list of Identification items to createbCheckUnique - - if true external number has to be unique in the
inventory
org.opensubsystems.core.error.OSSException - - an error has occured
public void save(java.util.List lstIdentifications,
boolean bCheckUnique)
throws org.opensubsystems.core.error.OSSException
save in interface IdentificationFactorylstIdentifications - - list of Identification items to updatebCheckUnique - - if true external number has to be unique in the
inventory
org.opensubsystems.core.error.OSSException - - an error has occured
public boolean verifyUniqueExternalNumber(Identification data,
boolean checkName)
throws org.opensubsystems.core.error.OSSException
verifyUniqueExternalNumber in interface IdentificationFactorydata - - data to checkcheckName - - if true name have to be unique
org.opensubsystems.core.error.OSSException - - an error occured
public java.lang.String getInternalNumberForNotUniquelyTracked(int iItemId)
throws org.opensubsystems.core.error.OSSException
getInternalNumberForNotUniquelyTracked in interface IdentificationFactoryiItemId - - item id
org.opensubsystems.core.error.OSSException - - an error has occured
public Identification get(int iInventoryId,
java.lang.String strInternalNumber)
throws org.opensubsystems.core.error.OSSException
get in interface IdentificationFactoryiInventoryId - - id of inventory to get the identification from
TODO: Improve: Why are we saying it should be unique? Why we do not
enforce the uniquenessstrInternalNumber - - internal number assigned to it by user which
should be unique in the inventory
org.opensubsystems.core.error.OSSException - - an error has occured
public java.lang.String getNextInternalNumber(int iInventoryId)
throws org.opensubsystems.core.error.OSSException
getNextInternalNumber in interface IdentificationFactoryiInventoryId - - inventory id to get the next internal number from
org.opensubsystems.core.error.OSSException - - an error has occured
public java.util.List getForItem(int iItemId)
throws org.opensubsystems.core.error.OSSException
getForItem in interface IdentificationFactoryiItemId - - item id to get identification for
org.opensubsystems.core.error.OSSException - - an error has occured
public java.util.Set getAllInternalNumbers(int iInventoryId)
throws org.opensubsystems.core.error.OSSException
getAllInternalNumbers in interface IdentificationFactoryiInventoryId - - inventory id to get the internal numbers for
org.opensubsystems.core.error.OSSException - - an error has occured
public java.util.Set getAllExternalNumbers(int iInventoryId)
throws org.opensubsystems.core.error.OSSException
getAllExternalNumbers in interface IdentificationFactoryiInventoryId - - inventory id to get the external numbers from
org.opensubsystems.core.error.OSSException - - an error has occured
public java.lang.String getInternalNumberForExternalNumber(int iInventoryId,
java.lang.String strExternalNumber)
throws org.opensubsystems.core.error.OSSException
getInternalNumberForExternalNumber in interface IdentificationFactoryiInventoryId - - inventory idstrExternalNumber - - external number
org.opensubsystems.core.error.OSSException - - an error has occured
public void setAllRetired(int iInventoryId)
throws org.opensubsystems.core.error.OSSException
setAllRetired in interface IdentificationFactoryiInventoryId - - id of inventory for Identifications
org.opensubsystems.core.error.OSSException - - an error has occured
public void setRetired(java.util.Set idList)
throws org.opensubsystems.core.error.OSSException
setRetired in interface IdentificationFactoryidList - - set with ids of Identification to set as retired
org.opensubsystems.core.error.OSSException - - an error has occured
protected java.util.Map getDataWithExistingSerialNumbers(java.util.List lstSerialNumbers,
int iInventoryId)
throws org.opensubsystems.core.error.OSSException
lstSerialNumbers - - list of external numbersiInventoryId - - inventory ID the external numbers will be checked for
org.opensubsystems.core.error.OSSException - - error occured while getting data
public java.lang.String getExtNumberUniqueException(boolean bIsInsert,
boolean bIsList)
bIsInsert - - flag signaling if there is processed insert or update
- true = insert identification is processed
- false = update identification is processedbIsList - - flag signaling if there is iserted/updated just 1 record
or list of records
- true = just 1 identification is inserted/updated
- false = list of identifications is inserted/updated
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||