PageRenderTime 183ms CodeModel.GetById 81ms app.highlight 2ms RepoModel.GetById 98ms app.codeStats 0ms

/src/mpv5/db/common/SerializableEntity.java

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Java | 51 lines | 23 code | 8 blank | 20 comment | 0 complexity | 37f68a20978002733c8f2249b8d0a28e MD5 | raw file
 1/*
 2 * To change this template, choose Tools | Templates
 3 * and open the template in the editor.
 4 */
 5package mpv5.db.common;
 6
 7/**
 8 *
 9 * @author Andreas
10 */
11public class SerializableEntity {
12
13    private Long id;
14    private String tablename;
15
16    public SerializableEntity() {
17    }
18
19    public SerializableEntity(DatabaseObject.Entity v) {
20        this.id = Long.valueOf(v.getValue().toString());
21        this.tablename = v.getKey().getDbIdentity();
22    }
23
24    /**
25     * @return the id
26     */
27    public Long getId() {
28        return id;
29    }
30
31    /**
32     * @param id the id to set
33     */
34    public void setId(Long id) {
35        this.id = id;
36    }
37
38    /**
39     * @return the tablename
40     */
41    public String getTablename() {
42        return tablename;
43    }
44
45    /**
46     * @param tablename the tablename to set
47     */
48    public void setTablename(String tablename) {
49        this.tablename = tablename;
50    }
51}