01: /*
02: * $Id: Link.java,v 1.2 2002/09/16 08:05:06 jkl Exp $
03: *
04: * Copyright (c) 2002 Njet Communications Ltd. All Rights Reserved.
05: *
06: * Use is subject to license terms, as defined in
07: * Anvil Sofware License, Version 1.1. See LICENSE
08: * file, or http://njet.org/license-1.1.txt
09: */
10: package anvil.server.db;
11:
12: import java.sql.Connection;
13: import java.sql.SQLException;
14: import java.sql.Statement;
15: import java.sql.ResultSet;
16:
17: import anvil.server.OperationFailedException;
18:
19: /*package*/class Link {
20:
21: protected DBRealm _realm;
22: protected int _id;
23:
24: /*package*/Link(DBRealm realm, int id) {
25: _realm = realm;
26: _id = id;
27: }
28:
29: /*package*/int getId() {
30: return _id;
31: }
32:
33: /*package*/DBEntity get() throws OperationFailedException {
34: return _realm.getEntity(_id, null);
35: }
36:
37: /*package*/DBEntity getCached() {
38: return _realm.getCachedEntity(_id);
39: }
40: }
|