public class JPAClassNature extends BaseNature
BaseNature
extension that gives access to information derived from
class bound JPA annotations.PropertyHolder
Modifier and Type | Field and Description |
---|---|
static String |
CACHE_PROPERTIES
Property Key for
Cache . |
static String |
INHERITANCE_STRATEGY
Property Key for
Inheritance.strategy() . |
static String |
MAPPED_SUPERCLASS
Nature property name for abstract.
|
static String |
NAMED_NATIVE_QUERY
Property Key for
NamedNativeQuery . |
static String |
NAMED_QUERY
Property Key for
NamedQuery . |
Constructor and Description |
---|
JPAClassNature(PropertyHolder holder)
Instantiate a
JPAClassNature to access the given
PropertyHolder . |
Modifier and Type | Method and Description |
---|---|
Properties |
getCacheProperties() |
String |
getEntityName() |
String |
getId() |
javax.persistence.InheritanceType |
getInheritanceStrategy() |
Map<String,String> |
getNamedNativeQuery() |
Map<String,String> |
getNamedQuery() |
String |
getTableCatalog() |
String |
getTableName() |
String |
getTableSchema() |
boolean |
hasMappedSuperclass()
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) |
getBooleanPropertyDefaultFalse, getHolder, getProperty, getPropertyAsList, getPropertyAsMap, setProperty
public static final String INHERITANCE_STRATEGY
Inheritance.strategy()
.public static final String MAPPED_SUPERCLASS
public static final String NAMED_QUERY
NamedQuery
.public static final String NAMED_NATIVE_QUERY
NamedNativeQuery
.public static final String CACHE_PROPERTIES
Cache
.public JPAClassNature(PropertyHolder holder)
JPAClassNature
to access the given
PropertyHolder
.holder
- The underlying PropertyHolder
(obviously a
ClassInfo
).PropertyHolder
public String getId()
Nature.getId()
public void setEntityName(String entityname)
entityname
- The value of Entity.name()
.ENTITY_NAME
public String getEntityName()
Entity.name()
.ENTITY_NAME
public void setTableName(String tablename)
tablename
- The value of Table.name()
TABLE_NAME
public String getTableName()
Table.name()
TABLE_NAME
public void setTableCatalog(String catalog)
catalog
- The value of Table.catalog()
TABLE_CATALOG
public String getTableCatalog()
Table.catalog()
TABLE_CATALOG
public void setTableSchema(String schema)
schema
- The value of Table.schema()
TABLE_SCHEMA
public String getTableSchema()
Table.schema()
TABLE_SCHEMA
public void setInheritanceStrategy(javax.persistence.InheritanceType strategy)
strategy
- The value of Inheritance.strategy()
INHERITANCE_STRATEGY
public javax.persistence.InheritanceType getInheritanceStrategy()
Inheritance.strategy()
INHERITANCE_STRATEGY
public Map<String,String> getNamedQuery()
NamedQuery
NAMED_QUERY
public void setMappedSuperclass(Boolean hasMappedSuperclass)
abstract
- Boolean True if the given class has a mapped super class.public boolean hasMappedSuperclass()
public void setNamedQuery(Map<String,String> namedQuery)
namedQuery
- The value of NamedQuery
NAMED_QUERY
public Map<String,String> getNamedNativeQuery()
NamedNativeQuery
NAMED_NATIVE_QUERY
public void setNamedNativeQuery(Map<String,String> namedNativeQueryMap)
namedNativeQueryMap
- The value of NamedNativeQuery
NAMED_NATIVE_QUERY
public void setCacheProperties(Properties cacheProperties)
schema
- The value of Cache
CACHE_PROPERTIES
public Properties getCacheProperties()
Cache
CACHE_PROPERTIES
Copyright © 2013. All rights reserved.