// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/model/BindingEntity.java
// @Entity
// public class BindingEntity {
// 
// 	@Id
// 	private String id;
// 	private String appGuid;
// 	private String bindingId;
// 	private String serviceInstanceId;
// 	private String drainUrl;
// 
// 	public BindingEntity() {
// 	}
// 
// 	public BindingEntity(ServiceInstanceBinding binding) {
// 		setAppGuid(binding.getAppGuid());
// 		setBindingId(binding.getId());
// 		setServiceInstanceId(binding.getServiceInstanceId());
// 		setDrainUrl(binding.getSyslogDrainUrl());
// 		this.setId(binding.getId());
// 	}
// 
// 	public String getAppGuid() {
// 		return appGuid;
// 	}
// 
// 	private void setAppGuid(String appGuid) {
// 		this.appGuid = appGuid;
// 	}
// 
// 	public String getBindingId() {
// 		return bindingId;
// 	}
// 
// 	private void setBindingId(String bindingId) {
// 		this.bindingId = bindingId;
// 	}
// 
// 	public String getServiceInstanceId() {
// 		return serviceInstanceId;
// 	}
// 
// 	private void setServiceInstanceId(String serviceInstanceId) {
// 		this.serviceInstanceId = serviceInstanceId;
// 	}
// 
// 	public String getDrainUrl() {
// 		return drainUrl;
// 	}
// 
// 	private void setDrainUrl(String drainUrl) {
// 		this.drainUrl = drainUrl;
// 	}
// 
// 	public String getId() {
// 		return id;
// 	}
// 
// 	private void setId(String id) {
// 		this.id = id;
// 	}
// }
// 
// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/repo/BindingRepository.java
// @RepositoryRestResource(collectionResourceRel = "bindings", path = "bindings")
// public interface BindingRepository extends
// 		PagingAndSortingRepository<BindingEntity, String> {
// 
// }


import java.util.ArrayList;
import java.util.Collection;
import org.cloudfoundry.community.servicebroker.datalifecycle.model.BindingEntity;
import org.cloudfoundry.community.servicebroker.datalifecycle.repo.BindingRepository;
import org.cloudfoundry.community.servicebroker.model.ServiceInstanceBinding;
import org.springframework.beans.factory.annotation.Autowired;
package org.cloudfoundry.community.servicebroker.datalifecycle.service;



public class LCServiceInstanceBindingManager {

	@Autowired
	private BindingRepository repo;

	public LCServiceInstanceBindingManager(BindingRepository repo) {
		this.repo = repo;
	}

	public Collection<ServiceInstanceBinding> getBindings() {
		Collection<ServiceInstanceBinding> bindings = new ArrayList<ServiceInstanceBinding>();
		repo.findAll().forEach(t -> bindings.add(convert(t)));
		return bindings;
	}

// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/model/BindingEntity.java
// @Entity
// public class BindingEntity {
// 
// 	@Id
// 	private String id;
// 	private String appGuid;
// 	private String bindingId;
// 	private String serviceInstanceId;
// 	private String drainUrl;
// 
// 	public BindingEntity() {
// 	}
// 
// 	public BindingEntity(ServiceInstanceBinding binding) {
// 		setAppGuid(binding.getAppGuid());
// 		setBindingId(binding.getId());
// 		setServiceInstanceId(binding.getServiceInstanceId());
// 		setDrainUrl(binding.getSyslogDrainUrl());
// 		this.setId(binding.getId());
// 	}
// 
// 	public String getAppGuid() {
// 		return appGuid;
// 	}
// 
// 	private void setAppGuid(String appGuid) {
// 		this.appGuid = appGuid;
// 	}
// 
// 	public String getBindingId() {
// 		return bindingId;
// 	}
// 
// 	private void setBindingId(String bindingId) {
// 		this.bindingId = bindingId;
// 	}
// 
// 	public String getServiceInstanceId() {
// 		return serviceInstanceId;
// 	}
// 
// 	private void setServiceInstanceId(String serviceInstanceId) {
// 		this.serviceInstanceId = serviceInstanceId;
// 	}
// 
// 	public String getDrainUrl() {
// 		return drainUrl;
// 	}
// 
// 	private void setDrainUrl(String drainUrl) {
// 		this.drainUrl = drainUrl;
// 	}
// 
// 	public String getId() {
// 		return id;
// 	}
// 
// 	private void setId(String id) {
// 		this.id = id;
// 	}
// }
// 
// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/repo/BindingRepository.java
// @RepositoryRestResource(collectionResourceRel = "bindings", path = "bindings")
// public interface BindingRepository extends
// 		PagingAndSortingRepository<BindingEntity, String> {
// 
// }


// Path: src/main/java/org/cloudfoundry/community/servicebroker/datalifecycle/service/LCServiceInstanceBindingManager.java
import java.util.ArrayList;
import java.util.Collection;
import org.cloudfoundry.community.servicebroker.datalifecycle.model.BindingEntity;
import org.cloudfoundry.community.servicebroker.datalifecycle.repo.BindingRepository;
import org.cloudfoundry.community.servicebroker.model.ServiceInstanceBinding;
import org.springframework.beans.factory.annotation.Autowired;

package org.cloudfoundry.community.servicebroker.datalifecycle.service;



public class LCServiceInstanceBindingManager {

	@Autowired
	private BindingRepository repo;

	public LCServiceInstanceBindingManager(BindingRepository repo) {
		this.repo = repo;
	}

	public Collection<ServiceInstanceBinding> getBindings() {
		Collection<ServiceInstanceBinding> bindings = new ArrayList<ServiceInstanceBinding>();
		repo.findAll().forEach(t -> bindings.add(convert(t)));
		return bindings;
	}

	public ServiceInstanceBinding getBinding(String bindingId) {