001// Copyright 2004, 2005 The Apache Software Foundation 002// 003// Licensed under the Apache License, Version 2.0 (the "License"); 004// you may not use this file except in compliance with the License. 005// You may obtain a copy of the License at 006// 007// http://www.apache.org/licenses/LICENSE-2.0 008// 009// Unless required by applicable law or agreed to in writing, software 010// distributed under the License is distributed on an "AS IS" BASIS, 011// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 012// See the License for the specific language governing permissions and 013// limitations under the License. 014 015package org.apache.hivemind.schema.impl; 016 017import org.apache.hivemind.parse.BaseAnnotationHolder; 018import org.apache.hivemind.schema.AttributeModel; 019 020/** 021 * Implementation of {@link org.apache.hivemind.schema.AttributeModel}. 022 * 023 * @author Howard Lewis Ship 024 */ 025public final class AttributeModelImpl extends BaseAnnotationHolder implements AttributeModel 026{ 027 private String _name; 028 private boolean _required; 029 private boolean _unique; 030 private String _translator; 031 032 public String getName() 033 { 034 return _name; 035 } 036 037 public boolean isRequired() 038 { 039 return _required; 040 } 041 042 public void setName(String string) 043 { 044 _name = string; 045 } 046 047 public void setRequired(boolean b) 048 { 049 _required = b; 050 } 051 052 public void setUnique(boolean b) 053 { 054 _unique = b; 055 } 056 057 public boolean isUnique() 058 { 059 return _unique; 060 } 061 062 public String getTranslator() 063 { 064 return _translator; 065 } 066 067 public void setTranslator(String string) 068 { 069 _translator = string; 070 } 071 072}