Subversion Repositories SmartDukaan

Rev

Rev 23297 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23297 Rev 23782
Line 23... Line 23...
23
 * This class basically contains api details
23
 * This class basically contains api details
24
 * 
24
 * 
25
 * @author ashikali
25
 * @author ashikali
26
 *
26
 *
27
 */
27
 */
-
 
28
 
28
@Entity
29
@Entity
29
@Table(name="dtr.api", schema = "dtr", uniqueConstraints = {@UniqueConstraint(columnNames = {"uri","method"})})
30
@Table(name="dtr.api", schema = "dtr", uniqueConstraints = {@UniqueConstraint(columnNames = {"uri", "method"})})
30
public class Api implements Serializable{
31
public class Api implements Serializable{
31
	
32
	
32
	private static final long serialVersionUID = 1L;
33
	private static final long serialVersionUID = 1L;
33
	
34
	
34
	public Api() {
35
	public Api() {
Line 56... Line 57...
56
	@Convert(converter = LocalDateTimeAttributeConverter.class)
57
	@Convert(converter = LocalDateTimeAttributeConverter.class)
57
	@Column(name="update_timestamp")
58
	@Column(name="update_timestamp")
58
	@UpdateTimestamp
59
	@UpdateTimestamp
59
	private LocalDateTime updateTimestamp = LocalDateTime.now();
60
	private LocalDateTime updateTimestamp = LocalDateTime.now();
60
	
61
	
61
	
-
 
62
	public int getId() {
62
	public int getId() {
63
		return id;
63
		return id;
64
	}
64
	}
65
	public void setId(int id) {
65
	public void setId(int id) {
66
		this.id = id;
66
		this.id = id;
Line 95... Line 95...
95
		this.updateTimestamp = updateTimestamp;
95
		this.updateTimestamp = updateTimestamp;
96
	}
96
	}
97
    public LocalDateTime getUpdateTimestamp() {
97
    public LocalDateTime getUpdateTimestamp() {
98
		return updateTimestamp;
98
		return updateTimestamp;
99
	}
99
	}
100
    
-
 
101
	
100
	
102
	@Override
101
	@Override
103
	public int hashCode() {
102
	public int hashCode() {
104
		final int prime = 31;
103
		final int prime = 31;
105
		int result = 1;
104
		int result = 1;
106
		result = prime * result + id;
105
		result = prime * result + id;
107
		return result;
106
		return result;
108
	}
107
	}
-
 
108
	
109
	@Override
109
	@Override
110
	public boolean equals(Object obj) {
110
	public boolean equals(Object obj) {
111
		if (this == obj)
111
		if (this == obj)
112
			return true;
112
			return true;
113
		if (obj == null)
113
		if (obj == null)
Line 117... Line 117...
117
		Api other = (Api) obj;
117
		Api other = (Api) obj;
118
		if (id != other.id)
118
		if (id != other.id)
119
			return false;
119
			return false;
120
		return true;
120
		return true;
121
	}
121
	}
-
 
122
	
122
	@Override
123
	@Override
123
	public String toString() {
124
	public String toString() {
124
		return "Api [id=" + id + ", name=" + name + ", uri=" + uri + ", method=" + method + ", createTimestamp="
125
		return "Api [id=" + id + ", name=" + name + ", uri=" + uri + ", method=" + method + ", createTimestamp="
125
				+ createTimestamp + ", updateTimestamp=" + updateTimestamp + "]";
126
				+ createTimestamp + ", updateTimestamp=" + updateTimestamp + "]";
126
	}    
127
	}