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