mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
feat: 调整关联查询相关功能模块访问级别
This commit is contained in:
parent
99a0824bd5
commit
e918a2f67c
@ -32,7 +32,7 @@ import java.util.*;
|
||||
|
||||
import static com.mybatisflex.core.query.QueryMethods.column;
|
||||
|
||||
abstract class AbstractRelation<SelfEntity> {
|
||||
public abstract class AbstractRelation<SelfEntity> {
|
||||
|
||||
protected String name;
|
||||
protected String simpleName;
|
||||
|
||||
@ -19,7 +19,7 @@ import com.mybatisflex.annotation.RelationManyToMany;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
class ManyToMany<SelfEntity> extends ToManyRelation<SelfEntity> {
|
||||
public class ManyToMany<SelfEntity> extends ToManyRelation<SelfEntity> {
|
||||
|
||||
public ManyToMany(RelationManyToMany annotation, Class<SelfEntity> entityClass, Field relationField) {
|
||||
super(getDefaultPrimaryProperty(annotation.selfField(), entityClass, "@RelationManyToMany.selfField can not be empty in field: \"" + entityClass.getName() + "." + relationField.getName() + "\"")
|
||||
|
||||
@ -19,7 +19,7 @@ import com.mybatisflex.annotation.RelationManyToOne;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
class ManyToOne<SelfEntity> extends ToOneRelation<SelfEntity> {
|
||||
public class ManyToOne<SelfEntity> extends ToOneRelation<SelfEntity> {
|
||||
|
||||
public ManyToOne(RelationManyToOne annotation, Class<SelfEntity> entityClass, Field relationField) {
|
||||
super(annotation.selfField()
|
||||
|
||||
@ -19,7 +19,7 @@ import com.mybatisflex.annotation.RelationOneToMany;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
class OneToMany<SelfEntity> extends ToManyRelation<SelfEntity> {
|
||||
public class OneToMany<SelfEntity> extends ToManyRelation<SelfEntity> {
|
||||
|
||||
|
||||
public OneToMany(RelationOneToMany annotation, Class<SelfEntity> entityClass, Field relationField) {
|
||||
|
||||
@ -19,7 +19,7 @@ import com.mybatisflex.annotation.RelationOneToOne;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
class OneToOne<SelfEntity> extends ToOneRelation<SelfEntity> {
|
||||
public class OneToOne<SelfEntity> extends ToOneRelation<SelfEntity> {
|
||||
|
||||
public OneToOne(RelationOneToOne annotation, Class<SelfEntity> entityClass, Field relationField) {
|
||||
super(getDefaultPrimaryProperty(annotation.selfField(), entityClass
|
||||
|
||||
@ -239,7 +239,7 @@ public class RelationManager {
|
||||
}
|
||||
|
||||
|
||||
private static List<AbstractRelation> getRelations(Class<?> clazz) {
|
||||
public static List<AbstractRelation> getRelations(Class<?> clazz) {
|
||||
return MapUtil.computeIfAbsent(classRelations, clazz, RelationManager::doGetRelations);
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
|
||||
class ToManyRelation<SelfEntity> extends AbstractRelation<SelfEntity> {
|
||||
public class ToManyRelation<SelfEntity> extends AbstractRelation<SelfEntity> {
|
||||
|
||||
protected String mapKeyField;
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ import com.mybatisflex.core.util.FieldWrapper;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
|
||||
class ToOneRelation<SelfEntity> extends AbstractRelation<SelfEntity> {
|
||||
public class ToOneRelation<SelfEntity> extends AbstractRelation<SelfEntity> {
|
||||
|
||||
|
||||
public ToOneRelation(String selfField, String targetSchema, String targetTable, String targetField, String valueField,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user