// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
package ws.rest;

public class Test {
    public T1 getOne(int f1) {
        // dummy implementation
        return new T1(f1, "getOne");
    }
    public T1[] getAll() {
        // dummy implementation
        T1[] res = new T1[3];
        res[0] = new T1(1, "getAll #1");
        res[1] = new T1(2, "getAll #2");
        res[2] = new T1(3, "getAll #3");
        return res;
    }
    public T1[] getSome(int start, int finish) {
        // dummy implementation
        T1[] res = new T1[finish - start + 1];
        for(int i = 0; i < res.length; i++) {
            res[i] = new T1(start + i, "getSome #" + (start + i));
        }
        return res;
    }
    public boolean save(T1 o) {
        // dummy implementation
        return o.getF1() > 0 && o.getF2().length() > 0;
    }
    public boolean delete(int f1) {
        // dummy implementation
        return f1 > 0;
    }
}
