summaryrefslogtreecommitdiff
path: root/java-compat/test/ejb/src/ejb2/com/zeroc/ejb/DatabaseI.java
blob: 9787c5c488512fcec331e451fcf27f77e5fc5bbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// **********************************************************************
//
// Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

package com.zeroc.ejb;

import com.zeroc.ice.Test.*;

public class DatabaseI extends _DatabaseDisp
{
    public final Account 
    getAccount(String id, Ice.Current current)
        throws AccountNotExistException
    {
        Account account = accounts.get(id);
        if(account == null)
        {
            throw new AccountNotExistException(id);
        }
        return account;
    }

    public final void
    addAccount(Account s, Ice.Current current)
    {
        accounts.put(s.id, s);
    }

    private java.util.Map<String, Account> accounts = new java.util.HashMap<String, Account>();
}