View Javadoc

1   /*
2    * Copyright (c) 2011.  The Apache Software Foundation
3    *
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *     http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS,
16   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   * See the License for the specific language governing permissions and
18   * limitations under the License.
19   */
20  
21  package org.apache.hadoop.hbase.hbql.mapping;
22  
23  import org.apache.expreval.client.InternalErrorException;
24  import org.apache.hadoop.hbase.hbql.client.HBqlException;
25  
26  import java.lang.reflect.Method;
27  import java.util.Map;
28  import java.util.NavigableMap;
29  
30  public class SelectFamilyAttrib extends ColumnAttrib {
31  
32      public SelectFamilyAttrib(final String familyName) throws HBqlException {
33          super(ColumnDefinition.newSelectFamilyAttribColumn(familyName));
34      }
35  
36      public boolean isASelectFamilyAttrib() {
37          return true;
38      }
39  
40      public String getNameToUseInExceptions() {
41          return this.getFamilyQualifiedName();
42      }
43  
44      public Map<Long, Object> getVersionMap(final Object recordObj) throws HBqlException {
45          throw new InternalErrorException();
46      }
47  
48      protected Class getComponentType() throws HBqlException {
49          throw new InternalErrorException();
50      }
51  
52      public Object getCurrentValue(final Object obj) throws HBqlException {
53          throw new InternalErrorException();
54      }
55  
56      protected Method getMethod(final String methodName, final Class<?>... params) throws NoSuchMethodException {
57          return null;
58      }
59  
60      public String getEnclosingClassName() {
61          return null;
62      }
63  
64      public void setCurrentValue(final Object obj, final long timestamp, final Object val) throws HBqlException {
65          throw new InternalErrorException();
66      }
67  
68      public void setUnMappedCurrentValue(final Object obj,
69                                          final String name,
70                                          final byte[] value) throws HBqlException {
71          throw new InternalErrorException();
72      }
73  
74      public void setUnMappedVersionMap(final Object obj,
75                                        final String name,
76                                        final NavigableMap<Long, byte[]> timeStampMap) throws HBqlException {
77          throw new InternalErrorException();
78      }
79  
80      public void resetDefaultValue() {
81          // No op
82      }
83  
84      public Object getDefaultValue() {
85          return null;
86      }
87  
88      public boolean hasDefaultArg() {
89          return false;
90      }
91  }