1 18 19 package cowsultants.itracker.ejb.beans.entity; 20 21 import java.util.*; 22 import java.sql.Timestamp ; 23 24 import cowsultants.itracker.ejb.client.models.ConfigurationModel; 25 26 public abstract class ConfigurationBean extends GenericBean { 27 28 public abstract int getType(); 29 public abstract void setType(int value); 30 31 public abstract int getOrder(); 32 public abstract void setOrder(int value); 33 34 public abstract String getValue(); 35 public abstract void setValue(String value); 36 37 public abstract String getVersion(); 38 public abstract void setVersion(String value); 39 40 public ConfigurationModel getModel() { 41 ConfigurationModel model = new ConfigurationModel(); 42 model.setId(this.getId()); 43 model.setType(this.getType()); 44 model.setOrder(this.getOrder()); 45 model.setVersion(this.getVersion()); 46 model.setValue(this.getValue()); 47 model.setLastModifiedDate(this.getLastModifiedDate()); 48 model.setCreateDate(this.getCreateDate()); 49 50 return model; 51 } 52 53 public void setModel(ConfigurationModel model) { 54 this.setType(model.getType()); 55 this.setOrder(model.getOrder()); 56 this.setVersion(model.getVersion()); 57 this.setValue(model.getValue()); 58 this.setLastModifiedDate(new Timestamp (new Date().getTime())); 59 } 60 61 } | Popular Tags |