Home » openejb-3.1.2-src » org » superbiz » enventries » [javadoc | source]

    1   /**
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *     http://www.apache.org/licenses/LICENSE-2.0
   10    *
   11    *  Unless required by applicable law or agreed to in writing, software
   12    *  distributed under the License is distributed on an "AS IS" BASIS,
   13    *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    *  See the License for the specific language governing permissions and
   15    *  limitations under the License.
   16    */
   17   package org.superbiz.enventries;
   18   
   19   import javax.annotation.Resource;
   20   import javax.ejb.Stateless;
   21   import java.io.File;
   22   import java.net.InetAddress;
   23   import java.net.URI;
   24   import java.net.URL;
   25   import java.util.Date;
   26   import java.util.List;
   27   import java.util.Map;
   28   
   29   /**
   30    * In addition to the standard env-entry types (String, Integer, Long, Short, Byte, Boolean, Double, Float, Character)
   31    * OpenEJB supports many other types.
   32    *
   33    */
   34   //START SNIPPET: code
   35   @Stateless
   36   public class StratocasterImpl implements Stratocaster {
   37   
   38   
   39       @Resource(name = "pickups")
   40       private List<Pickup> pickups;
   41   
   42       @Resource(name = "style")
   43       private Style style;
   44   
   45       @Resource(name = "dateCreated")
   46       private Date dateCreated;
   47   
   48       @Resource(name = "guitarStringGuages")
   49       private Map<String, Float> guitarStringGuages;
   50   
   51       @Resource(name = "certificateOfAuthenticity")
   52       private File certificateOfAuthenticity;
   53   
   54       public Date getDateCreated() {
   55           return dateCreated;
   56       }
   57   
   58       /**
   59        * Gets the guage of the electric guitar strings
   60        * used in this guitar.
   61        * @param string
   62        * @return
   63        */
   64       public float getStringGuage(String string){
   65           return guitarStringGuages.get(string);
   66       }
   67   
   68       public List<Pickup> getPickups() {
   69           return pickups;
   70       }
   71   
   72       public Style getStyle() {
   73           return style;
   74       }
   75   
   76       public File getCertificateOfAuthenticity() {
   77           return certificateOfAuthenticity;
   78       }
   79   }
   80   //END SNIPPET: code

Home » openejb-3.1.2-src » org » superbiz » enventries » [javadoc | source]