| Modifier and Type | Field and Description |
|---|---|
protected Borning<T> |
bornByDefault
根据默认构造函数或者工厂方法创建实体的方法
|
protected Borning<T> |
bornByRS
根据 ResultSet 创建实体的方法
|
protected LinkFieldSet |
manymanys
所有多对多映射字段
|
protected LinkFieldSet |
manys
所有一对多映射字段
|
protected LinkFieldSet |
ones
所有一对一映射字段
|
protected Class<T> |
type
实体 Java 类型
|
protected LinkFieldSet ones
protected LinkFieldSet manys
protected LinkFieldSet manymanys
public T getObject(ResultSet rs, FieldMatcher matcher)
Entitypublic T getObject(ResultSet rs, FieldMatcher matcher, String prefix)
public void checkCompositeFields(String[] names)
names - 复合主键的 Java 字段名数组public void addMappingField(MappingField field)
field - 数据库实体字段public void addLinkField(LinkField lnk)
lnk - public void addIndex(EntityIndex index)
index - 实体索引public Context wrapAsContext(Object obj)
EntitywrapAsContext in interface Entity<T>obj - 实体对象的实例public List<LinkField> visitOne(Object obj, String regex, LinkVisitor visitor)
Entitypublic List<LinkField> visitMany(Object obj, String regex, LinkVisitor visitor)
Entitypublic List<LinkField> visitManyMany(Object obj, String regex, LinkVisitor visitor)
EntityvisitManyMany in interface Entity<T>obj - 映射的宿主对象regex - 正则表达式匹配 Java 字段名。null 表示匹配所有多对多映射字段visitor - 处理器public void setTableName(String namep)
public void setTableComment(String tComment)
public void setHasTableComment(boolean hasTableComment)
public void setHasColumnComment(boolean hasColumnComment)
public void setViewName(String namep)
public MappingField getField(String name)
Entitypublic MappingField getColumn(String name)
Entitypublic List<MappingField> getMappingFields()
getMappingFields in interface Entity<T>public List<LinkField> getLinkFields(String regex)
EntitygetLinkFields in interface Entity<T>regex - 正则表达式public List<MappingField> getCompositePKFields()
Entity如果没有复合主键,那么将返回 null
getCompositePKFields in interface Entity<T>public MappingField getNameField()
getNameField in interface Entity<T>public MappingField getVersionField()
getVersionField in interface Entity<T>public MappingField getIdField()
getIdField in interface Entity<T>public List<MappingField> getPks()
Entitypublic List<EntityIndex> getIndexes()
getIndexes in interface Entity<T>public EntityIndex getIndex(String name)
Entitypublic String getTableName()
EntitygetTableName in interface Entity<T>public String getViewName()
EntitygetViewName in interface Entity<T>public boolean addBeforeInsertMacro(Pojo pojo)
EntityaddBeforeInsertMacro in interface Entity<T>pojo - Pojo 语句public boolean addAfterInsertMacro(Pojo pojo)
EntityaddAfterInsertMacro in interface Entity<T>pojo - Pojo 语句public List<Pojo> cloneBeforeInsertMacroes()
Entity这些自动执行宏,在实体被插入到数据库前调用
比如程序员可以为某个字段定义值的自动生成规则
cloneBeforeInsertMacroes in interface Entity<T>public List<Pojo> cloneAfterInsertMacroes()
Entity这些自动执行宏,在实体被插入到数据库后调用
比如程序员可以为数据库自动生成的字段获取生成后的值
cloneAfterInsertMacroes in interface Entity<T>public PkType getPkType()
public boolean hasTableComment()
hasTableComment in interface Entity<T>public String getTableComment()
getTableComment in interface Entity<T>public boolean hasColumnComment()
hasColumnComment in interface Entity<T>public String getColumnComent(String columnName)
EntitygetColumnComent in interface Entity<T>columnName - 字段名称public boolean isComplete()
isComplete in interface Entity<T>public void setComplete(boolean complete)
Copyright © 2017. All rights reserved.