org.castor.cpa.jpa.natures
Class JPAClassNature

java.lang.Object
  extended by org.castor.core.nature.BaseNature
      extended by org.castor.cpa.jpa.natures.JPAClassNature
All Implemented Interfaces:
Nature

public class JPAClassNature
extends BaseNature

A BaseNature extension that gives access to information derived from class bound JPA annotations.

Since:
1.3
Version:
$Revision: 8994 $ $Date: 2011-08-02 01:40:59 +0200 (Di, 02 Aug 2011) $
Author:
Peter Schmidt, Werner Guttmann
See Also:
PropertyHolder

Field Summary
static java.lang.String CACHE_PROPERTIES
          Property Key for Cache.
static java.lang.String INHERITANCE_STRATEGY
          Property Key for javax.persistence.Inheritance#strategy().
static java.lang.String MAPPED_SUPERCLASS
          Nature property name for abstract.
static java.lang.String NAMED_NATIVE_QUERY
          Property Key for javax.persistence.NamedNativeQuery.
static java.lang.String NAMED_QUERY
          Property Key for javax.persistence.NamedQuery.
 
Constructor Summary
JPAClassNature(PropertyHolder holder)
          Instantiate a JPAClassNature to access the given PropertyHolder.
 
Method Summary
 java.util.Properties getCacheProperties()
           
 java.lang.String getEntityName()
           
 java.lang.String getId()
          
 InheritanceType getInheritanceStrategy()
           
 java.util.Map<java.lang.String,java.lang.String> getNamedNativeQuery()
           
 java.util.Map<java.lang.String,java.lang.String> getNamedQuery()
           
 java.lang.String getTableCatalog()
           
 java.lang.String getTableName()
           
 java.lang.String getTableSchema()
           
 boolean hasMappedSuperclass()
          Returns if class has a mapped super class.
 void setCacheProperties(java.util.Properties cacheProperties)
           
 void setEntityName(java.lang.String entityname)
           
 void setInheritanceStrategy(InheritanceType strategy)
           
 void setMappedSuperclass(java.lang.Boolean hasMappedSuperclass)
          Set class to have a mapped super class.
 void setNamedNativeQuery(java.util.Map<java.lang.String,java.lang.String> namedNativeQueryMap)
           
 void setNamedQuery(java.util.Map<java.lang.String,java.lang.String> namedQuery)
           
 void setTableCatalog(java.lang.String catalog)
           
 void setTableName(java.lang.String tablename)
           
 void setTableSchema(java.lang.String schema)
           
 
Methods inherited from class org.castor.core.nature.BaseNature
getBooleanPropertyDefaultFalse, getHolder, getProperty, getPropertyAsList, getPropertyAsMap, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INHERITANCE_STRATEGY

public static final java.lang.String INHERITANCE_STRATEGY
Property Key for javax.persistence.Inheritance#strategy().

See Also:
Constant Field Values

MAPPED_SUPERCLASS

public static final java.lang.String MAPPED_SUPERCLASS
Nature property name for abstract.

See Also:
Constant Field Values

NAMED_QUERY

public static final java.lang.String NAMED_QUERY
Property Key for javax.persistence.NamedQuery.

See Also:
Constant Field Values

NAMED_NATIVE_QUERY

public static final java.lang.String NAMED_NATIVE_QUERY
Property Key for javax.persistence.NamedNativeQuery.

See Also:
Constant Field Values

CACHE_PROPERTIES

public static final java.lang.String CACHE_PROPERTIES
Property Key for Cache.

See Also:
Constant Field Values
Constructor Detail

JPAClassNature

public JPAClassNature(PropertyHolder holder)
Instantiate a JPAClassNature to access the given PropertyHolder.

Parameters:
holder - The underlying PropertyHolder (obviously a ClassInfo).
See Also:
PropertyHolder
Method Detail

getId

public java.lang.String getId()

See Also:
Nature.getId()

setEntityName

public void setEntityName(java.lang.String entityname)
Parameters:
entityname - The value of javax.persistence.Entity#name().
See Also:
ENTITY_NAME

getEntityName

public java.lang.String getEntityName()
Returns:
The value of javax.persistence.Entity#name().
See Also:
ENTITY_NAME

setTableName

public void setTableName(java.lang.String tablename)
Parameters:
tablename - The value of javax.persistence.Table#name()
See Also:
TABLE_NAME

getTableName

public java.lang.String getTableName()
Returns:
The value of javax.persistence.Table#name()
See Also:
TABLE_NAME

setTableCatalog

public void setTableCatalog(java.lang.String catalog)
Parameters:
catalog - The value of javax.persistence.Table#catalog()
See Also:
TABLE_CATALOG

getTableCatalog

public java.lang.String getTableCatalog()
Returns:
The value of javax.persistence.Table#catalog()
See Also:
TABLE_CATALOG

setTableSchema

public void setTableSchema(java.lang.String schema)
Parameters:
schema - The value of javax.persistence.Table#schema()
See Also:
TABLE_SCHEMA

getTableSchema

public java.lang.String getTableSchema()
Returns:
The value ofjavax.persistence.Table#schema()
See Also:
TABLE_SCHEMA

setInheritanceStrategy

public void setInheritanceStrategy(InheritanceType strategy)
Parameters:
strategy - The value of javax.persistence.Inheritance#strategy()
See Also:
INHERITANCE_STRATEGY

getInheritanceStrategy

public InheritanceType getInheritanceStrategy()
Returns:
The value ofjavax.persistence.Inheritance#strategy()
See Also:
INHERITANCE_STRATEGY

getNamedQuery

public java.util.Map<java.lang.String,java.lang.String> getNamedQuery()
Returns:
The value ofjavax.persistence.NamedQuery
See Also:
NAMED_QUERY

setMappedSuperclass

public void setMappedSuperclass(java.lang.Boolean hasMappedSuperclass)
Set class to have a mapped super class.

Parameters:
hasMappedSuperclass - Boolean True if the given class has a mapped super class.

hasMappedSuperclass

public boolean hasMappedSuperclass()
Returns if class has a mapped super class.

Returns:
true if class has a mapped super class.

setNamedQuery

public void setNamedQuery(java.util.Map<java.lang.String,java.lang.String> namedQuery)
Parameters:
namedQuery - The value of javax.persistence.NamedQuery
See Also:
NAMED_QUERY

getNamedNativeQuery

public java.util.Map<java.lang.String,java.lang.String> getNamedNativeQuery()
Returns:
The value ofjavax.persistence.NamedNativeQuery
See Also:
NAMED_NATIVE_QUERY

setNamedNativeQuery

public void setNamedNativeQuery(java.util.Map<java.lang.String,java.lang.String> namedNativeQueryMap)
Parameters:
namedNativeQueryMap - The value of javax.persistence.NamedNativeQuery
See Also:
NAMED_NATIVE_QUERY

setCacheProperties

public void setCacheProperties(java.util.Properties cacheProperties)
Parameters:
cacheProperties - The value of Cache
See Also:
CACHE_PROPERTIES

getCacheProperties

public java.util.Properties getCacheProperties()
Returns:
The value of Cache
See Also:
CACHE_PROPERTIES


Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com