T - 类型P - the generic typepublic class ClassMapping<T,P extends PropertyMapping<P>>
extends java.lang.Object
class repository mapping
.| Constructor and Description |
|---|
ClassMapping(java.lang.Class<T> type,
java.lang.String repositoryName)
Instantiates a new class mapping.
|
ClassMapping(java.lang.Class<T> type,
java.lang.String repositoryName,
java.lang.String schema)
Instantiates a new class mapping.
|
ClassMapping(java.lang.Class<T> type,
java.lang.String repositoryName,
java.lang.String schema,
java.lang.String remark)
Instantiates a new class mapping.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addIndex(Index index)
Adds the index.
|
void |
addIndexs(java.util.Collection<Index> indexs)
Adds the indexs.
|
void |
addPropertyMapping(P propertyMapping)
Adds the property mapping.
|
void |
addPropertyMappings(java.util.Collection<P> propertyMappings)
Adds the property mappings.
|
Index |
getIndex(java.lang.String indexName)
Gets the index.
|
java.util.List<Index> |
getIndexs()
返回indexs.
|
java.util.List<P> |
getPrimaryKeyPropertyMappings()
返回所有主键属性映射.
|
P |
getPropertyMapping(java.lang.String propertyName)
返回指定属性名称的属性映射.
|
P |
getPropertyMappingByPersitField(java.lang.String persitField)
通过持久化字段(数据库字段)的名称返回指定属性映射.
|
java.util.Collection<P> |
getPropertyMappingLeafNodes()
返回所有叶节点的属性映射.
|
java.util.Collection<P> |
getPropertyMappings()
返回所有属性映射
|
java.lang.String |
getRemark()
返回remark.
|
java.lang.String |
getRepositoryName()
Gets the repository name.
|
java.lang.String |
getSchema()
返回schema.
|
java.lang.Class<T> |
getType()
Gets the type.
|
boolean |
isPrimaryKeyAutoincrement()
Checks if is autoincrement.
|
boolean |
isPrimaryKeyOrdered()
Checks if is autoincrement.
|
java.lang.String |
toString() |
public ClassMapping(java.lang.Class<T> type, java.lang.String repositoryName)
type - 类型repositoryName - 存储名public ClassMapping(java.lang.Class<T> type, java.lang.String repositoryName, java.lang.String schema)
type - 类型repositoryName - 存储名schema - the schemapublic ClassMapping(java.lang.Class<T> type, java.lang.String repositoryName, java.lang.String schema, java.lang.String remark)
type - 类型repositoryName - 存储名schema - the schemaremark - remarkpublic P getPropertyMapping(java.lang.String propertyName)
返回指定属性名称的属性映射. 没有找到返回null.
propertyName - 属性名称public P getPropertyMappingByPersitField(java.lang.String persitField)
通过持久化字段(数据库字段)的名称返回指定属性映射. 没有找到返回null.
persitField - 持久化字段(数据库字段)public java.util.Collection<P> getPropertyMappings()
返回所有属性映射
.public java.util.Collection<P> getPropertyMappingLeafNodes()
public java.util.List<P> getPrimaryKeyPropertyMappings()
public void addPropertyMapping(P propertyMapping)
propertyMapping - the property mappingpublic void addPropertyMappings(java.util.Collection<P> propertyMappings)
propertyMappings - the property mappingspublic void addIndex(Index index)
index - the indexpublic void addIndexs(java.util.Collection<Index> indexs)
indexs - the indexspublic java.util.List<Index> getIndexs()
public Index getIndex(java.lang.String indexName)
indexName - the index namepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getRepositoryName()
public java.lang.Class<T> getType()
public java.lang.String getRemark()
public java.lang.String getSchema()
public boolean isPrimaryKeyAutoincrement()
public boolean isPrimaryKeyOrdered()