01: /**********************************************************************
02: Copyright (c) 2004 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: 2008 Andy Jefferson - added raw value concept
17: ...
18: **********************************************************************/package org.jpox.store.expression;
19:
20: /**
21: * Represents a Literal expression.
22: * @version $Revision: 1.4 $
23: */
24: public interface Literal {
25: /**
26: * Accessor to the literal value
27: * @return the value of the literal
28: */
29: Object getValue();
30:
31: /**
32: * Method to save a "raw" value that this literal represents.
33: * This value differs from the literal value since that is of the same type as this literal.
34: * e.g An Enum can be represented as String or Integer, so we store the Enum as the "raw"
35: * @param val The raw value
36: */
37: void setRawValue(Object val);
38:
39: /**
40: * Accessor for the "raw" value that this literal represents.
41: * This value differs from the literal value since that is of the same type as this literal.
42: * @return The raw value
43: */
44: Object getRawValue();
45: }
|