| Line 7... |
Line 7... |
| 7 |
import javax.persistence.Convert;
|
7 |
import javax.persistence.Convert;
|
| 8 |
import javax.persistence.Entity;
|
8 |
import javax.persistence.Entity;
|
| 9 |
import javax.persistence.GeneratedValue;
|
9 |
import javax.persistence.GeneratedValue;
|
| 10 |
import javax.persistence.GenerationType;
|
10 |
import javax.persistence.GenerationType;
|
| 11 |
import javax.persistence.Id;
|
11 |
import javax.persistence.Id;
|
| 12 |
import javax.persistence.NamedQueries;
|
- |
|
| 13 |
import javax.persistence.NamedQuery;
|
- |
|
| 14 |
import javax.persistence.Table;
|
12 |
import javax.persistence.Table;
|
| 15 |
import javax.persistence.Transient;
|
13 |
import javax.persistence.Transient;
|
| 16 |
import javax.persistence.UniqueConstraint;
|
14 |
import javax.persistence.UniqueConstraint;
|
| 17 |
|
15 |
|
| 18 |
import org.hibernate.annotations.UpdateTimestamp;
|
16 |
import org.hibernate.annotations.UpdateTimestamp;
|
| 19 |
|
17 |
|
| 20 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
|
18 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
|
| 21 |
import com.spice.profitmandi.dao.entity.user.Address;
|
19 |
import com.spice.profitmandi.dao.entity.user.Address;
|
| 22 |
|
20 |
|
| 23 |
/**
|
21 |
/**
|
| 24 |
* This class basically contains api details
|
22 |
* This class basically contains shop details
|
| 25 |
*
|
23 |
*
|
| 26 |
* @author ashikali
|
24 |
* @author ashikali
|
| 27 |
*
|
25 |
*
|
| 28 |
*/
|
26 |
*/
|
| 29 |
@Entity
|
27 |
@Entity
|
| 30 |
@Table(name="dtr.shop", schema = "dtr", uniqueConstraints = {@UniqueConstraint(columnNames = {"name","retailer_id", "document_id", "address_id"})})
|
28 |
@Table(name="dtr.shop", schema = "dtr", uniqueConstraints = {@UniqueConstraint(columnNames = {"name","retailer_id", "document_id", "address_id"})})
|
| 31 |
@NamedQueries({
|
- |
|
| 32 |
@NamedQuery(name = "Shop.selectCount", query = "select count(s) from Shop s"),
|
- |
|
| 33 |
@NamedQuery(name="Shop.selectAll",query="select s from Shop s"),
|
- |
|
| 34 |
@NamedQuery(name="Shop.selectById",query="select s from Shop s where s.id= :id"),
|
- |
|
| 35 |
@NamedQuery(name="Shop.selectByName",query="select s from Shop s where s.name= :name"),
|
- |
|
| 36 |
@NamedQuery(name="Shop.selectByRetailerId",query="select s from Shop s where s.retailerId= :retailerId"),
|
- |
|
| 37 |
@NamedQuery(name="Shop.selectByDocumentId",query="select s from Shop s where s.documentId= :documentId"),
|
- |
|
| 38 |
@NamedQuery(name = "Shop.selectCountByDocumentId", query = "select count(s) from Shop s where s.documentId= :documentId"),
|
- |
|
| 39 |
@NamedQuery(name="Shop.deleteById",query="delete from Shop s where s.id= :id"),
|
- |
|
| 40 |
@NamedQuery(name="Shop.deleteByShopAndRetailerId",query="delete from Shop s where s.id= :id and s.retailerId = :retailerId")
|
- |
|
| 41 |
})
|
- |
|
| 42 |
public class Shop implements Serializable{
|
29 |
public class Shop implements Serializable{
|
| 43 |
|
30 |
|
| 44 |
private static final long serialVersionUID = 1L;
|
31 |
private static final long serialVersionUID = 1L;
|
| 45 |
|
32 |
|
| 46 |
public Shop() {
|
33 |
public Shop() {
|