1 package org.neuclear.ledger.prevalent;
2
3 import org.prevayler.Query;
4
5 import java.util.Date;
6
7 /***
8 * Created by IntelliJ IDEA.
9 * User: pelleb
10 * Date: Mar 22, 2004
11 * Time: 10:00:12 AM
12 * To change this template use File | Settings | File Templates.
13 */
14 public class GetBalanceQuery implements Query{
15 public GetBalanceQuery(String book) {
16 this.book = book;
17 }
18
19 /***
20 * @param system The Prevalent System to be queried.
21 * @param executionTime The "current" time.
22 * @return The result of this Query.
23 * @throws Exception Any Exception encountered by this Query.
24 */
25 public Object query(Object system, Date executionTime) throws Exception {
26 return new Double(((LedgerSystem)system).getBalance(book));
27 }
28
29 private final String book;
30 }
This page was automatically generated by Maven