// Path: separation-of-api-and-implementation/separation-by-packaging-artifact/separated-api/src/main/java/com/link_intersystems/examples/service/GreetingResponse.java
// public class GreetingResponse {
// 
// 	private String greeting;
// 
// 	GreetingResponse(String greeting) {
// 		this.greeting = greeting;
// 	}
// 
// 	public String getGreeting() {
// 		return greeting;
// 	}
// }
// 
// Path: separation-of-api-and-implementation/separation-by-packaging-artifact/separated-api/src/main/java/com/link_intersystems/examples/service/GreetingService.java
// public interface GreetingService {
// 
// 	public GreetingResponse sayHello(GreetingRequest serviceRequest);
// }


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate4.HibernateTemplate;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.link_intersystems.examples.domain.Person;
import com.link_intersystems.examples.service.GreetingRequest;
import com.link_intersystems.examples.service.GreetingResponse;
import com.link_intersystems.examples.service.GreetingService;
package com.link_intersystems.examples.service;



@Repository
public class GreetingServiceImpl implements GreetingService {

	@Autowired
	private HibernateTemplate hibernateTemplate;

	@Transactional
	public GreetingResponse sayHello(GreetingRequest greetingRequest) {
		Integer personId = greetingRequest.getPersonId();

		Person person = hibernateTemplate.get(Person.class, personId);

		String greeting = "Hello ";
		if(person == null){
// Path: separation-of-api-and-implementation/separation-by-packaging-artifact/separated-api/src/main/java/com/link_intersystems/examples/service/GreetingResponse.java
// public class GreetingResponse {
// 
// 	private String greeting;
// 
// 	GreetingResponse(String greeting) {
// 		this.greeting = greeting;
// 	}
// 
// 	public String getGreeting() {
// 		return greeting;
// 	}
// }
// 
// Path: separation-of-api-and-implementation/separation-by-packaging-artifact/separated-api/src/main/java/com/link_intersystems/examples/service/GreetingService.java
// public interface GreetingService {
// 
// 	public GreetingResponse sayHello(GreetingRequest serviceRequest);
// }


// Path: separation-of-api-and-implementation/separation-by-packaging-artifact/separated-impl/src/main/java/com/link_intersystems/examples/service/GreetingServiceImpl.java
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate4.HibernateTemplate;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.link_intersystems.examples.domain.Person;
import com.link_intersystems.examples.service.GreetingRequest;
import com.link_intersystems.examples.service.GreetingResponse;
import com.link_intersystems.examples.service.GreetingService;

package com.link_intersystems.examples.service;



@Repository
public class GreetingServiceImpl implements GreetingService {

	@Autowired
	private HibernateTemplate hibernateTemplate;

	@Transactional
	public GreetingResponse sayHello(GreetingRequest greetingRequest) {
		Integer personId = greetingRequest.getPersonId();

		Person person = hibernateTemplate.get(Person.class, personId);

		String greeting = "Hello ";
		if(person == null){
			greeting += "unknown";