1 /*
2  * Copyright (c) 2008, 2019 Oracle and/or its affiliates. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v. 2.0 which is available at
6  * http://www.eclipse.org/legal/epl-2.0,
7  * or the Eclipse Distribution License v. 1.0 which is available at
8  * http://www.eclipse.org/org/documents/edl-v10.php.
9  *
10  * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
11  */

12
13 // Contributors:
14 //     Linda DeMichiel - 2.1
15 //     Linda DeMichiel - 2.0
16
17 package javax.persistence.metamodel;
18
19 /**
20  * Instances of the type <code>Type</code> represent persistent object 
21  * or attribute types.
22  *
23  * @param <X>  The type of the represented object or attribute
24  *
25  * @since 2.0
26  */

27 public interface Type<X> {
28
29        public static enum PersistenceType {
30
31        /** Entity */
32            ENTITY, 
33
34        /** Embeddable class */
35        EMBEDDABLE, 
36
37        /** Mapped superclass */
38        MAPPED_SUPERCLASS, 
39
40        /** Basic type */
41        BASIC
42        }
43
44     /**
45      *  Return the persistence type.
46      *  @return persistence type
47      */
    
48     PersistenceType getPersistenceType();
49
50     /**
51      *  Return the represented Java type.
52      *  @return Java type
53      */

54     Class<X> getJavaType();
55 }
56