01: package xdoclet.modules.ojb.model;
02:
03: /* Copyright 2004-2005 The Apache Software Foundation
04: *
05: * Licensed under the Apache License, Version 2.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: /**
19: * A reference descriptor for the ojb repository file.
20: *
21: * @author <a href="mailto:tomdz@users.sourceforge.net">Thomas Dudziak (tomdz@users.sourceforge.net)</a>
22: * @created April 13, 2003
23: */
24: public class ReferenceDescriptorDef extends FeatureDescriptorDef {
25: /** Whether this is an anonymous reference */
26: private boolean _isAnonymous = false;
27:
28: /**
29: * Creates a new reference descriptor object.
30: *
31: * @param name The name of the reference field
32: */
33: public ReferenceDescriptorDef(String name) {
34: super (name);
35: }
36:
37: /**
38: * Creates copy of the given reference descriptor object. Note that the copy has no owner initially.
39: *
40: * @param src The original reference
41: * @param prefix A prefix for the name
42: */
43: public ReferenceDescriptorDef(ReferenceDescriptorDef src,
44: String prefix) {
45: super (src, prefix);
46: }
47:
48: /**
49: * Declares this reference to be anonymous.
50: */
51: public void setAnonymous() {
52: _isAnonymous = true;
53: }
54:
55: /**
56: * Returns whether this reference is anonymous.
57: *
58: * @return <code>true</code> if it is anonymous
59: */
60: public boolean isAnonymous() {
61: return _isAnonymous;
62: }
63: }
|