View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  package javax.jdo.metadata;
18  
19  import javax.jdo.annotations.ForeignKeyAction;
20  
21  /**
22   * Represents a value in a map.
23   * @since 3.0
24   */
25  public interface ValueMetadata extends Metadata {
26      /**
27       * Method to set the column name.
28       * 
29       * @param column Column name
30       */
31      ValueMetadata setColumn(String column);
32  
33      /**
34       * Accessor for the name of the column.
35       * 
36       * @return The name
37       */
38      String getColumn();
39  
40      /**
41       * Method to set the table name.
42       * 
43       * @param table Table name
44       */
45      ValueMetadata setTable(String table);
46  
47      /**
48       * Accessor for the name of the table.
49       * 
50       * @return The name
51       */
52      String getTable();
53  
54      /**
55       * Method to set the delete action of the FK
56       * 
57       * @param action Delete action of the FK
58       */
59      ValueMetadata setDeleteAction(ForeignKeyAction action);
60  
61      /**
62       * Accessor for the delete action of the FK
63       * 
64       * @return The FK delete-action
65       */
66      ForeignKeyAction getDeleteAction();
67  
68      /**
69       * Method to set the update action of the FK
70       * 
71       * @param action Update action of the FK
72       */
73      ValueMetadata setUpdateAction(ForeignKeyAction action);
74  
75      /**
76       * Accessor for the update action of the FK
77       * 
78       * @return The FK update-action
79       */
80      ForeignKeyAction getUpdateAction();
81  
82      /**
83       * Accessor for all column(s) defined on the value.
84       * 
85       * @return The column(s)
86       */
87      ColumnMetadata[] getColumns();
88  
89      /**
90       * Add a new column for this value.
91       * 
92       * @return The ColumnMetadata
93       */
94      ColumnMetadata newColumnMetadata();
95  
96      /**
97       * Method to set new embedded metadata for the value.
98       * 
99       * @return The EmbeddedMetadata
100      */
101     EmbeddedMetadata newEmbeddedMetadata();
102 
103     /**
104      * Accessor for any embedded metadata on this value
105      * 
106      * @return The EmbeddedMetadata
107      */
108     EmbeddedMetadata getEmbeddedMetadata();
109 
110     /**
111      * Method to set new index metadata for the value.
112      * 
113      * @return The IndexMetadata
114      */
115     IndexMetadata newIndexMetadata();
116 
117     /**
118      * Accessor for any index metadata on this value
119      * 
120      * @return Index metadata
121      */
122     IndexMetadata getIndexMetadata();
123 
124     /**
125      * Method to set new unique constraint metadata for the value
126      * 
127      * @return The UniqueMetadata
128      */
129     UniqueMetadata newUniqueMetadata();
130 
131     /**
132      * Accessor for any unique constraint metadata on this value.
133      * 
134      * @return The UniqueMetadata
135      */
136     UniqueMetadata getUniqueMetadata();
137 
138     /**
139      * Method to set new foreign key metadata for the value
140      * 
141      * @return The ForeignKeyMetadata
142      */
143     ForeignKeyMetadata newForeignKeyMetadata();
144 
145     /**
146      * Accessor for any foreign key metadata on this value.
147      * 
148      * @return The ForeignKeyMetadata
149      */
150     ForeignKeyMetadata getForeignKeyMetadata();
151 }