Package ejava.jpa.examples.query
Class Sale
- java.lang.Object
-
- ejava.jpa.examples.query.Sale
-
-
Field Summary
Fields Modifier and Type Field Description private BigDecimal
amount
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 keyprivate List<Clerk>
clerks
private Date
date
private long
id
private Store
store
-
Constructor Summary
Constructors Constructor Description Sale()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sale
addClerk(Clerk... clerk)
BigDecimal
getAmount()
long
getBuyerId()
List<Clerk>
getClerks()
Date
getDate()
long
getId()
Store
getStore()
Sale
setAmount(BigDecimal amount)
Sale
setBuyerId(long buyerId)
Sale
setClerks(List<Clerk> clerks)
Sale
setDate(Date date)
Sale
setStore(Store store)
String
toString()
-
-
-
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()
-
-