package devguide.advanced.customprops;

import devguide.advanced.customprops.common.ProductModule;

import devguide.advanced.customprops.common.Products;

import java.io.Serializable;

import oracle.jbo.server.ApplicationModuleImpl;
// ---------------------------------------------------------------------
// ---    File generated by Oracle ADF Business Components Design Time.
// ---    Custom code may be added to this class.
// ---    Warning: Do not modify method signatures of generated methods.
// ---------------------------------------------------------------------
public class ProductModuleImpl extends ApplicationModuleImpl implements ProductModule {
    /**This is the default constructor (do not remove).
     */
    public ProductModuleImpl() {
    }

    /**Container's getter for Products.
     */
    public ProductsImpl getProducts() {
        return (ProductsImpl)findViewObject("Products");
    }
    
    public Products useProducts() {
      return (Products)getProducts();
    }
    
    /**
     * Expose the ability for a client to set an application module
     * custom property at runtime. This method is on the 
     * appliation module's client interface.
     * @param name the property name
     * @param value the property value
     */
    public void setAppModuleCustomProperty(String name, Serializable value) {
      setProperty(name,value);
    }

    /**Sample main for debugging Business Components code using the tester.
     */
    public static void main(String[] args) {
      launchTester("devguide.advanced.customprops", /* package name */
        "ProductModuleLocal" /* Configuration Name */);
    }
    protected void create() {
      super.create();
      setProperty("AppModuleCustomProperty",
                  "AppModuleCustomPropertyValue");
    }
}
