Advertisement
felipearon

CadastrosImpGarInTabBat

Jun 24th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.76 KB | None | 0 0
  1. public class CadastrosImpGarInTabBat implements KvmSerializable {
  2.  
  3.     private String codBar;
  4.     private String codRef;
  5.     private String datFab;
  6.     private String datVct;
  7.     private String defOri;
  8.     private String desDef;
  9.    
  10.     public String getCodBar() {
  11.         return codBar;
  12.     }
  13.  
  14.     public void setCodBar(String codBar) {
  15.         this.codBar = codBar;
  16.     }
  17.  
  18.     public String getCodRef() {
  19.         return codRef;
  20.     }
  21.  
  22.     public void setCodRef(String codRef) {
  23.         this.codRef = codRef;
  24.     }
  25.  
  26.     public String getDatFab() {
  27.         return datFab;
  28.     }
  29.  
  30.     public void setDatFab(String datFab) {
  31.         this.datFab = datFab;
  32.     }
  33.  
  34.     public String getDatVct() {
  35.         return datVct;
  36.     }
  37.  
  38.     public void setDatVct(String datVct) {
  39.         this.datVct = datVct;
  40.     }
  41.  
  42.     public String getDefOri() {
  43.         return defOri;
  44.     }
  45.  
  46.     public void setDefOri(String defOri) {
  47.         this.defOri = defOri;
  48.     }
  49.  
  50.     public String getDesDef() {
  51.         return desDef;
  52.     }
  53.  
  54.     public void setDesDef(String desDef) {
  55.         this.desDef = desDef;
  56.     }
  57.  
  58.     public CadastrosImpGarInTabBat() {     
  59.     }
  60.    
  61.     public CadastrosImpGarInTabBat(String codBar, String codRef, String datFab,
  62.             String datVct, String defOri, String desDef) {
  63.         this.codBar = codBar;
  64.         this.codRef = codRef;
  65.         this.datFab = datFab;
  66.         this.datVct = datVct;
  67.         this.defOri = defOri;
  68.         this.desDef = desDef;
  69.     }
  70.  
  71.     @Override
  72.     public Object getProperty(int index) {
  73.         switch (index) {
  74.         case 0:
  75.             return codBar;
  76.         case 1:
  77.             return codRef;
  78.         case 2:
  79.             return datFab;
  80.         case 3:
  81.             return datVct;
  82.         case 4:
  83.             return defOri;
  84.         case 5:
  85.             return desDef;
  86.         default:
  87.             return null;
  88.         }      
  89.     }
  90.  
  91.     @Override
  92.     public int getPropertyCount() {
  93.         return 6;
  94.     }
  95.  
  96.     @SuppressWarnings("rawtypes")
  97.     @Override
  98.     public void getPropertyInfo(int index, Hashtable hash, PropertyInfo info) {
  99.         switch (index) {
  100.         case 0:
  101.             info.type = PropertyInfo.STRING_CLASS;
  102.             info.name = "codBar";
  103.             break;
  104.         case 1:
  105.             info.type = PropertyInfo.STRING_CLASS;
  106.             info.name = "codRef";
  107.             break;
  108.         case 2:
  109.             info.type = PropertyInfo.STRING_CLASS;
  110.             info.name = "datFab";
  111.             break;
  112.         case 3:
  113.             info.type = PropertyInfo.STRING_CLASS;
  114.             info.name = "datVct";
  115.             break;
  116.         case 4:
  117.             info.type = PropertyInfo.STRING_CLASS;
  118.             info.name = "defOri";
  119.             break;
  120.         case 5:
  121.             info.type = PropertyInfo.STRING_CLASS;
  122.             info.name = "desDef";
  123.             break;
  124.         default:
  125.             break;
  126.         }
  127.     }
  128.  
  129.     @Override
  130.     public void setProperty(int index, Object value) {
  131.         switch (index) {
  132.         case 0:
  133.             codBar = value.toString();
  134.             break;
  135.         case 1:
  136.             codRef = value.toString();
  137.             break;
  138.         case 2:
  139.             datFab = value.toString();
  140.             break;
  141.         case 3:
  142.             datVct = value.toString();
  143.             break;
  144.         case 4:
  145.             defOri = value.toString();
  146.             break;
  147.         case 5:
  148.             desDef = value.toString();
  149.             break;
  150.         default:
  151.             break;
  152.         }
  153.     }
  154. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement