增加AbstractDataSqlSource

This commit is contained in:
redkale
2023-02-01 14:23:51 +08:00
parent 76797228a0
commit 8088197e29
7 changed files with 3317 additions and 3292 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,7 @@ import org.redkale.util.*;
@AutoLoad(false)
@SuppressWarnings("unchecked")
@ResourceType(DataSource.class)
public class DataJdbcSource extends DataSqlSource {
public class DataJdbcSource extends AbstractDataSqlSource {
protected ConnectionPool readPool;

View File

@@ -33,7 +33,7 @@ import org.redkale.util.*;
@AutoLoad(false)
@SuppressWarnings("unchecked")
@ResourceType(DataSource.class)
public class DataMemorySource extends DataSqlSource implements SearchSource {
public class DataMemorySource extends AbstractDataSqlSource implements SearchSource {
public DataMemorySource(String name) {
this.name = name;

File diff suppressed because it is too large Load Diff

View File

@@ -126,7 +126,7 @@ public class FilterJoinNode extends FilterNode {
}
@Override
protected <T> CharSequence createSQLExpress(DataSqlSource source, final EntityInfo<T> info, final Map<Class, String> joinTabalis) {
protected <T> CharSequence createSQLExpress(AbstractDataSqlSource source, final EntityInfo<T> info, final Map<Class, String> joinTabalis) {
return super.createSQLExpress(source, this.joinEntity == null ? info : this.joinEntity, joinTabalis);
}

View File

@@ -297,14 +297,14 @@ public class FilterNode { //FilterNode 不能实现Serializable接口 否则
/**
* 该方法需要重载
*
* @param source DataSqlSource
* @param source AbstractDataSqlSource
* @param <T> Entity类的泛型
* @param joinTabalis 关联表的集合
* @param info EntityInfo
*
* @return JOIN的SQL语句
*/
protected <T> CharSequence createSQLExpress(DataSqlSource source, final EntityInfo<T> info, final Map<Class, String> joinTabalis) {
protected <T> CharSequence createSQLExpress(AbstractDataSqlSource source, final EntityInfo<T> info, final Map<Class, String> joinTabalis) {
CharSequence sb0 = this.column == null || this.column.isEmpty() || this.column.charAt(0) == '#' || info == null
? null : createElementSQLExpress(source, info, joinTabalis == null ? null : joinTabalis.get(info.getType()));
if (this.nodes == null) {
@@ -396,7 +396,7 @@ public class FilterNode { //FilterNode 不能实现Serializable接口 否则
return items;
}
protected final <T> CharSequence createElementSQLExpress(DataSqlSource source, final EntityInfo<T> info, String talis) {
protected final <T> CharSequence createElementSQLExpress(AbstractDataSqlSource source, final EntityInfo<T> info, String talis) {
final Object val0 = getValue();
if (needSplit(val0)) {
if (val0 instanceof Collection) {
@@ -452,7 +452,7 @@ public class FilterNode { //FilterNode 不能实现Serializable接口 否则
}
private <T> CharSequence createElementSQLExpress(DataSqlSource source, final EntityInfo<T> info, String talis, Object val0) {
private <T> CharSequence createElementSQLExpress(AbstractDataSqlSource source, final EntityInfo<T> info, String talis, Object val0) {
if (column == null || this.column.isEmpty() || this.column.charAt(0) == '#') {
return null;
}