-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#2196 Initial transition to ANTLR tokens in fluent API implementation
- Replaced the intermediate Tokens class by EqlSentenceBuilder. - Temporarily commented out the old code which won't compile anymore and is staged for removal.
- Loading branch information
1 parent
1daa142
commit f320df3
Showing
137 changed files
with
2,819 additions
and
2,742 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 36 additions & 36 deletions
72
...-pojo-bl/src/main/java/ua/com/fielden/platform/entity/query/fluent/AbstractQueryLink.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
package ua.com.fielden.platform.entity.query.fluent; | ||
|
||
import static ua.com.fielden.platform.utils.EntityUtils.equalsEx; | ||
|
||
import ua.com.fielden.platform.entity.query.exceptions.EqlException; | ||
import ua.com.fielden.platform.utils.EntityUtils; | ||
|
||
import java.util.Objects; | ||
|
||
abstract class AbstractQueryLink { | ||
|
||
private final Tokens tokens; | ||
protected AbstractQueryLink(final Tokens tokens) { | ||
if (tokens == null) { | ||
public final EqlSentenceBuilder builder; | ||
|
||
protected AbstractQueryLink(final EqlSentenceBuilder builder) { | ||
if (builder == null) { | ||
throw new EqlException("Invalid argument -- tokens should not be null."); | ||
} | ||
|
||
this.tokens = tokens; | ||
this.builder = builder; | ||
} | ||
|
||
public EqlSentenceBuilder getBuilder() { | ||
return builder; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return builder.toString(); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return 31 * builder.hashCode(); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) { | ||
return true; | ||
} | ||
|
||
if (obj == null || getClass() != obj.getClass()) { | ||
return false; | ||
} | ||
|
||
final AbstractQueryLink that = (AbstractQueryLink) obj; | ||
return Objects.equals(this.builder, that.builder); | ||
} | ||
|
||
public Tokens getTokens() { | ||
return tokens; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return getTokens().toString(); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return 31 * tokens.hashCode(); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) { | ||
return true; | ||
} | ||
|
||
if (obj == null || getClass() != obj.getClass()) { | ||
return false; | ||
} | ||
|
||
final AbstractQueryLink that = (AbstractQueryLink) obj; | ||
return equalsEx(this.tokens, that.tokens); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.