org.datanucleus.jpa.metadata
Class JPAAnnotationUtils

java.lang.Object
  extended by org.datanucleus.jpa.metadata.JPAAnnotationUtils

public class JPAAnnotationUtils
extends java.lang.Object

Series of utility methods for converting between JPA annotations and metadata.


Field Summary
static java.lang.String ASSOCIATION_OVERRIDE
           
static java.lang.String ASSOCIATION_OVERRIDES
           
static java.lang.String ATTRIBUTE_OVERRIDE
           
static java.lang.String ATTRIBUTE_OVERRIDES
           
static java.lang.String BASIC
           
static java.lang.String CACHEABLE
           
static java.lang.String COLLECTION_TABLE
           
static java.lang.String COLUMN
           
static java.lang.String DATASTORE_IDENTITY
           
static java.lang.String DISCRIMINATOR_COLUMN
           
static java.lang.String DISCRIMINATOR_VALUE
           
static java.lang.String ELEMENT_COLLECTION
           
static java.lang.String EMBEDDABLE
           
static java.lang.String EMBEDDED
           
static java.lang.String EMBEDDED_ID
           
static java.lang.String ENTITY
           
static java.lang.String ENTITY_LISTENERS
           
static java.lang.String ENUMERATED
           
static java.lang.String EXCLUDE_DEFAULT_LISTENERS
           
static java.lang.String EXCLUDE_SUPERCLASS_LISTENERS
           
static java.lang.String EXTENSION
           
static java.lang.String EXTENSIONS
           
static java.lang.String FETCHGROUP
           
static java.lang.String FETCHGROUPS
           
static java.lang.String FETCHPLAN
           
static java.lang.String FETCHPLANS
           
static java.lang.String GENERATED_VALUE
           
static java.lang.String ID
           
static java.lang.String ID_CLASS
           
static java.lang.String INHERITANCE
           
static java.lang.String JOIN_COLUMN
           
static java.lang.String JOIN_COLUMNS
           
static java.lang.String JOIN_TABLE
           
static java.lang.String LOB
           
static java.lang.String MANY_TO_MANY
           
static java.lang.String MANY_TO_ONE
           
static java.lang.String MAP_KEY
           
static java.lang.String MAP_KEY_CLASS
           
static java.lang.String MAP_KEY_COLUMN
           
static java.lang.String MAP_KEY_ENUMERATED
           
static java.lang.String MAP_KEY_JOIN_COLUMN
           
static java.lang.String MAP_KEY_JOIN_COLUMNS
           
static java.lang.String MAPPED_SUPERCLASS
           
static java.lang.String NAMED_NATIVE_QUERIES
           
static java.lang.String NAMED_NATIVE_QUERY
           
static java.lang.String NAMED_QUERIES
           
static java.lang.String NAMED_QUERY
           
static java.lang.String ONE_TO_MANY
           
static java.lang.String ONE_TO_ONE
           
static java.lang.String ORDER_BY
           
static java.lang.String ORDER_COLUMN
           
static java.lang.String PERSISTENCE_AWARE
           
static java.lang.String PRIMARY_KEY_JOIN_COLUMN
           
static java.lang.String PRIMARY_KEY_JOIN_COLUMNS
           
static java.lang.String SECONDARY_TABLE
           
static java.lang.String SECONDARY_TABLES
           
static java.lang.String SEQUENCE_GENERATOR
           
static java.lang.String SQL_RESULTSET_MAPPING
           
static java.lang.String SQL_RESULTSET_MAPPINGS
           
static java.lang.String TABLE
           
static java.lang.String TABLE_GENERATOR
           
static java.lang.String TEMPORAL
           
static java.lang.String TRANSIENT
           
static java.lang.String VERSION
           
 
Constructor Summary
JPAAnnotationUtils()
           
 
Method Summary
static java.lang.String getIdentityStrategyString(javax.persistence.GenerationType type)
          Convenience accessor for the string name of a id generator strategy (from JPA annotations)
static boolean isBasicByDefault(java.lang.Class type)
          Whether the given type has by default "basic" semantics.
static boolean isTemporalType(java.lang.Class type)
          Whether the given type is temporal for JPA.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENTITY

public static final java.lang.String ENTITY

MAPPED_SUPERCLASS

public static final java.lang.String MAPPED_SUPERCLASS

EMBEDDABLE

public static final java.lang.String EMBEDDABLE

EMBEDDED

public static final java.lang.String EMBEDDED

TABLE

public static final java.lang.String TABLE

COLUMN

public static final java.lang.String COLUMN

ID_CLASS

public static final java.lang.String ID_CLASS

ID

public static final java.lang.String ID

BASIC

public static final java.lang.String BASIC

TRANSIENT

public static final java.lang.String TRANSIENT

ENUMERATED

public static final java.lang.String ENUMERATED

TEMPORAL

public static final java.lang.String TEMPORAL

LOB

public static final java.lang.String LOB

VERSION

public static final java.lang.String VERSION

EMBEDDED_ID

public static final java.lang.String EMBEDDED_ID

GENERATED_VALUE

public static final java.lang.String GENERATED_VALUE

INHERITANCE

public static final java.lang.String INHERITANCE

DISCRIMINATOR_COLUMN

public static final java.lang.String DISCRIMINATOR_COLUMN

DISCRIMINATOR_VALUE

public static final java.lang.String DISCRIMINATOR_VALUE

ENTITY_LISTENERS

public static final java.lang.String ENTITY_LISTENERS

EXCLUDE_SUPERCLASS_LISTENERS

public static final java.lang.String EXCLUDE_SUPERCLASS_LISTENERS

EXCLUDE_DEFAULT_LISTENERS

public static final java.lang.String EXCLUDE_DEFAULT_LISTENERS

SEQUENCE_GENERATOR

public static final java.lang.String SEQUENCE_GENERATOR

TABLE_GENERATOR

public static final java.lang.String TABLE_GENERATOR

PRIMARY_KEY_JOIN_COLUMNS

public static final java.lang.String PRIMARY_KEY_JOIN_COLUMNS

PRIMARY_KEY_JOIN_COLUMN

public static final java.lang.String PRIMARY_KEY_JOIN_COLUMN

ATTRIBUTE_OVERRIDES

public static final java.lang.String ATTRIBUTE_OVERRIDES

ATTRIBUTE_OVERRIDE

public static final java.lang.String ATTRIBUTE_OVERRIDE

ASSOCIATION_OVERRIDES

public static final java.lang.String ASSOCIATION_OVERRIDES

ASSOCIATION_OVERRIDE

public static final java.lang.String ASSOCIATION_OVERRIDE

NAMED_QUERIES

public static final java.lang.String NAMED_QUERIES

NAMED_QUERY

public static final java.lang.String NAMED_QUERY

NAMED_NATIVE_QUERIES

public static final java.lang.String NAMED_NATIVE_QUERIES

NAMED_NATIVE_QUERY

public static final java.lang.String NAMED_NATIVE_QUERY

SQL_RESULTSET_MAPPINGS

public static final java.lang.String SQL_RESULTSET_MAPPINGS

SQL_RESULTSET_MAPPING

public static final java.lang.String SQL_RESULTSET_MAPPING

SECONDARY_TABLES

public static final java.lang.String SECONDARY_TABLES

SECONDARY_TABLE

public static final java.lang.String SECONDARY_TABLE

JOIN_TABLE

public static final java.lang.String JOIN_TABLE

MAP_KEY

public static final java.lang.String MAP_KEY

MAP_KEY_COLUMN

public static final java.lang.String MAP_KEY_COLUMN

MAP_KEY_JOIN_COLUMN

public static final java.lang.String MAP_KEY_JOIN_COLUMN

MAP_KEY_JOIN_COLUMNS

public static final java.lang.String MAP_KEY_JOIN_COLUMNS

MAP_KEY_CLASS

public static final java.lang.String MAP_KEY_CLASS

MAP_KEY_ENUMERATED

public static final java.lang.String MAP_KEY_ENUMERATED

ORDER_BY

public static final java.lang.String ORDER_BY

ONE_TO_ONE

public static final java.lang.String ONE_TO_ONE

ONE_TO_MANY

public static final java.lang.String ONE_TO_MANY

MANY_TO_ONE

public static final java.lang.String MANY_TO_ONE

MANY_TO_MANY

public static final java.lang.String MANY_TO_MANY

JOIN_COLUMNS

public static final java.lang.String JOIN_COLUMNS

JOIN_COLUMN

public static final java.lang.String JOIN_COLUMN

PERSISTENCE_AWARE

public static final java.lang.String PERSISTENCE_AWARE

DATASTORE_IDENTITY

public static final java.lang.String DATASTORE_IDENTITY

FETCHPLAN

public static final java.lang.String FETCHPLAN

FETCHPLANS

public static final java.lang.String FETCHPLANS

FETCHGROUPS

public static final java.lang.String FETCHGROUPS

FETCHGROUP

public static final java.lang.String FETCHGROUP

EXTENSIONS

public static final java.lang.String EXTENSIONS

EXTENSION

public static final java.lang.String EXTENSION

ELEMENT_COLLECTION

public static final java.lang.String ELEMENT_COLLECTION

COLLECTION_TABLE

public static final java.lang.String COLLECTION_TABLE

ORDER_COLUMN

public static final java.lang.String ORDER_COLUMN

CACHEABLE

public static final java.lang.String CACHEABLE
Constructor Detail

JPAAnnotationUtils

public JPAAnnotationUtils()
Method Detail

getIdentityStrategyString

public static java.lang.String getIdentityStrategyString(javax.persistence.GenerationType type)
Convenience accessor for the string name of a id generator strategy (from JPA annotations)

Parameters:
type - Generation type (strategy)
Returns:
The name

isBasicByDefault

public static boolean isBasicByDefault(java.lang.Class type)
Whether the given type has by default "basic" semantics.

Parameters:
type - the type
Returns:
true if the type is by default "basic" as per JPA spec

isTemporalType

public static boolean isTemporalType(java.lang.Class type)
Whether the given type is temporal for JPA.

Parameters:
type - the type
Returns:
true if the type is temporal as per JPA spec


Copyright © 2011. All Rights Reserved.