View Javadoc

1   /*
2    * File:    ICommonAttributeInformation.java
3    * Created: 23.2.2006 10:43:19
4    *
5    * Copyright 2007 Michal Burda.
6    *
7    * This program is free software; you can redistribute it and/or modify
8    * it under the terms of the GNU General Public License as published by
9    * the Free Software Foundation; either version 2 of the License, or
10   * (at your option) any later version.
11   *
12   * This program is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   * GNU General Public License for more details.
16   *
17   * You should have received a copy of the GNU General Public License
18   * along with this program; if not, write to the Free Software
19   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20   */
21  
22  package net.sf.webmancer.db;
23  
24  
25  /**
26   * The attribute meta-information is divided into two parts: front-end and back-end.
27   * Front-end part is defined in {@link IFrontEndAttributeInformation}, back-end part is defined
28   * in {@link IBackEndAttributeInformation}. This interface defines methods that have both
29   * the front-end and back-end in common.
30   * 
31   * @author Michal Burda
32   */
33  interface ICommonAttributeInformation {
34      /**
35       * Gets the identification string of the attribute (must be unique in DataSet).
36       * 
37       * @return The identification string of the attribute
38       */
39      String getId();
40  
41      /**
42       * Gets {@link IDataSet} the attribute belongs to.
43       * 
44       * @return The {@link IDataSet} the attribute belongs to.
45       */
46      IDataSet getParentDataSet();
47  
48      /**
49       * Returns <code>true</code> if the attribute is a primary key of parent dataset.
50       * 
51       * @return <code>true</code> if the attribute is a primary key of parent dataset.
52       */
53      boolean isPrimaryKey();
54  
55  }