View Javadoc

1   package org.lsst.ccs.config;
2   
3   import javax.persistence.Entity;
4   import javax.persistence.Id;
5   import java.io.Serializable;
6   
7   /**
8    * Describes a Machine Configuration
9    */
10  @Entity
11  public class MachineConfiguration implements Serializable {
12      private static final long serialVersionUID = 6504855068042840898L;
13      //TODO: change that so we can only read one table instead of 3
14  
15      //public static enum Type {
16          /**
17           * data is directly in the subsystemDescription table
18           */
19          //DESCRIPTION,
20          /**
21           * data is indirectly in description referenced by config profile,
22           * corresponding ParameterConfiguration should be merged
23           */
24          //PROFILE,
25          /**
26           * data is prepared (in a special table)
27           */
28          //PREPARED ;
29      //}
30  
31      @Id
32      private String macAddress ;
33  
34      //@Enumerated(javax.persistence.EnumType.STRING)
35      //private Type type = Type.DESCRIPTION ;
36  
37      private String subsystemName ;
38      /**
39       * means should be updated if subsystem description changes!
40       * a special code could do that on request.
41       */
42      private String configName ;
43  
44      private String tag ;
45  
46  
47      ///////////////////////// CONSTRUCTORS
48  
49      public MachineConfiguration() {
50      }
51  
52      public MachineConfiguration(String macAddress, String subsystemName, String configName, String tag) {
53          this.macAddress = macAddress;
54          this.subsystemName = subsystemName;
55          this.configName = configName;
56          this.tag = tag;
57      }
58  //////////////////////// ACCESSORS/MUTATORS
59  
60  
61      public String getMacAddress() {
62          return macAddress;
63      }
64  
65       void setMacAddress(String macAddress) {
66          this.macAddress = macAddress;
67      }
68  
69      public String getSubsystemName() {
70          return subsystemName;
71      }
72  
73      public void setSubsystemName(String subsystemName) {
74          this.subsystemName = subsystemName;
75      }
76  
77      public String getConfigName() {
78          return configName;
79      }
80  
81      public void setConfigName(String configName) {
82          this.configName = configName;
83      }
84  
85      public String getTag() {
86          return tag;
87      }
88  
89      public void setTag(String tag) {
90          this.tag = tag;
91      }
92  }