|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.fenalco.entities.AbstractProduct
public abstract class AbstractProduct
Esta clase representa un producto abstracto, los productos concretos deben extenderla y adicionarle le funcionalidad requerida asi como los métodos para acceder a la base de datos
| Field Summary | |
|---|---|
protected java.lang.String |
code
|
protected java.lang.String |
name
|
protected PriceScale |
price
|
protected int |
quantity
|
protected int |
supplierId
|
protected java.lang.String |
supplierName
|
protected int |
supplierProductId
|
protected int |
tableId
|
| Constructor Summary | |
|---|---|
AbstractProduct()
|
|
| Method Summary | |
|---|---|
abstract boolean |
delete(Transaction transaction)
elimina el producto de la base de datos creando la instrucción sql y la pasa a la transacción |
java.lang.String |
getCode()
Getter for property code. |
java.lang.String |
getName()
Getter for property name. |
double |
getPrice()
Getter for property price. |
int |
getQuantity()
Getter for property quantity. |
int |
getSupplierId()
Getter for property supplierId. |
java.lang.String |
getSupplierName()
Getter for property supplierName. |
int |
getSupplierProductId()
Getter for property supplierProductId. |
int |
getTableId()
Getter for property tableId. |
abstract boolean |
loadData(int id)
Carga los datos del producto de la base de datos a partir del id del producto en la tabla necesaria |
abstract boolean |
saveData(Transaction transaction)
almacena los datos del producto en la base de datos construyendo la sentencia sql necesaria y adicionandola a la transacción. |
void |
setCode(java.lang.String code)
Setter for property code. |
void |
setName(java.lang.String name)
Setter for property name. |
void |
setPrice(PriceScale price)
Setter for property price. |
void |
setQuantity(int quantity)
Setter for property quantity. |
void |
setSupplierId(int supplierId)
Setter for property supplierId. |
void |
setSupplierName(java.lang.String supplierName)
Setter for property supplierName. |
void |
setSupplierProductId(int supplierProductId)
Setter for property supplierProductId. |
void |
setTableId(int tableId)
Setter for property tableId. |
abstract boolean |
update(Transaction transaction)
actualiza el producto en la base de datos construyendo la instrucción sql y pasandola a la transacción |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int tableId
protected int supplierProductId
protected int supplierId
protected java.lang.String supplierName
protected java.lang.String code
protected java.lang.String name
protected int quantity
protected PriceScale price
| Constructor Detail |
|---|
public AbstractProduct()
| Method Detail |
|---|
public abstract boolean loadData(int id)
id - identificador del producto en la tabla necesaria
public abstract boolean saveData(Transaction transaction)
transaction - la transacción que se está ejecutando
public abstract boolean update(Transaction transaction)
transaction - la transacción que se está ejecutando
public abstract boolean delete(Transaction transaction)
transaction - la transacción que se está ejecutando
public java.lang.String getName()
public void setName(java.lang.String name)
name - New value of property name.public int getQuantity()
public void setQuantity(int quantity)
quantity - New value of property quantity.public double getPrice()
public void setPrice(PriceScale price)
price - New value of property price.public java.lang.String getCode()
public void setCode(java.lang.String code)
code - New value of property code.public int getTableId()
public void setTableId(int tableId)
tableId - New value of property tableId.public int getSupplierProductId()
public void setSupplierProductId(int supplierProductId)
supplierProductId - New value of property supplierProductId.public int getSupplierId()
public void setSupplierId(int supplierId)
supplierId - New value of property supplierId.public java.lang.String getSupplierName()
public void setSupplierName(java.lang.String supplierName)
supplierName - New value of property supplierName.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||