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  /**
20   * Represents embedding details of a field/property in a class.
21   * @since 3.0
22   */
23  public interface EmbeddedMetadata extends Metadata {
24      /**
25       * Method to set the name of the owner field/property.
26       * 
27       * @param member Name of the owner member
28       */
29      EmbeddedMetadata setOwnerMember(String member);
30  
31      /**
32       * Accessor for the owner field/property name.
33       * 
34       * @return The owner member name
35       */
36      String getOwnerMember();
37  
38      /**
39       * Method to set any column that indicates a null embedded object
40       * 
41       * @param col Null indicator column
42       */
43      EmbeddedMetadata setNullIndicatorColumn(String col);
44  
45      /**
46       * Accessor for any column indicating a null embedded object
47       * 
48       * @return Whether to call post-load
49       */
50      String getNullIndicatorColumn();
51  
52      /**
53       * Method to set the value of a null indicator column to signify null object
54       * 
55       * @param val Null indicator value
56       */
57      EmbeddedMetadata setNullIndicatorValue(String val);
58  
59      /**
60       * Accessor for a null indicator value
61       * 
62       * @return Null indicator value
63       */
64      String getNullIndicatorValue();
65  
66      /**
67       * Accessor for all fields/properties defined on the fetch group.
68       * 
69       * @return The members
70       */
71      MemberMetadata[] getMembers();
72  
73      /**
74       * Accessor for the number of fields/properties defined for embedding
75       * 
76       * @return The number of members
77       */
78      int getNumberOfMembers();
79  
80      /**
81       * Add a new field to be embedded.
82       * 
83       * @param name Name of the field
84       * @return The FieldMetadata
85       */
86      FieldMetadata newFieldMetadata(String name);
87  
88      /**
89       * Add a new property for embedding
90       * 
91       * @param name Name of the property
92       * @return The PropertyMetadata
93       */
94      PropertyMetadata newPropertyMetadata(String name);
95  }