public class PendingProductController extends JDBCObjectController<PendingProduct>
PendingProduct
class. Provides methods for
retrieving and persisting pending product table records in the database.Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
The class' serialization version id.
|
ivDBObjCls, ivFieldCount, ivFieldKeyAlt, ivFieldKeyPri, ivFieldResPfx, ivSyncLast, ivSyncType, ivTableName
ivHashCode, ivHashFlds, ivObjAttrs
Constructor and Description |
---|
PendingProductController()
The constructor for the controller.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(PendingProduct obj)
Adds a new record to the table associated with the controller.
|
boolean |
delete(PendingProduct obj)
Deletes an existing record from the table associated with the controller.
|
boolean |
delete(PendingProduct obj,
boolean deleteall)
Deletes a pending product record from the database, plus optionally
deletes any associated pending product information (cross references,
descriptions, images).
|
boolean |
deleteBatch(ImportBatch batch)
Deletes all records from the pending product table for the given batch
plus any associated pending product information (cross references, images,
descriptions).
|
boolean |
deleteBatch(int batch)
Deletes all records from the pending product table for the given batch
number plus any associated pending product information (cross references,
images, descriptions).
|
boolean |
deleteBatchUnselected(ImportBatch batch)
Deletes unselected records from the pending product table for the given
batch plus any associated pending product information (cross references,
images, descriptions).
|
boolean |
deleteBatchUnselected(int batch)
Deletes unselected records from the pending product table for the given
batch number plus any associated pending product information (cross
references, images, descriptions).
|
boolean |
deselectBatch(ImportBatch batch)
Deselects all pending product records for the given batch.
|
boolean |
deselectBatch(int batch)
Deselects all pending product records for the given batch number.
|
boolean |
deselectBatchFind(ImportBatch batch,
int findkey)
Deselects pending product records for the given batch and find key.
|
boolean |
deselectBatchFind(int batch,
int findkey)
Deselects pending product records for the given batch number and find key.
|
PendingProduct |
get(java.lang.String code,
java.lang.String uom)
Returns the pending product record for the given product code and unit of
measure code.
|
java.lang.Object[] |
getAllAsRS()
Returns a result set of all pending product records.
|
java.util.ArrayList<PendingProduct> |
getBatch(ImportBatch batch)
Returns a collection of pending product records for the given batch.
|
java.util.ArrayList<PendingProduct> |
getBatch(int batch)
Returns a collection of pending product records for the given batch number.
|
int |
getBatchCount(ImportBatch batch)
Returns the number of pending product records in the given batch.
|
int |
getBatchCount(int batch)
Returns the number of pending product records in the given batch number.
|
int |
getBatchErrorCount(ImportBatch batch,
java.lang.String errorcode)
Returns the number of pending product records in the given batch that
have the given error.
|
int |
getBatchErrorCount(int batch,
java.lang.String errorcode)
Returns the number of pending product records in the given batch number
that have the given error.
|
java.util.ArrayList<PendingProduct> |
getBatchFind(ImportBatch batch,
int findkey)
Returns a collection of pending product records for the given batch and
find key.
|
java.util.ArrayList<PendingProduct> |
getBatchFind(int batch,
int findkey)
Returns a collection of pending product records for the given batch number
and find key.
|
int |
getBatchMatchCount(ImportBatch batch,
java.lang.String field,
java.lang.String operand,
java.lang.String argument)
Returns the number of pending product records in the given batch that have
a field that contains characters matching the given criteria.
|
int |
getBatchMatchCount(int batch,
java.lang.String field,
java.lang.String operand,
java.lang.String argument)
Returns the number of pending product records in the given batch number
that have a field that contains characters matching the given criteria.
|
int |
getBatchNoErrorCount(ImportBatch batch)
Returns the number of pending product records in the given batch that
have no errors.
|
int |
getBatchNoErrorCount(int batch)
Returns the number of pending product records in the given batch number
that have no errors.
|
java.util.ArrayList<PendingProduct> |
getBatchSelected(ImportBatch batch)
Returns a collection of selected pending product records for the given
batch.
|
java.util.ArrayList<PendingProduct> |
getBatchSelected(int batch)
Returns a collection of selected pending product records for the given
batch number.
|
int |
getBatchSelectedCount(ImportBatch batch)
Returns the number of selected pending product records in the given batch.
|
int |
getBatchSelectedCount(int batch)
Returns the number of selected pending product records in the given batch
number.
|
java.util.ArrayList<PendingProduct> |
getBatchUnselected(ImportBatch batch)
Returns a collection of unselected pending product records for the given
batch.
|
java.util.ArrayList<PendingProduct> |
getBatchUnselected(int batch)
Returns a collection of unselected pending product records for the given
batch number.
|
int |
getBatchUnselectedCount(ImportBatch batch)
Returns the number of unselected pending product records in the given batch.
|
int |
getBatchUnselectedCount(int batch)
Returns the number of unselected pending product records in the given batch
number.
|
boolean |
hasProduct(java.lang.String code)
Answers if a given product (code only) exists in the pending product
table.
|
boolean |
hasProduct(java.lang.String code,
java.lang.String uom)
Answers if a given product (code & uom) exists in the pending product
table.
|
boolean |
selectBatch(ImportBatch batch)
Selects all pending product records for the given batch.
|
boolean |
selectBatch(int batch)
Selects all pending product records for the given batch number.
|
boolean |
selectBatchFind(ImportBatch batch,
int findkey)
Selects pending product records for the given batch and find key.
|
boolean |
selectBatchFind(int batch,
int findkey)
Selects pending product records for the given batch number and find key.
|
boolean |
setBatchErrorFind(ImportBatch batch,
java.lang.String errorcode,
int findkey)
Sets the find key for pending product records in the given batch that have
the given error.
|
boolean |
setBatchErrorFind(int batch,
java.lang.String errorcode,
int findkey)
Sets the find key for pending product records in the given batch number
that have the given error.
|
boolean |
setBatchMatchFind(ImportBatch batch,
java.lang.String field,
java.lang.String operand,
java.lang.String argument,
int findkey)
Sets the find key for pending product records in the given batch that have
a field that contains characters matching the given criteria.
|
boolean |
setBatchMatchFind(int batch,
java.lang.String field,
java.lang.String operand,
java.lang.String argument,
int findkey)
Sets the find key for pending product records in the given batch number
that have a field that contains characters matching the given criteria.
|
PendingProduct |
valuesToObject(java.util.HashMap<java.lang.String,java.lang.Object> attrs)
Returns a database object from the given set of attributes.
|
add, add, arrayToMap, arrayToMap, countAll, delete, deleteAll, dispose, equals, getAll, getConnection, getConnectionInfo, getController, getFieldNames, getFieldNamesForKey, getFieldNamesForUpdate, getFieldNulls, getFieldNullsForKey, getFieldNullsForUpdate, getFieldsForOrderBy, getFieldsForWhere, getFieldSize, getFieldTypes, getFieldTypesForKey, getFieldTypesForUpdate, getStatementForDelete, getStatementForGet, getStatementForGetAll, getStatementForInsert, getStatementForUpdate, getStatementKey, getStatementString, getTableName, hasFieldNamesForKey, hasFieldNamesForUpdate, isDuplicate, resultSetToArray, resultSetToMap, resultSetToMap, resultSetToObject, setConnectionInfo, setPSDeleteValues, setPSExistsValues, setPSInsertValues, setPSUpdateValues, setPSValue, update, update
cloneMapAttributes, formatValue, formatValue, getHashFields, getMapArrayList, getMapAttributes, getMapBigDecimal, getMapBoolean, getMapDate, getMapDouble, getMapInteger, getMapLong, getMapMapped, getMapObject, getMapShort, getMapString, getMapString, getMapStringBuffer, getMapStringBuilder, getMapTime, getMapTimestamp, getMapVector, hashCode, setHashFields, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMapAttributes, setMapObject, setMapTime, setMapTimestamp, toStringArray
private static final long serialVersionUID
public PendingProductController()
public boolean add(PendingProduct obj)
add
in JDBCObjectController
. Also adds any
associated customer-product cross references.add
in class JDBCObjectController<PendingProduct>
obj
- (JDBCObject) The object for the record to be added.true
if the record added successfully,
otherwise false
.public boolean delete(PendingProduct obj)
delete
in JDBCObjectController
. Does not delete
any associated information (cross references, descriptions, images).delete
in class JDBCObjectController<PendingProduct>
obj
- (JDBCObject) The object for the record to be deleted.true
if the record deleted successfully,
otherwise false
.public PendingProduct valuesToObject(java.util.HashMap<java.lang.String,java.lang.Object> attrs)
valuesToObject
in JDBCObjectController
.valuesToObject
in class JDBCObjectController<PendingProduct>
attrs
- (HashMap) The attributes to assign to the new object.public boolean delete(PendingProduct obj, boolean deleteall)
obj
- (PendingProduct) The pending product to delete.deleteall
- (boolean) true
if all pending product info
is to be deleted, false
if only the pending product
record is to be deleted and all other info is to be left as is
(such as when pending product records are posted to the product
table).true
if the record deleted successfully,
otherwise false
.public boolean deleteBatch(ImportBatch batch)
batch
- (ImportBatch) The batch for the records to delete.true
if the deletes were successful,
otherwise false
.public boolean deleteBatch(int batch)
batch
- (int) The batch number for the records to delete.true
if the deletes were successful,
otherwise false
.public boolean deleteBatchUnselected(ImportBatch batch)
batch
- (ImportBatch) The batch for the records to delete.true
if the deletes were successful,
otherwise false
.public boolean deleteBatchUnselected(int batch)
batch
- (int) The batch number for the records to delete.true
if the deletes were successful,
otherwise false
.public boolean deselectBatch(ImportBatch batch)
batch
- (ImportBatch) The batch for the records to deselect.true
if the deselects were successful,
otherwise false
.public boolean deselectBatch(int batch)
batch
- (int) The batch number for the records to deselect.true
if the deselects were successful,
otherwise false
.public boolean deselectBatchFind(ImportBatch batch, int findkey)
batch
- (ImportBatch) The batch for the records to deselect.findkey
- (int) The find key for the records to deselect.true
if the deselects were successful,
otherwise false
.public boolean deselectBatchFind(int batch, int findkey)
batch
- (int) The batch number for the records to deselect.findkey
- (int) The find key for the records to deselect.true
if the deselects were successful,
otherwise false
.public PendingProduct get(java.lang.String code, java.lang.String uom)
code
- (String) The product code for the desired record.uom
- (String) The unit of measure code for the desired record.public java.lang.Object[] getAllAsRS()
The invoker of this method is responsible for closing the returned result set and prepared statement.
public java.util.ArrayList<PendingProduct> getBatch(ImportBatch batch)
batch
- (ImportBatch) The batch for the desired records.public java.util.ArrayList<PendingProduct> getBatch(int batch)
batch
- (int) The batch number for the desired records.public int getBatchCount(ImportBatch batch)
batch
- (ImportBatch) The batch for the desired count.public int getBatchCount(int batch)
batch
- (int) The batch number for the desired count.public int getBatchErrorCount(ImportBatch batch, java.lang.String errorcode)
batch
- (ImportBatch) The batch for the desired count.errorcode
- (String) The code for the error to count.public int getBatchErrorCount(int batch, java.lang.String errorcode)
batch
- (int) The batch number for the desired count.errorcode
- (String) The code for the error to count.public java.util.ArrayList<PendingProduct> getBatchFind(ImportBatch batch, int findkey)
batch
- (ImportBatch) The batch for the desired records.findkey
- (int) The find key for the desired records.public java.util.ArrayList<PendingProduct> getBatchFind(int batch, int findkey)
batch
- (int) The batch number for the desired records.findkey
- (int) The find key for the desired records.public int getBatchMatchCount(ImportBatch batch, java.lang.String field, java.lang.String operand, java.lang.String argument)
batch
- (ImportBatch) The batch for the desired count.field
- (String) The field that is to be involved in determining
the query results. This value is appended to the end of the
sql properties key when obtaining the appropriate sql statement
for the requested query.operand
- (String) The operation that the query is to perform
on the given field in order to determine the query results.
Currently only "contains" and "equals" are supported.argument
- (String) The query search argument. The character
string that the query is to use in determining its results.public int getBatchMatchCount(int batch, java.lang.String field, java.lang.String operand, java.lang.String argument)
batch
- (int) The batch number for the desired count.field
- (String) The field that is to be involved in determining
the query results. This value is appended to the end of the
sql properties key when obtaining the appropriate sql statement
for the requested query.operand
- (String) The operation that the query is to perform
on the given field in order to determine the query results.
Currently only "contains" and "equals" are supported.argument
- (String) The query search argument. The character
string that the query is to use in determining its results.public int getBatchNoErrorCount(ImportBatch batch)
batch
- (ImportBatch) The batch for the desired count.public int getBatchNoErrorCount(int batch)
batch
- (int) The batch number for the desired count.public java.util.ArrayList<PendingProduct> getBatchSelected(ImportBatch batch)
batch
- (ImportBatch) The batch for the desired records.public java.util.ArrayList<PendingProduct> getBatchSelected(int batch)
batch
- (int) The batch number for the desired records.public int getBatchSelectedCount(ImportBatch batch)
batch
- (ImportBatch) The batch for the desired count.public int getBatchSelectedCount(int batch)
batch
- (int) The batch number for the desired count.public java.util.ArrayList<PendingProduct> getBatchUnselected(ImportBatch batch)
batch
- (ImportBatch) The batch for the desired records.public java.util.ArrayList<PendingProduct> getBatchUnselected(int batch)
batch
- (int) The batch number for the desired records.public int getBatchUnselectedCount(ImportBatch batch)
batch
- (ImportBatch) The batch for the desired count.public int getBatchUnselectedCount(int batch)
batch
- (int) The batch number for the desired count.public boolean hasProduct(java.lang.String code)
code
- (String) The product code to check.true
if the product exists, otherwise
false
.public boolean hasProduct(java.lang.String code, java.lang.String uom)
code
- (String) The product code to check.uom
- (String) The unit of measure code to check.true
if the product exists, otherwise
false
.public boolean selectBatch(ImportBatch batch)
batch
- (ImportBatch) The batch for the records to select.true
if the selects were successful,
otherwise false
.public boolean selectBatch(int batch)
batch
- (int) The batch number for the records to select.true
if the selects were successful,
otherwise false
.public boolean selectBatchFind(ImportBatch batch, int findkey)
batch
- (ImportBatch) The batch for the records to select.findkey
- (int) The find key for the records to select.true
if the selects were successful,
otherwise false
.public boolean selectBatchFind(int batch, int findkey)
batch
- (int) The batch number for the records to select.findkey
- (int) The find key for the records to select.true
if the selects were successful,
otherwise false
.public boolean setBatchErrorFind(ImportBatch batch, java.lang.String errorcode, int findkey)
batch
- (ImportBatch) The batch for the records to update.errorcode
- (String) The code for the error that is to be selected
for update.findkey
- (int) The find key that is to be set in the selected
pending products.true
if the find key is successfully set,
otherwise false
.public boolean setBatchErrorFind(int batch, java.lang.String errorcode, int findkey)
batch
- (int) The batch number for the records to update.errorcode
- (String) The code for the error that is to be selected
for update.findkey
- (int) The find key that is to be set in the selected
pending products.true
if the find key is successfully set,
otherwise false
.public boolean setBatchMatchFind(ImportBatch batch, java.lang.String field, java.lang.String operand, java.lang.String argument, int findkey)
batch
- (ImportBatch) The batch for the records to update.field
- (String) The field that is to be involved in determining
the query results. This value is appended to the end of the
sql properties key when obtaining the appropriate sql statement
for the requested query.operand
- (String) The operation that the query is to perform
on the given field in order to determine the query results.
Currently only "contains" and "equals" are supported.argument
- (String) The query search argument. The character
string that the query is to use in determining its results.findkey
- (int) The find key that is to be set in the selected
pending products.true
if the find key is successfully set,
otherwise false
.public boolean setBatchMatchFind(int batch, java.lang.String field, java.lang.String operand, java.lang.String argument, int findkey)
batch
- (int) The batch number for the records to update.field
- (String) The field that is to be involved in determining
the query results. This value is appended to the end of the
sql properties key when obtaining the appropriate sql statement
for the requested query.operand
- (String) The operation that the query is to perform
on the given field in order to determine the query results.
Currently only "contains" and "equals" are supported.argument
- (String) The query search argument. The character
string that the query is to use in determining its results.findkey
- (int) The find key that is to be set in the selected
pending products.true
if the find key is successfully set,
otherwise false
.