Skip to content

Commit

Permalink
for #2084, EncryptRuleAware => EncryptRuleAwareFiller, ShardingRuleAw…
Browse files Browse the repository at this point in the history
…are => ShardingRuleAwareFiller
  • Loading branch information
terrymanu committed Apr 8, 2019
1 parent 00e2345 commit 3ada5dd
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @author zhangliang
*/
public interface EncryptRuleAware {
public interface EncryptRuleAwareFiller {

/**
* Set encrypt rule.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ public SQLStatement fill(final Collection<SQLSegment> sqlSegments, final SQLStat

@SuppressWarnings("unchecked")
private void doFill(final SQLSegment sqlSegment, final SQLStatement sqlStatement, final SQLSegmentFiller filler) {
if (filler instanceof ShardingRuleAware) {
((ShardingRuleAware) filler).setShardingRule((ShardingRule) this.rule);
if (filler instanceof ShardingRuleAwareFiller) {
((ShardingRuleAwareFiller) filler).setShardingRule((ShardingRule) this.rule);
}
if (filler instanceof EncryptRuleAware) {
((EncryptRuleAware) filler).setEncryptRule((EncryptRule) this.rule);
if (filler instanceof EncryptRuleAwareFiller) {
((EncryptRuleAwareFiller) filler).setEncryptRule((EncryptRule) this.rule);
}
filler.fill(sqlSegment, sqlStatement, shardingTableMetaData);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @author zhangliang
*/
public interface ShardingRuleAware {
public interface ShardingRuleAwareFiller {

/**
* Set sharding rule.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.core.metadata.table.ShardingTableMetaData;
import org.apache.shardingsphere.core.parse.antlr.filler.EncryptRuleAware;
import org.apache.shardingsphere.core.parse.antlr.filler.EncryptRuleAwareFiller;
import org.apache.shardingsphere.core.parse.antlr.filler.SQLSegmentFiller;
import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.FromWhereSegment;
import org.apache.shardingsphere.core.parse.antlr.sql.statement.SQLStatement;
Expand All @@ -33,7 +33,7 @@
*/
@Getter
@Setter
public class EncryptFromWhereFiller implements SQLSegmentFiller<FromWhereSegment>, EncryptRuleAware {
public class EncryptFromWhereFiller implements SQLSegmentFiller<FromWhereSegment>, EncryptRuleAwareFiller {

private EncryptRule encryptRule;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import lombok.Setter;
import org.apache.shardingsphere.core.metadata.table.ShardingTableMetaData;
import org.apache.shardingsphere.core.parse.antlr.filler.SQLSegmentFiller;
import org.apache.shardingsphere.core.parse.antlr.filler.ShardingRuleAware;
import org.apache.shardingsphere.core.parse.antlr.filler.ShardingRuleAwareFiller;
import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.FromWhereSegment;
import org.apache.shardingsphere.core.parse.antlr.sql.statement.SQLStatement;
import org.apache.shardingsphere.core.rule.ShardingRule;
Expand All @@ -33,7 +33,7 @@
*/
@Getter
@Setter
public class FromWhereFiller implements SQLSegmentFiller<FromWhereSegment>, ShardingRuleAware {
public class FromWhereFiller implements SQLSegmentFiller<FromWhereSegment>, ShardingRuleAwareFiller {

private ShardingRule shardingRule;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.apache.shardingsphere.core.metadata.table.ShardingTableMetaData;
import org.apache.shardingsphere.core.parse.antlr.constant.QuoteCharacter;
import org.apache.shardingsphere.core.parse.antlr.filler.SQLSegmentFiller;
import org.apache.shardingsphere.core.parse.antlr.filler.ShardingRuleAware;
import org.apache.shardingsphere.core.parse.antlr.filler.ShardingRuleAwareFiller;
import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.assignment.AssignmentSegment;
import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.assignment.SetAssignmentsSegment;
import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.column.ColumnSegment;
Expand Down Expand Up @@ -53,7 +53,7 @@
* @author zhangliang
*/
@Setter
public final class SetAssignmentsFiller implements SQLSegmentFiller<SetAssignmentsSegment>, ShardingRuleAware {
public final class SetAssignmentsFiller implements SQLSegmentFiller<SetAssignmentsSegment>, ShardingRuleAwareFiller {

private ShardingRule shardingRule;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import lombok.Setter;
import org.apache.shardingsphere.core.metadata.table.ShardingTableMetaData;
import org.apache.shardingsphere.core.parse.antlr.filler.SQLSegmentFiller;
import org.apache.shardingsphere.core.parse.antlr.filler.ShardingRuleAware;
import org.apache.shardingsphere.core.parse.antlr.filler.ShardingRuleAwareFiller;
import org.apache.shardingsphere.core.parse.antlr.sql.segment.common.TableSegment;
import org.apache.shardingsphere.core.parse.antlr.sql.statement.SQLStatement;
import org.apache.shardingsphere.core.parse.antlr.sql.statement.dml.SelectStatement;
Expand All @@ -33,7 +33,7 @@
* @author duhongjun
*/
@Setter
public final class TableFiller implements SQLSegmentFiller<TableSegment>, ShardingRuleAware {
public final class TableFiller implements SQLSegmentFiller<TableSegment>, ShardingRuleAwareFiller {

private ShardingRule shardingRule;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import lombok.Setter;
import org.apache.shardingsphere.core.metadata.table.ShardingTableMetaData;
import org.apache.shardingsphere.core.parse.antlr.filler.SQLSegmentFiller;
import org.apache.shardingsphere.core.parse.antlr.filler.ShardingRuleAware;
import org.apache.shardingsphere.core.parse.antlr.filler.ShardingRuleAwareFiller;
import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.InsertValuesSegment;
import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.expr.CommonExpressionSegment;
import org.apache.shardingsphere.core.parse.antlr.sql.statement.SQLStatement;
Expand All @@ -47,7 +47,7 @@
* @author zhangliang
*/
@Setter
public final class InsertValuesFiller implements SQLSegmentFiller<InsertValuesSegment>, ShardingRuleAware {
public final class InsertValuesFiller implements SQLSegmentFiller<InsertValuesSegment>, ShardingRuleAwareFiller {

private ShardingRule shardingRule;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import lombok.Setter;
import org.apache.shardingsphere.core.metadata.table.ShardingTableMetaData;
import org.apache.shardingsphere.core.parse.antlr.filler.SQLSegmentFiller;
import org.apache.shardingsphere.core.parse.antlr.filler.ShardingRuleAware;
import org.apache.shardingsphere.core.parse.antlr.filler.ShardingRuleAwareFiller;
import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.column.ColumnSegment;
import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.column.OnDuplicateKeyColumnsSegment;
import org.apache.shardingsphere.core.parse.antlr.sql.statement.SQLStatement;
Expand All @@ -34,7 +34,7 @@
* @author zhangliang
*/
@Setter
public final class OnDuplicateKeyColumnsFiller implements SQLSegmentFiller<OnDuplicateKeyColumnsSegment>, ShardingRuleAware {
public final class OnDuplicateKeyColumnsFiller implements SQLSegmentFiller<OnDuplicateKeyColumnsSegment>, ShardingRuleAwareFiller {

private ShardingRule shardingRule;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import lombok.Setter;
import org.apache.shardingsphere.core.metadata.table.ShardingTableMetaData;
import org.apache.shardingsphere.core.parse.antlr.filler.SQLSegmentFiller;
import org.apache.shardingsphere.core.parse.antlr.filler.ShardingRuleAware;
import org.apache.shardingsphere.core.parse.antlr.filler.ShardingRuleAwareFiller;
import org.apache.shardingsphere.core.parse.antlr.filler.sharding.dml.OrConditionFiller;
import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.condition.OrConditionSegment;
import org.apache.shardingsphere.core.parse.antlr.sql.segment.dml.condition.SubqueryConditionSegment;
Expand All @@ -34,7 +34,7 @@
* @author duhongjun
*/
@Setter
public final class SubqueryConditionFiller implements SQLSegmentFiller<SubqueryConditionSegment>, ShardingRuleAware {
public final class SubqueryConditionFiller implements SQLSegmentFiller<SubqueryConditionSegment>, ShardingRuleAwareFiller {

private ShardingRule shardingRule;

Expand Down

0 comments on commit 3ada5dd

Please sign in to comment.