public class Product extends Payable
| Constructor and Description |
|---|
Product() |
Product(int id,
String name,
float price,
int group,
Image image,
boolean viewable,
Calendar edit) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Delete this product from the database
|
boolean |
equals(Object obj) |
ProductGroup |
getGroup()
Return the group
|
int |
hashCode() |
void |
setGroup(ProductGroup group)
Sets group
|
void |
setImage(Image image,
String format)
Sets image
|
void |
setName(String name)
Sets name
|
void |
setPrice(float price)
Sets price
|
void |
setViewable(boolean viewable)
Sets viewable
|
String |
toString() |
public Product(int id,
String name,
float price,
int group,
Image image,
boolean viewable,
Calendar edit)
id - name - price - viewable - edit - public Product()
public final ProductGroup getGroup() throws APIException, IOException
IOExceptionAPIExceptionpublic final void setGroup(ProductGroup group) throws APIException, IOException
group - the group to setIOExceptionAPIExceptionpublic final void setImage(Image image, String format) throws IOException, APIException
setImage in class Payableimage - the image to setIOExceptionAPIExceptionpublic final void setName(String name) throws APIException, IOException
setName in class Payablename - the name to setIOExceptionAPIExceptionpublic final void setPrice(float price)
throws APIException,
IOException
setPrice in class Payableprice - the price to setIOExceptionAPIExceptionpublic final void setViewable(boolean viewable)
throws APIException,
IOException
setViewable in class Payableviewable - the viewable to setIOExceptionAPIExceptionpublic final void delete()
throws APIException,
IOException
delete in class PayableIOExceptionAPIExceptionCopyright © 2019 Nowtryz. All rights reserved.