View Javadoc

1   /* (c) Copyright 2003 Caleigo AB, All rights reserved. 
2    * 
3    * This library is free software; you can redistribute it and/or
4    * modify it under the terms of the GNU Lesser General Public
5    * License as published by the Free Software Foundation; either
6    * version 2.1 of the License, or (at your option) any later version.
7    * 
8    * This library is distributed in the hope that it will be useful,
9    * but WITHOUT ANY WARRANTY; without even the implied warranty of
10   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11   * Lesser General Public License for more details.
12   * 
13   * You should have received a copy of the GNU Lesser General Public
14   * License along with this library; if not, write to the Free Software
15   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16   *  
17   */
18  package org.caleigo.core.meta;
19  
20  import org.caleigo.core.*;
21  
22  /*** MetaDataSourceEntiy is the entity class for MetaDataSourceDescriptor objects.
23  *
24  * @author dennis
25  * @version 1.0.0
26  *//*
27  * WHEN    WHO                WHY & WHAT 
28  * ------------------------------------------------------------------------------
29  * 030627  dennis    Creation
30  */
31  public class MetaDataSourceDescriptorEntity extends AbstractMetaEntity 
32  {
33      // Constructors ------------------------------------------------------------
34      
35      /*** Default constructor for MetaDataSourceDescriptorEntity.
36       */
37      public MetaDataSourceDescriptorEntity() 
38      {
39      }
40      
41      /*** Copy constructor for MetaDataSourceDescriptorEntity.
42       */
43      public MetaDataSourceDescriptorEntity(MetaDataSourceDescriptorEntity entity) 
44      {
45          this.copyData(entity);
46          this.clearAllDirtyFlags();
47      }
48      
49      /*** This constructor creates a new MetaDataSourceDescriptorEntity and loads
50       * it with data from the data source using the entity's identity data.
51       */
52      public MetaDataSourceDescriptorEntity(String aSourceName) 
53      {
54          super(Qualifier.create(MetaDataSourceDescriptor.SourceName, new String(aSourceName)));
55      }
56      
57      
58      /*** This constructor creates a new MetaDataSourceDescriptorEntity and loads
59       * it with data from the data source using the provided identity qualifier.
60       */
61      public MetaDataSourceDescriptorEntity(Qualifier identityQualifier) 
62      {
63          super(identityQualifier);
64      }
65      
66      // Superclass overrides ----------------------------------------------------
67      public IEntityDescriptor getEntityDescriptor()
68      {
69          return MetaDataSourceDescriptor.instance;
70      }
71          
72      // Access methods ----------------------------------------------------------
73      public String getSourceName() {return (String)this.getData(MetaDataSourceDescriptor.SourceName);}
74      public String getCodeName() {return (String)this.getData(MetaDataSourceDescriptor.CodeName);}
75      public String getDisplayName() {return (String)this.getData(MetaDataSourceDescriptor.DisplayName);}
76      public String getVersion() {return (String)this.getData(MetaDataSourceDescriptor.Version);}
77      public boolean isReadOnly() {return this.getDataBoolean(MetaDataSourceDescriptor.ReadOnly);}
78  
79      public void setSourceName(String value) {this.setData(MetaDataSourceDescriptor.SourceName, value);}
80      public void setCodeName(String value) {this.setData(MetaDataSourceDescriptor.CodeName, value);}
81      public void setDisplayName(String value) {this.setData(MetaDataSourceDescriptor.DisplayName, value);}
82      public void setVersion(String value) {this.setData(MetaDataSourceDescriptor.Version, value);}
83      public void setReadOnly(boolean value) {this.setDataBoolean(MetaDataSourceDescriptor.ReadOnly, value);}
84  
85      public Object getSourceNameData() {return this.getData(MetaDataSourceDescriptor.SourceName);}
86      public Object getCodeNameData() {return this.getData(MetaDataSourceDescriptor.CodeName);}
87      public Object getDisplayNameData() {return this.getData(MetaDataSourceDescriptor.DisplayName);}
88      public Object getVersionData() {return this.getData(MetaDataSourceDescriptor.Version);}
89      public Object getReadOnlyData() {return this.getData(MetaDataSourceDescriptor.ReadOnly);}
90  
91      public void setSourceNameData(Object value) {this.setData(MetaDataSourceDescriptor.SourceName, value);}
92      public void setCodeNameData(Object value) {this.setData(MetaDataSourceDescriptor.CodeName, value);}
93      public void setDisplayNameData(Object value) {this.setData(MetaDataSourceDescriptor.DisplayName, value);}
94      public void setVersionData(Object value) {this.setData(MetaDataSourceDescriptor.Version, value);}
95      public void setReadOnlyData(Object value) {this.setData(MetaDataSourceDescriptor.ReadOnly, value);}
96  }