
001package ca.uhn.fhir.jpa.packages; 002 003/*- 004 * #%L 005 * HAPI FHIR JPA Server 006 * %% 007 * Copyright (C) 2014 - 2022 Smile CDR, Inc. 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023import org.apache.commons.lang3.Validate; 024 025public class PackageSearchSpec { 026 private int myStart; 027 private int mySize = 50; 028 private String myResourceUrl; 029 private CharSequence myDescription; 030 private String myFhirVersion; 031 032 public String getFhirVersion() { 033 return myFhirVersion; 034 } 035 036 public void setFhirVersion(String theFhirVersion) { 037 myFhirVersion = theFhirVersion; 038 } 039 040 public int getSize() { 041 return mySize; 042 } 043 044 public void setSize(int theSize) { 045 Validate.inclusiveBetween(1, 250, theSize, "Number must be between 1-250"); 046 mySize = theSize; 047 } 048 049 public int getStart() { 050 return myStart; 051 } 052 053 public void setStart(int theStart) { 054 Validate.inclusiveBetween(0, Integer.MAX_VALUE, theStart, "Number must not be negative"); 055 myStart = theStart; 056 } 057 058 public String getResourceUrl() { 059 return myResourceUrl; 060 } 061 062 public void setResourceUrl(String theResourceUrl) { 063 myResourceUrl = theResourceUrl; 064 } 065 066 public CharSequence getDescription() { 067 return myDescription; 068 } 069 070 public void setDescription(CharSequence theDescription) { 071 myDescription = theDescription; 072 } 073}