Package server.repo

Source Code of server.repo.StubEmployeeRepository

package server.repo;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import server.model.Employee;

public class StubEmployeeRepository implements Repository<Employee> {

    @Override
    public Collection<Employee> all() {
        List<Employee> data = new ArrayList<Employee>(2);
        data.add(new Employee(1l, "Vasya", 25));
        data.add(new Employee(2l, "Petya", 32));
        return data;
    }

    @Override
    public Employee read(long id) {
        return null//To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public Employee save(Employee employee) {
        return null//To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public void delete(Employee employee) {
        //To change body of implemented methods use File | Settings | File Templates.
    }
}
TOP

Related Classes of server.repo.StubEmployeeRepository

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.