01: /**********************************************************************
02: Copyright (c) 2006 Andy Jefferson and others. All rights reserved.
03: Licensed under the Apache License, Version 2.0 (the "License");
04: you may not use this file except in compliance with the License.
05: You may obtain a copy of the License at
06:
07: http://www.apache.org/licenses/LICENSE-2.0
08:
09: Unless required by applicable law or agreed to in writing, software
10: distributed under the License is distributed on an "AS IS" BASIS,
11: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: See the License for the specific language governing permissions and
13: limitations under the License.
14:
15: Contributors:
16: ...
17: **********************************************************************/package org.jpox.metadata;
18:
19: import java.io.Serializable;
20:
21: /**
22: * Utility class providing enums for the different relation types.
23: * TODO Consider adding the other subtypes of relations ... join table, foreign key etc
24: * @version $Revision: 1.2 $
25: */
26: public class Relation implements Serializable {
27: /** No relation. */
28: public static final int NONE = 0;
29:
30: /** One to One bidirectional (object reference at one side only). */
31: public static final int ONE_TO_ONE_UNI = 1;
32:
33: /** One to One bidirectional (object reference at both sides). */
34: public static final int ONE_TO_ONE_BI = 2;
35:
36: /** One to Many unidirectional (collection/map of object with no reference back). */
37: public static final int ONE_TO_MANY_UNI = 3;
38:
39: /** One to Many bidirectional (collection/map of object with reference back). */
40: public static final int ONE_TO_MANY_BI = 4;
41:
42: /** Many to Many bidirectional (collection/map at both sides). */
43: public static final int MANY_TO_MANY_BI = 5;
44:
45: /** Many to One bidirectional (reference back to a collection of the object). */
46: public static final int MANY_TO_ONE_BI = 6;
47: }
|