public class DeployBeanDescriptor<T> extends Object
| Constructor and Description |
|---|
DeployBeanDescriptor(Class<T> beanType)
Construct the BeanDescriptor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(DeployNamedQuery namedQuery) |
void |
add(DeployNamedUpdate namedUpdate) |
void |
add(DRawSqlMeta rawSqlMeta) |
DeployBeanProperty |
addBeanProperty(DeployBeanProperty prop)
Add a bean property.
|
void |
addCompoundUniqueConstraint(CompoundUniqueContraint c)
Add a compound unique constraint.
|
void |
addPersistController(BeanPersistController controller)
Set the Controller.
|
void |
addPersistListener(BeanPersistListener<T> listener) |
void |
addQueryAdapter(BeanQueryAdapter queryAdapter) |
void |
addTableJoin(DeployTableJoin join)
Add a TableJoin to this type of bean.
|
boolean |
checkReadAndWriteMethods()
Check all the properties to see if they all have read and write methods
(required if using "subclassing" but not for "enhancement").
|
DeployBeanTable |
createDeployBeanTable() |
DeployBeanPropertyAssocOne<?> |
findJoinToTable(String tableName) |
String |
getBaseTable()
Return the base table.
|
TableName |
getBaseTableFull()
Return the base table with full structure.
|
BeanFinder<T> |
getBeanFinder()
Return the beanFinder.
|
DeployBeanProperty |
getBeanProperty(String propName)
Get a BeanProperty by its name.
|
BeanReflect |
getBeanReflect() |
Class<T> |
getBeanType()
Return the class type this BeanDescriptor describes.
|
CacheOptions |
getCacheOptions()
Return the reference options.
|
CompoundUniqueContraint[] |
getCompoundUniqueConstraints()
Return the compound unique constraints (can be null).
|
ConcurrencyMode |
getConcurrencyMode()
Return the concurrency mode used for beans of this type.
|
String |
getDefaultSelectClause()
Return the defaultSelectClause using FetchType.LAZY and FetchType.EAGER.
|
String[] |
getDependantTables()
Return the tables this bean is dependant on.
|
BeanDescriptor.EntityType |
getEntityType() |
String |
getExtraAttribute(String key)
Get a named extra attribute.
|
Map<String,String> |
getExtraAttributeMap() |
Class<?> |
getFactoryType()
Return the class type this BeanDescriptor describes.
|
String |
getFullName()
Return the bean class name this descriptor is used for.
|
IdGenerator |
getIdGenerator()
Return the actual IdGenerator for this bean type (can be null).
|
String |
getIdGeneratorName()
Return the name of the IdGenerator that should be used with this type of
bean.
|
IdType |
getIdType()
Return the identity generation type.
|
InheritInfo |
getInheritInfo()
Returns the Inheritance mapping information.
|
String |
getLazyFetchIncludes()
Return the includes for getReference().
|
String |
getName()
Return the bean short name.
|
Map<String,DeployNamedQuery> |
getNamedQueries() |
Map<String,DeployNamedUpdate> |
getNamedUpdates() |
BeanPersistController |
getPersistController()
Return the BeanPersistController (could be a chain of them, 1 or null).
|
BeanPersistListener<T> |
getPersistListener()
Return the BeanPersistListener (could be a chain of them, 1 or null).
|
BeanQueryAdapter |
getQueryAdapter() |
Collection<DRawSqlMeta> |
getRawSqlMeta() |
String |
getSelectLastInsertedId()
Return the SQL used to return the last inserted Id.
|
String |
getSequenceName()
Return the DB sequence name (can be null).
|
String |
getSinglePrimaryKeyColumn()
Return the Primary Key column assuming it is a single column (not
compound).
|
List<DeployTableJoin> |
getTableJoins() |
DeployBeanPropertyAssocOne<?> |
getUnidirectional() |
boolean |
isAbstract()
Return true if this beanType is an abstract class.
|
boolean |
isBaseTableType() |
boolean |
isEmbedded() |
boolean |
isNaturalKeyProperty(String name) |
boolean |
isScalaObject() |
boolean |
isUpdateChangesOnly() |
boolean |
isUseIdGenerator()
Return true if this bean type should use IdGeneration.
|
Set<String> |
parseDefaultSelectClause(String rawList)
Parse the include separating by comma or semicolon.
|
Iterator<DeployBeanProperty> |
propertiesAll()
Return an Iterator of all BeanProperty.
|
List<DeployBeanPropertyAssocMany<?>> |
propertiesAssocMany()
Return BeanPropertyAssocMany for this descriptor.
|
List<DeployBeanPropertyAssocOne<?>> |
propertiesAssocOne()
Return an Iterator of BeanPropertyAssocOne that are not embedded.
|
List<DeployBeanProperty> |
propertiesBase()
base properties without the unique id properties.
|
List<DeployBeanProperty> |
propertiesId()
Return the BeanProperty that make up the unique id.
|
List<DeployBeanProperty> |
propertiesVersion()
Returns 'Version' properties on this bean.
|
void |
setBaseTable(TableName baseTableFull)
Set the base table.
|
void |
setBeanFinder(BeanFinder<T> beanFinder)
Set the BeanFinder to use for beans of this type.
|
void |
setBeanReflect(BeanReflect beanReflect)
Set the BeanReflect used to create new instances of an EntityBean.
|
void |
setConcurrencyMode(ConcurrencyMode concurrencyMode)
Set the concurrency mode used for beans of this type.
|
void |
setDependantTables(String[] dependantTables)
Set the tables this bean is dependant on.
|
void |
setEntityType(BeanDescriptor.EntityType entityType) |
void |
setExtraAttribute(String key,
String value)
Set an extra attribute with a given name.
|
void |
setFactoryType(Class<?> factoryType)
Set the class used to create new EntityBean instances.
|
void |
setIdGenerator(IdGenerator idGenerator)
Set the actual IdGenerator for this bean type.
|
void |
setIdGeneratorName(String idGeneratorName)
Set the name of the IdGenerator that should be used with this type of bean.
|
void |
setIdType(IdType idType)
Set the identity generation type.
|
void |
setInheritInfo(InheritInfo inheritInfo)
Set the ORM inheritance mapping information.
|
void |
setLazyFetchIncludes(String lazyFetchIncludes)
Set includes to use for lazy loading by getReference().
|
void |
setName(String name)
Set the bean shortName.
|
void |
setSelectLastInsertedId(String selectLastInsertedId)
Set the SQL used to return the last inserted Id.
|
void |
setSequenceName(String sequenceName)
Set the DB sequence name.
|
void |
setUnidirectional(DeployBeanPropertyAssocOne<?> unidirectional) |
void |
setUpdateChangesOnly(boolean updateChangesOnly) |
void |
sortProperties() |
String |
toString()
Summary description.
|
public boolean isAbstract()
public boolean isScalaObject()
public Collection<DRawSqlMeta> getRawSqlMeta()
public DeployBeanTable createDeployBeanTable()
public boolean checkReadAndWriteMethods()
public void setEntityType(BeanDescriptor.EntityType entityType)
public boolean isEmbedded()
public boolean isBaseTableType()
public BeanDescriptor.EntityType getEntityType()
public void add(DRawSqlMeta rawSqlMeta)
public void add(DeployNamedUpdate namedUpdate)
public void add(DeployNamedQuery namedQuery)
public Map<String,DeployNamedQuery> getNamedQueries()
public Map<String,DeployNamedUpdate> getNamedUpdates()
public BeanReflect getBeanReflect()
public Class<?> getFactoryType()
public void setFactoryType(Class<?> factoryType)
Normally this would be a subclass dynamically generated for this bean.
public void setBeanReflect(BeanReflect beanReflect)
public InheritInfo getInheritInfo()
public void setInheritInfo(InheritInfo inheritInfo)
public CacheOptions getCacheOptions()
public boolean isNaturalKeyProperty(String name)
public DeployBeanPropertyAssocOne<?> getUnidirectional()
public void setUnidirectional(DeployBeanPropertyAssocOne<?> unidirectional)
public ConcurrencyMode getConcurrencyMode()
public void setConcurrencyMode(ConcurrencyMode concurrencyMode)
public boolean isUpdateChangesOnly()
public void setUpdateChangesOnly(boolean updateChangesOnly)
public String[] getDependantTables()
public void addCompoundUniqueConstraint(CompoundUniqueContraint c)
public CompoundUniqueContraint[] getCompoundUniqueConstraints()
public void setDependantTables(String[] dependantTables)
public BeanFinder<T> getBeanFinder()
public void setBeanFinder(BeanFinder<T> beanFinder)
public BeanPersistController getPersistController()
public BeanPersistListener<T> getPersistListener()
public BeanQueryAdapter getQueryAdapter()
public void addPersistController(BeanPersistController controller)
public void addPersistListener(BeanPersistListener<T> listener)
public void addQueryAdapter(BeanQueryAdapter queryAdapter)
public boolean isUseIdGenerator()
If this is false and the Id is null it is assumed that a database auto increment feature is being used to populate the id.
public String getBaseTable()
public TableName getBaseTableFull()
public void setBaseTable(TableName baseTableFull)
public void sortProperties()
public DeployBeanProperty addBeanProperty(DeployBeanProperty prop)
public DeployBeanProperty getBeanProperty(String propName)
public void setExtraAttribute(String key, String value)
key - the name of the extra attributevalue - the value of the extra attributepublic String getFullName()
If this BeanDescriptor is for a table then this returns the table name instead.
public String getName()
public void setName(String name)
public IdType getIdType()
public void setIdType(IdType idType)
public String getSequenceName()
public void setSequenceName(String sequenceName)
public String getSelectLastInsertedId()
Used with Identity columns where getGeneratedKeys is not supported.
public void setSelectLastInsertedId(String selectLastInsertedId)
public String getIdGeneratorName()
public void setIdGeneratorName(String idGeneratorName)
public IdGenerator getIdGenerator()
public void setIdGenerator(IdGenerator idGenerator)
public String getLazyFetchIncludes()
public void setLazyFetchIncludes(String lazyFetchIncludes)
public void addTableJoin(DeployTableJoin join)
public List<DeployTableJoin> getTableJoins()
public Iterator<DeployBeanProperty> propertiesAll()
public String getDefaultSelectClause()
public Set<String> parseDefaultSelectClause(String rawList)
public String getSinglePrimaryKeyColumn()
public List<DeployBeanProperty> propertiesId()
The order of these properties can be relied on to be consistent if the bean itself doesn't change or the xml deployment order does not change.
public DeployBeanPropertyAssocOne<?> findJoinToTable(String tableName)
public List<DeployBeanPropertyAssocOne<?>> propertiesAssocOne()
public List<DeployBeanPropertyAssocMany<?>> propertiesAssocMany()
public List<DeployBeanProperty> propertiesVersion()
public List<DeployBeanProperty> propertiesBase()
Copyright © 2014. All Rights Reserved.