This file contains hidden or 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
| --- hibernate-core/src/main/java/org/hibernate/hql/ast/HqlLexer.java 2011-04-28 10:39:48.000000000 -0400 | |
| +++ hibernate-core/src/main/java/org/hibernate/hql/ast/HqlLexer.java 2011-04-28 10:40:56.000000000 -0400 | |
| @@ -51,7 +51,7 @@ | |
| public void setTokenObjectClass(String cl) { | |
| // Ignore the token class name parameter, and use a specific token class. | |
| - super.setTokenObjectClass( HqlToken.class.getName() ); | |
| + tokenObjectClass = HqlToken.class; | |
| } | |
This file contains hidden or 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
| class Array | |
| def to_hash(&block) | |
| Hash[*self.collect { |v| | |
| block.call(v).flatten | |
| }.flatten] | |
| end | |
| end | |
| # so that ["foobar", "barfoo"].to_hash{|i| [i.upcase, i.downcase] } | |
| # yields {"FOOBAR"=>"foobar", "BARFOO"=>"barfoo"} |
This file contains hidden or 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
| public final static String PERCENTAGE_TAGS = "%%"; | |
| public final static String OPEN_FLOWER_BRACKET = "{"; | |
| public final static String CLOSE_FLOWER_BRACKET = "}"; | |
| private static String replaceFlowerBrackets(String strQry) throws Exception { | |
| strQry = strQry.replaceAll(Pattern.quote(OPEN_FLOWER_BRACKET), PERCENTAGE_TAGS); | |
| strQry = strQry.replaceAll(Pattern.quote(CLOSE_FLOWER_BRACKET), PERCENTAGE_TAGS); | |
| return strQry; | |
| } |
NewerOlder