01: /**********************************************************************
02: Copyright (c) 2005 Erik Bengtson and others. All rights reserved.
03: Licensed under the Apache License, Version 2.0 (the "License");
04: you may not use this file except in compliance with the License.
05: You may obtain a copy of the License at
06:
07: http://www.apache.org/licenses/LICENSE-2.0
08:
09: Unless required by applicable law or agreed to in writing, software
10: distributed under the License is distributed on an "AS IS" BASIS,
11: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: See the License for the specific language governing permissions and
13: limitations under the License.
14:
15: Contributors:
16: ...
17: **********************************************************************/package org.jpox.store.expression;
18:
19: /**
20: * Interface that allows one datastore adapt pattern expressions
21: * @version $Revision: 1.3 $
22: */
23: public interface ExpressionPatternAdapter {
24: /**
25: * Escape the characters of an expression expanded in word searches.
26: * @param patternExpression The expression
27: * @return the escaped string.
28: **/
29: ScalarExpression getEscapedPatternExpression(
30: ScalarExpression patternExpression);
31:
32: /**
33: * The pattern string for representing one character that is expanded in word searches.
34: * Most of databases will use the underscore character.
35: * @return the pattern string.
36: **/
37: String getPatternExpressionAnyCharacter();
38:
39: /**
40: * The pattern string for representing zero or more characters that is expanded in word searches.
41: * Most of databases will use the percent sign character.
42: * @return the pattern string.
43: **/
44: String getPatternExpressionZeroMoreCharacters();
45:
46: /**
47: * The character for escaping characters in pattern expressions.
48: * @return the character.
49: **/
50: String getEscapePatternExpression();
51:
52: /**
53: * The character for escaping characters in pattern expressions.
54: * @return the character.
55: **/
56: String getEscapeCharacter();
57: }
|