01: /**
02: * Objective Database Abstraction Layer (ODAL)
03: * Copyright (c) 2004, The ODAL Development Group
04: * All rights reserved.
05: * For definition of the ODAL Development Group please refer to LICENCE.txt file
06: *
07: * Distributable under LGPL license.
08: * See terms of license at gnu.org.
09: */package com.completex.objective.components.persistency;
10:
11: import java.util.ArrayList;
12: import java.util.Collection;
13:
14: /**
15: * List of ForeignKeyEntry items
16: *
17: * @author Gennady Krizhevsky
18: */
19: public class ForeignKeyEntries extends ArrayList {
20: private boolean internal;
21:
22: public ForeignKeyEntries(int initialCapacity, boolean internal) {
23: super (initialCapacity);
24: this .internal = internal;
25: }
26:
27: public ForeignKeyEntries(boolean internal) {
28: this .internal = internal;
29: }
30:
31: public ForeignKeyEntries(Collection c, boolean internal) {
32: super (c);
33: this .internal = internal;
34: }
35:
36: /**
37: *
38: * @param internal true if the value is from internal descriptor
39: */
40: public void setInternal(boolean internal) {
41: this .internal = internal;
42: }
43:
44: /**
45: * Returns true if the value is from internal descriptor.
46: *
47: * @return true if the value is from internal descriptor.
48: */
49: public boolean isInternal() {
50: return internal;
51: }
52:
53: /**
54: * Returns true if the value is from external descriptor.
55: *
56: * @return true if the value is from external descriptor
57: */
58: public boolean isExternal() {
59: return !internal;
60: }
61:
62: }
|