Package ejava.jpa.examples.query
Class Sale
- java.lang.Object
-
- ejava.jpa.examples.query.Sale
-
-
Field Summary
Fields Modifier and Type Field Description private BigDecimalamountprivate longbuyerIdThis property has been purposely modeled as an ID and not a relationship to show how JPA queries can still functionally associate information without an explicit foreign keyprivate List<Clerk>clerksprivate Datedateprivate longidprivate Storestore
-
Constructor Summary
Constructors Constructor Description Sale()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SaleaddClerk(Clerk... clerk)BigDecimalgetAmount()longgetBuyerId()List<Clerk>getClerks()DategetDate()longgetId()StoregetStore()SalesetAmount(BigDecimal amount)SalesetBuyerId(long buyerId)SalesetClerks(List<Clerk> clerks)SalesetDate(Date date)SalesetStore(Store store)StringtoString()
-
-
-
Field Detail
-
id
private long id
-
date
private Date date
-
amount
private BigDecimal amount
-
buyerId
private long buyerId
This property has been purposely modeled as an ID and not a relationship to show how JPA queries can still functionally associate information without an explicit foreign key
-
store
private Store store
-
-
Method Detail
-
getId
public long getId()
-
getStore
public Store getStore()
-
getAmount
public BigDecimal getAmount()
-
setAmount
public Sale setAmount(BigDecimal amount)
-
getBuyerId
public long getBuyerId()
-
setBuyerId
public Sale setBuyerId(long buyerId)
-
getDate
public Date getDate()
-
-