/* * Copyright 2009-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.batch.admin.sample.lead; public class Lead { private Long id; private Client client; private Product product; private String salesRep = "Nobody"; private double amount; private String query; public Lead(Lead other) { this(other.id, other.client, other.product); salesRep = other.salesRep; amount = other.amount; query = other.query; } public Lead(Long id, Client client, Product product) { this.id = id; this.client = client; this.product = product; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Client getClient() { return client; } public void setClient(Client client) { this.client = client; } public Product getProduct() { return product; } public void setProduct(Product product) { this.product = product; } public String getSalesRep() { return salesRep; } public void setSalesRep(String salesRep) { this.salesRep = salesRep; } public double getAmount() { return amount; } public void setAmount(double amount) { this.amount = amount; } public String getQuery() { return query; } public void setQuery(String query) { this.query = query; } @Override public String toString() { return String.format("[%s: id=%d, client=%s, product=%s, sales=%s]", getClass().getSimpleName(), id, client, product, salesRep); } }