public class ProductAttributeController extends JDBCObjectController<ProductAttribute>
ProductAttribute class. Provides methods for
retrieving and persisting product and ext. product attributes x-ref records
in the database.| Modifier and Type | Field and Description |
|---|---|
private static java.util.Hashtable<java.lang.String,java.util.ArrayList<java.lang.String[]>> |
cvUniqueAttributes
A table of unique attribute values per descriptor code.
|
private static long |
serialVersionUID
The class' serialization version id.
|
ivDBObjCls, ivFieldCount, ivFieldKeyAlt, ivFieldKeyPri, ivFieldResPfx, ivSyncLast, ivSyncType, ivTableNameivHashCode, ivHashFlds, ivObjAttrs| Constructor and Description |
|---|
ProductAttributeController()
The constructor for the controller.
|
| Modifier and Type | Method and Description |
|---|---|
int |
add(ProductAttribute obj,
boolean logdup)
Adds a new record to the table associated with the controller.
|
boolean |
delete(ProductAttribute obj)
Deletes an existing record from the table associated with the controller.
|
boolean |
deleteAll()
Deletes all records in the table associated with the controller.
|
boolean |
deleteDescriptor(java.lang.String desccode)
Deletes all attribute records for a descriptor code.
|
boolean |
deleteProduct(Product product)
Deletes all attribute records for a product.
|
ProductAttribute |
get(java.lang.String prodcode,
java.lang.String uomcode,
java.lang.String desccode)
Returns the attribute record for a product code, unit of measure code
and descriptor code.
|
java.util.ArrayList<ProductAttribute> |
getDisplayable(Product product)
Returns a collection of the displayable attribute records for a product.
|
java.util.ArrayList<ProductAttribute> |
getFiltersForCategory(Category category)
Returns a collection of summarized product attribute records for the
given category.
|
java.util.ArrayList<ProductAttribute> |
getFiltersForCategory(java.lang.String category)
Returns a collection of summarized product attribute records for the
given category code.
|
java.util.ArrayList<ProductAttribute> |
getFiltersForSearch(java.util.ArrayList<Product> products)
Returns a collection of summarized product attribute records for the
given set of products.
|
java.util.ArrayList<ProductAttribute> |
getProduct(Product product)
Returns a collection of attribute records for a product.
|
java.util.ArrayList<ProductAttribute> |
getProduct(java.lang.String prodcode,
java.lang.String uomcode)
Returns a collection of attribute records for a product code and unit of
measure code.
|
java.util.ArrayList<java.lang.String[]> |
getUniqueValues(java.lang.String desccode)
Returns a collection of unique attribute values for a descriptor code.
|
boolean |
hasDescriptor(java.lang.String desccode)
Answers if the given descriptor code has been assigned to one or more
products.
|
boolean |
update(ProductAttribute obj)
Updates an existing record in the table associated with the controller.
|
add, add, arrayToMap, arrayToMap, countAll, delete, 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, valuesToObjectcloneMapAttributes, 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, toStringArrayprivate static final long serialVersionUID
private static java.util.Hashtable<java.lang.String,java.util.ArrayList<java.lang.String[]>> cvUniqueAttributes
public ProductAttributeController()
public int add(ProductAttribute obj, boolean logdup)
add in JDBCObjectController.add in class JDBCObjectController<ProductAttribute>obj - (JDBCObject) The object for the record to be added.logdup - (boolean) true if duplicate errors are to be
logged as an exception, otherwise false if not. When
duplicates are logged, the return value of 1 is never returned.public boolean delete(ProductAttribute obj)
delete in class JDBCObjectController<ProductAttribute>obj - (JDBCObject) The object for the record to be deleted.true if the record deleted successfully,
otherwise false.public boolean deleteAll()
deleteAll in class JDBCObjectController<ProductAttribute>true if the deletes are successful,
otherwise false.public boolean update(ProductAttribute obj)
update in class JDBCObjectController<ProductAttribute>obj - (JDBCObject) The object for the record to be updated.true if the record updated successfully,
otherwise false.public boolean deleteDescriptor(java.lang.String desccode)
desccode - (String) The descriptor code for the records to delete.true if the deletes are successful,
otherwise false.public boolean deleteProduct(Product product)
product - (Product) The product for the records to delete.true if the deletes are successful,
otherwise false.public ProductAttribute get(java.lang.String prodcode, java.lang.String uomcode, java.lang.String desccode)
prodcode - (String) The product code for the desired record.uomcode - (String) The unit of measure code for the desired record.desccode - (String) The descriptor code for the desired record.public java.util.ArrayList<ProductAttribute> getDisplayable(Product product)
product - (Product) The product for the desired records.public java.util.ArrayList<ProductAttribute> getFiltersForCategory(Category category)
category - (Category) The category for the desired records.public java.util.ArrayList<ProductAttribute> getFiltersForCategory(java.lang.String category)
category - (String) The category code for the desired records.public java.util.ArrayList<ProductAttribute> getFiltersForSearch(java.util.ArrayList<Product> products)
products - (ArrayList) The products for the desired records.public java.util.ArrayList<ProductAttribute> getProduct(Product product)
product - (Product) The product for the desired records.public java.util.ArrayList<ProductAttribute> getProduct(java.lang.String prodcode, java.lang.String uomcode)
prodcode - (String) The product code for the desired records.uomcode - (String) The unit of measure code for the desired records.public java.util.ArrayList<java.lang.String[]> getUniqueValues(java.lang.String desccode)
desccode - (String) The descriptor code for the desired values.public boolean hasDescriptor(java.lang.String desccode)
desccode - (String) The descriptor code to be checked.true if descriptor code was found in
the table, otherwise false.