public class Join extends Object implements Serializable
| 限定符和类型 | 方法和说明 |
|---|---|
JoinType |
getJoinType() |
Class<?> |
getTable()
关联表的entity class
|
String |
getTableAlias() |
static Join |
instance(Class<?> table,
String tableAlias)
默认关联类型是JoinType.INNER_JOIN
|
static Join |
instance(Class<?> table,
String tableAlias,
JoinType joinType) |
Join |
on(Property referencedColumn)
设置join sql语句中 on部分。
|
Join |
on(Property joinColumn,
Property referencedColumn)
设置join sql语句中 on部分
|
String |
toSql(Table selfTable,
Table referencedTable,
String referencedTableAlias) |
public static Join instance(Class<?> table, String tableAlias)
table - tableAlias - public Join on(Property referencedColumn)
referencedColumn - 当前table关联表的referencedColumn列public Join on(Property joinColumn, Property referencedColumn)
joinColumn - 当前Join类中的属性。joinColumn可以为null,为null时则joinColumn就是当前table的主键referencedColumn - 当前table关联表的referencedColumn列public Class<?> getTable()
public String getTableAlias()
public JoinType getJoinType()
Copyright © 2016. All rights reserved.