View Javadoc

1   /**
2    * Copyright 2004-2013 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.hr.location.service;
17  
18  import org.kuali.hr.location.Location;
19  import org.kuali.hr.location.dao.LocationDao;
20  
21  import java.sql.Date;
22  import java.util.List;
23  
24  /**
25   * Represents an implementation of {@link LocationService}
26   * 
27   */
28  public class LocationServiceImpl implements LocationService {
29  
30  	private LocationDao locationDao;
31  	@Override
32  	public Location getLocation(String location, Date asOfDate) {
33  		return locationDao.getLocation(location, asOfDate);
34  	}
35   
36  	public void setLocationDao(LocationDao locationDao) {
37  		this.locationDao = locationDao;
38  	}
39  
40  	@Override
41  	public Location getLocation(String hrLocationId) {
42  		return locationDao.getLocation(hrLocationId);
43  	}
44  	
45  	@Override
46  	public int getLocationCount(String location) {
47  		return locationDao.getLocationCount(location);
48  	}
49  
50      @Override
51      public List<Location> searchLocations(String location, String locationDescr, String active, String showHistory) {
52          return locationDao.searchLocations(location, locationDescr, active, showHistory);
53      }
54  }