1 package org.synchronoss.cpo.core;
2
3 /*-
4 * [[
5 * core
6 * ==
7 * Copyright (C) 2003 - 2026 Exaxis LLC, Synchronoss Technologies Inc
8 * ==
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as
11 * published by the Free Software Foundation, either version 3 of the
12 * License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Lesser Public License for more details.
18 *
19 * You should have received a copy of the GNU General Lesser Public
20 * License along with this program. If not, see
21 * <http://www.gnu.org/licenses/lgpl-3.0.html>.
22 * ]]
23 */
24
25 /**
26 * Represents a native (datastore-specific) function expression bound to a marker, for embedding
27 * SQL/CQL functions like {@code UPPER(?)} into a CPO where/order-by clause.
28 *
29 * @author david berry
30 */
31 public class CpoNativeFunction {
32
33 private String marker = null;
34 private String expession = null;
35
36 /** Creates an empty native function with no marker or expression set. */
37 public CpoNativeFunction() {}
38
39 /**
40 * Creates a native function with the given marker and expression text.
41 *
42 * @param marker the bind marker this function is associated with
43 * @param text the native expression text
44 */
45 public CpoNativeFunction(String marker, String text) {
46 this.marker = marker;
47 this.expession = text;
48 }
49
50 /**
51 * Sets the bind marker this function is associated with.
52 *
53 * @param marker the bind marker
54 */
55 public void setMarker(String marker) {
56 this.marker = marker;
57 }
58
59 /**
60 * Gets the bind marker this function is associated with.
61 *
62 * @return the bind marker
63 */
64 public String getMarker() {
65 return this.marker;
66 }
67
68 /**
69 * Sets the native expression text.
70 *
71 * @param expession the native expression text
72 */
73 public void setExpression(String expession) {
74 this.expession = expession;
75 }
76
77 /**
78 * Gets the native expression text.
79 *
80 * @return the native expression text
81 */
82 public String getExpression() {
83 return this.expession;
84 }
85 }