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 aJPAClassNature
to access the givenPropertyHolder
. -
Method Summary
Modifier and TypeMethodDescriptiongetId()
Returns the fully qualified name of the Nature.javax.persistence.InheritanceType
boolean
Returns if class has a mapped super class.void
setCacheProperties
(Properties cacheProperties) void
setEntityName
(String entityname) void
setInheritanceStrategy
(javax.persistence.InheritanceType strategy) void
setMappedSuperclass
(Boolean hasMappedSuperclass) Set class to have a mapped super class.void
setNamedNativeQuery
(Map<String, String> namedNativeQueryMap) void
setNamedQuery
(Map<String, String> namedQuery) void
setTableCatalog
(String catalog) void
setTableName
(String tablename) void
setTableSchema
(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 aJPAClassNature
to 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:
-
ENTITY_NAME
-
getEntityName
- Returns:
- The value of
Entity.name()
. - See Also:
-
ENTITY_NAME
-
setTableName
- Parameters:
tablename
- The value ofTable.name()
- See Also:
-
TABLE_NAME
-
getTableName
- Returns:
- The value of
Table.name()
- See Also:
-
TABLE_NAME
-
setTableCatalog
- Parameters:
catalog
- The value ofTable.catalog()
- See Also:
-
TABLE_CATALOG
-
getTableCatalog
- Returns:
- The value of
Table.catalog()
- See Also:
-
TABLE_CATALOG
-
setTableSchema
- Parameters:
schema
- The value ofTable.schema()
- See Also:
-
TABLE_SCHEMA
-
getTableSchema
- Returns:
- The value of
Table.schema()
- See Also:
-
TABLE_SCHEMA
-
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:
-