org.jpox.metadata.annotations
Class AnnotationUtils

java.lang.Object
  extended by org.jpox.metadata.annotations.AnnotationUtils

public class AnnotationUtils
extends java.lang.Object

Series of utility methods for converting between annotations and metadata.

Version:
$Revision: 1.3 $

Constructor Summary
AnnotationUtils()
           
 
Method Summary
static java.lang.String getDiscriminatorStrategyString(DiscriminatorStrategyType strategy)
          Convenience accessor for the string name of a discriminator strategy.
static java.lang.String getFieldPersistenceModifierString(FieldPersistenceModifier modifier)
          Convenience accessor for the string name of a persistence-modifier on a field.
static java.lang.String getForeignKeyActionString(ForeignKeyAction action)
          Convenience accessor for the string name of a FK action.
static java.lang.String getIdentityStrategyString(javax.persistence.GenerationType type)
          Convenience accessor for the string name of a id generator strategy (from JPA annotations)
static java.lang.String getIdentityStrategyString(IdGeneratorStrategy strategy)
          Convenience accessor for the string name of a id generator strategy (from JDO annotations).
static java.lang.String getIdentityTypeString(IdentityTypeValue idType)
          Convenience accessor for the string name of the identity type.
static java.lang.String getInheritanceStrategyString(InheritanceStrategyType strategy)
          Convenience accessor for the string name of an inheritance strategy.
static java.lang.String getSequenceStrategyString(SequenceStrategy strategy)
          Convenience accessor for the string name of a datastore sequence strategy.
static java.lang.String getVersionStrategyString(VersionStrategyType strategy)
          Convenience accessor for the string name of a version strategy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationUtils

public AnnotationUtils()
Method Detail

getForeignKeyActionString

public static java.lang.String getForeignKeyActionString(ForeignKeyAction action)
Convenience accessor for the string name of a FK action.

Parameters:
action - The annotation action
Returns:
The name

getFieldPersistenceModifierString

public static java.lang.String getFieldPersistenceModifierString(FieldPersistenceModifier modifier)
Convenience accessor for the string name of a persistence-modifier on a field.

Parameters:
modifier - The annotation modifier
Returns:
The name

getIdentityTypeString

public static java.lang.String getIdentityTypeString(IdentityTypeValue idType)
Convenience accessor for the string name of the identity type.

Parameters:
idType - The id type
Returns:
The name

getSequenceStrategyString

public static java.lang.String getSequenceStrategyString(SequenceStrategy strategy)
Convenience accessor for the string name of a datastore sequence strategy.

Parameters:
strategy - The annotation strategy
Returns:
The name

getIdentityStrategyString

public static java.lang.String getIdentityStrategyString(IdGeneratorStrategy strategy)
Convenience accessor for the string name of a id generator strategy (from JDO annotations).

Parameters:
strategy - The id generation strategy
Returns:
The name

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:
strategy - The id generation strategy
Returns:
The name

getVersionStrategyString

public static java.lang.String getVersionStrategyString(VersionStrategyType strategy)
Convenience accessor for the string name of a version strategy.

Parameters:
strategy - The version strategy
Returns:
The name

getInheritanceStrategyString

public static java.lang.String getInheritanceStrategyString(InheritanceStrategyType strategy)
Convenience accessor for the string name of an inheritance strategy.

Parameters:
strategy - The inheritance strategy
Returns:
The name

getDiscriminatorStrategyString

public static java.lang.String getDiscriminatorStrategyString(DiscriminatorStrategyType strategy)
Convenience accessor for the string name of a discriminator strategy.

Parameters:
strategy - The discriminator strategy
Returns:
The name


Copyright © 2003-2008 Java Persistent Objects (JPOX). All Rights Reserved.