Package beaver.spec.ast

Examples of beaver.spec.ast.Declaration$PackageName


     * Creates a new (still-transient) customer.
     *
     * @return
     */
    public Customer newCustomer() {
        Customer customer = (Customer)newTransientInstance(Customer.class);
        return customer;
    }
View Full Code Here


    public Customer newCustomer(
            String firstName,
            String lastName,
            int customerNumber) {
       
        Customer customer = newCustomer();
        customer.setFirstName(firstName);
        customer.setLastName(lastName);
        customer.setCustomerNumber(customerNumber);
       
        getContainer().makePersistent(customer);
        return customer;
    }
View Full Code Here

                String name) {
            this.name = name;
        }

        public boolean accept(Object obj) {
            Customer pojo = (Customer)obj;
            return pojo.getLastName().toLowerCase().contains(name.toLowerCase());
        }
View Full Code Here

            final String code) {
        return firstMatch(
                Product.class,
                new Filter() {
                    public boolean accept(Object obj) {
                        Product pojo = (Product)obj;
                        return code.equals(pojo.getCode());
                    }
                },
                false);
    }
View Full Code Here

     *
     * @return
     */
    @Hidden
    public Product newProduct(String code, String description, int priceInPence) {
        Product product = (Product)newTransientInstance(Product.class);
        product.setCode(code);
        product.setDescription(description);
        product.setPrice(new Double(priceInPence/100));
       
        getContainer().makePersistent(product);
        return product;
    }
View Full Code Here

TOP

Related Classes of beaver.spec.ast.Declaration$PackageName

Copyright © 2018 www.massapicom. 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.