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.util.Collection;
021    import java.math.BigDecimal;
022    import java.sql.Timestamp;
023    import org.apache.geronimo.samples.daytrader.*;
024    
025    public interface LocalAccount extends EJBLocalObject {
026    
027        /* Container persisted attributes 
028         *  Note: Commented out methods are internal only and not exposed to EJB clients
029         *        For example: The Primary Key value cannot be modified after creation
030         *        Also, modification of other Entity attributes may be restricted to internal use
031         */
032    
033        public Integer              getAccountID();                         /* accountID */
034        //public void               setAccountID(int accountID);
035        public int                  getLoginCount();                        /* loginCount */
036        //public void               setLoginCount(int loginCount);
037        public int                  getLogoutCount();                       /* logoutCount */
038        //public void               setLogoutCount(int logoutCount);    
039        public Timestamp    getLastLogin();                         /* lastLogin Date */
040        //public void               setLastLogin(Date lastLogin);        
041        public Timestamp    getCreationDate();                      /* creationDate */
042        //public void               setCreationDate(Date creationDate);
043        public BigDecimal   getBalance();                           /* balance */
044        public void                 setBalance(BigDecimal balance);            
045        public BigDecimal   getOpenBalance();                       /* open balance */
046        //public void               setOpenBalance(BigDecimal openBalance);                
047    
048    
049        /* Accessor methods for relationship fields */
050        public LocalAccountProfile  getProfile();   /* This account's profile */
051        public Collection                   getHoldings();  /* This account's holdings */
052        public Collection                   getOrders();    /* This account's orders */
053    
054        /* Business methods */     
055        
056        public void login(String password);
057        public void logout();
058    
059        public Collection getClosedOrders() throws FinderException;
060        public LocalAccountProfile getProfileForUpdate() throws FinderException;
061    
062            public AccountProfileDataBean updateAccountProfile(AccountProfileDataBean profileData) throws FinderException;        
063            public AccountDataBean getDataBean();
064    
065            public AccountProfileDataBean getProfileDataBean();
066            public Collection getHoldingDataBeans();
067            public Collection getOrderDataBeans();
068            
069            public String toString();
070    }