Package org.castor.cpa.jpa.natures
Class JPAClassNature
java.lang.Object
org.castor.core.nature.BaseNature
org.castor.cpa.jpa.natures.JPAClassNature
- All Implemented Interfaces:
Nature
A
BaseNature extension that gives access to information derived from
class bound JPA annotations.- Since:
- 1.3
- Author:
- Peter Schmidt
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJPAClassNature(PropertyHolder holder) Instantiate aJPAClassNatureto access the givenPropertyHolder. -
Method Summary
Modifier and TypeMethodDescriptiongetId()Returns the fully qualified name of the Nature.javax.persistence.InheritanceTypebooleanReturns if class has a mapped super class.voidsetCacheProperties(Properties cacheProperties) voidsetEntityName(String entityname) voidsetInheritanceStrategy(javax.persistence.InheritanceType strategy) voidsetMappedSuperclass(Boolean hasMappedSuperclass) Set class to have a mapped super class.voidsetNamedNativeQuery(Map<String, String> namedNativeQueryMap) voidsetNamedQuery(Map<String, String> namedQuery) voidsetTableCatalog(String catalog) voidsetTableName(String tablename) voidsetTableSchema(String schema) Methods inherited from class org.castor.core.nature.BaseNature
getBooleanPropertyDefaultFalse, getHolder, getProperty, getPropertyAsList, getPropertyAsMap, setProperty
-
Field Details
-
INHERITANCE_STRATEGY
Property Key forInheritance.strategy().- See Also:
-
MAPPED_SUPERCLASS
Nature property name for abstract.- See Also:
-
NAMED_QUERY
Property Key forNamedQuery.- See Also:
-
NAMED_NATIVE_QUERY
Property Key forNamedNativeQuery.- See Also:
-
CACHE_PROPERTIES
Property Key forCache.- See Also:
-
-
Constructor Details
-
JPAClassNature
Instantiate aJPAClassNatureto access the givenPropertyHolder.- Parameters:
holder- The underlyingPropertyHolder(obviously aClassInfo).- See Also:
-
-
Method Details
-
getId
Returns the fully qualified name of the Nature.- Returns:
- qualified name of the nature.
- See Also:
-
setEntityName
- Parameters:
entityname- The value ofEntity.name().- See Also:
-
getEntityName
- Returns:
- The value of
Entity.name(). - See Also:
-
setTableName
- Parameters:
tablename- The value ofTable.name()- See Also:
-
getTableName
- Returns:
- The value of
Table.name() - See Also:
-
setTableCatalog
- Parameters:
catalog- The value ofTable.catalog()- See Also:
-
getTableCatalog
- Returns:
- The value of
Table.catalog() - See Also:
-
setTableSchema
- Parameters:
schema- The value ofTable.schema()- See Also:
-
getTableSchema
- Returns:
- The value of
Table.schema() - See Also:
-
setInheritanceStrategy
public void setInheritanceStrategy(javax.persistence.InheritanceType strategy) - Parameters:
strategy- The value ofInheritance.strategy()- See Also:
-
getInheritanceStrategy
public javax.persistence.InheritanceType getInheritanceStrategy()- Returns:
- The value of
Inheritance.strategy() - See Also:
-
getNamedQuery
- Returns:
- The value of
NamedQuery - See Also:
-
setMappedSuperclass
Set class to have a mapped super class.- Parameters:
abstract- 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
- Parameters:
namedQuery- The value ofNamedQuery- See Also:
-
getNamedNativeQuery
- Returns:
- The value of
NamedNativeQuery - See Also:
-
setNamedNativeQuery
- Parameters:
namedNativeQueryMap- The value ofNamedNativeQuery- See Also:
-
setCacheProperties
- Parameters:
schema- The value ofCache- See Also:
-
getCacheProperties
- Returns:
- The value of
Cache - See Also:
-