2 Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; version 2 of the License.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 package com.mysql.clusterj.core.spi;
20 import com.mysql.clusterj.core.query.CandidateIndexImpl;
21 import com.mysql.clusterj.core.query.InPredicateImpl;
22 import com.mysql.clusterj.core.query.PredicateImpl;
23 import com.mysql.clusterj.core.store.IndexScanOperation;
24 import com.mysql.clusterj.core.store.IndexScanOperation.BoundType;
25 import com.mysql.clusterj.core.store.Operation;
26 import com.mysql.clusterj.core.store.PartitionKey;
27 import com.mysql.clusterj.core.store.ResultData;
28 import com.mysql.clusterj.core.store.ScanFilter;
29 import com.mysql.clusterj.core.store.ScanFilter.BinaryCondition;
34 public interface DomainFieldHandler {
36 void filterCompareValue(Object value, BinaryCondition condition, ScanFilter filter);
38 void markEqualBounds(CandidateIndexImpl[] candidateIndices, PredicateImpl predicate);
40 void markInBounds(CandidateIndexImpl[] candidateIndices, InPredicateImpl predicate);
42 void markLowerBounds(CandidateIndexImpl[] candidateIndices, PredicateImpl predicate, boolean strict);
44 void markUpperBounds(CandidateIndexImpl[] candidateIndices, PredicateImpl predicate, boolean strict);
46 void objectSetValueFor(Object value, Object row, String indexName);
48 void operationEqual(Object value, Operation op);
50 void operationEqualForIndex(Object parameterValue, Operation op, String indexName);
52 void operationSetBounds(Object value, BoundType type, IndexScanOperation op);
54 void operationSetValue(ValueHandler handler, Operation op);
56 void objectSetKeyValue(Object keys, ValueHandler handler);
58 void objectSetValue(ResultData rs, ValueHandler handler);
66 void partitionKeySetPart(PartitionKey result, ValueHandler handler);
68 boolean includedInIndex(String index);
70 void operationSetModifiedValue(ValueHandler handler, Operation op);
72 void operationGetValue(Operation op);
74 void objectSetValueExceptIndex(ResultData rs, ValueHandler handler,
77 boolean isPrimaryKey();
79 Object getValue(QueryExecutionContext context, String parameterName);