001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 package org.apache.geronimo.samples.daytrader.ejb; 018 019 import javax.ejb.*; 020 import java.math.BigDecimal; 021 import java.sql.Timestamp; 022 import org.apache.geronimo.samples.daytrader.*; 023 024 public interface LocalHolding extends EJBLocalObject { 025 026 /* Container persisted attributes 027 * Note: Commented out methods are internal only and not exposed to EJB clients 028 * For example: The Primary Key value cannot be modified after creation 029 * Also, modification of other Entity attributes may be restricted to internal use 030 */ 031 032 public abstract Integer getHoldingID(); /* holdingID */ 033 //public abstract void setHoldingID(Integer holdingID); 034 public double getQuantity(); /* quantity */ 035 //public abstract void setQuantity(double quantity); 036 public BigDecimal getPurchasePrice(); /* purchasePrice */ 037 //public abstract void setPurchasePrice(BigDecimal purchasePrice); 038 public Timestamp getPurchaseDate(); /* purchaseDate */ 039 public abstract void setPurchaseDate(Timestamp purchaseDate); 040 041 /* Accessor methods for relationship fields */ 042 public LocalAccount getAccount(); /* Account(1) <---> Holding(*) */ 043 public void setAccount(LocalAccount account); 044 public LocalQuote getQuote(); /* Holding(1) ---> Quote(1) */ 045 public void setQuote(LocalQuote quote); 046 047 /* Business methods */ 048 049 public HoldingDataBean getDataBean(); 050 public String toString(); 051 052 }