01: /*
02:
03: This software is OSI Certified Open Source Software.
04: OSI Certified is a certification mark of the Open Source Initiative.
05:
06: The license (Mozilla version 1.0) can be read at the MMBase site.
07: See http://www.MMBase.org/license
08:
09: */
10: package org.mmbase.storage.search.implementation;
11:
12: import org.mmbase.storage.search.StepField;
13: import org.mmbase.storage.search.FunctionValueConstraint;
14: import org.mmbase.util.logging.Logger;
15: import org.mmbase.util.logging.Logging;
16:
17: /**
18: *
19: * @author Marcel Maatkamp
20: * @version $Id: BasicFunctionValueConstraint.java,v 1.3 2007/06/12 12:32:47 michiel Exp $
21: * @since MMBase-1.8.5
22: */
23: public class BasicFunctionValueConstraint extends
24: BasicFieldValueConstraint implements FunctionValueConstraint {
25:
26: private static final Logger log = Logging
27: .getLoggerInstance(BasicFunctionValueConstraint.class);
28:
29: private final String function;
30:
31: public BasicFunctionValueConstraint(StepField field, Object value,
32: String function) {
33: super (field, value);
34: this .function = function;
35: if (log.isDebugEnabled()) {
36: log.debug("field(" + getField() + ") and object("
37: + getValue() + "): setting function(" + function
38: + ")");
39: }
40: }
41:
42: public String getFunction() {
43: if (log.isDebugEnabled()) {
44: log.debug("for field(" + getField() + ") and object("
45: + getValue() + "): getting function(" + function
46: + ")");
47: }
48: return this.function;
49: }
50: }
|