View Javadoc

1   /*
2    Wotonomy: OpenStep design patterns for pure Java applications.
3    Copyright (C) 2001 Michael Powers
4   
5    This library is free software; you can redistribute it and/or
6    modify it under the terms of the GNU Lesser General Public
7    License as published by the Free Software Foundation; either
8    version 2.1 of the License, or (at your option) any later version.
9   
10   This library is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   Lesser General Public License for more details.
14  
15   You should have received a copy of the GNU Lesser General Public
16   License along with this library; if not, see http://www.gnu.org
17   */
18  package net.wotonomy.control;
19  
20  /***
21  *
22  * @author ezamudio@nasoft.com
23  * @author $Author: cgruber $
24  * @version $Revision: 893 $
25  */
26  public class EOVectorKeyGlobalID extends EOKeyGlobalID {
27  
28  	protected Object[] _keyValues;
29  
30  	public EOVectorKeyGlobalID(String entityName, Object[] values) {
31  		super(entityName, 0);
32  		_keyValues = new Object[values.length];
33  		for (int i = 0; i < values.length; i++) {
34  			_keyValues[i] = values[i];
35  		}
36  	}
37  
38  	/* (non-Javadoc)
39  	 * @see net.wotonomy.control.EOKeyGlobalID#keyValuesNoCopy()
40  	 */
41  	public Object[] _keyValuesNoCopy() {
42  		return _keyValues;
43  	}
44  
45  	/* (non-Javadoc)
46  	 * @see net.wotonomy.control.EOKeyGlobalID#_keyValues()
47  	 */
48  	public Object[] keyValues() {
49  		Object[] v = new Object[_keyValues.length];
50  		for (int i = 0; i < _keyValues.length; i++) {
51  			v[i] = _keyValues[i];
52  		}
53  		return v;
54  	}
55  
56  	/* (non-Javadoc)
57  	 * @see net.wotonomy.control.EOKeyGlobalID#keyCount()
58  	 */
59  	public int keyCount() {
60  		return _keyValues.length;
61  	}
62  
63  	/* (non-Javadoc)
64  	 * @see net.wotonomy.control.EOGlobalID#isTemporary()
65  	 */
66  	public boolean isTemporary() {
67  		return false;
68  	}
69  
70  }
71  /*
72   * $Log$
73   * Revision 1.1  2006/02/16 13:19:57  cgruber
74   * Check in all sources in eclipse-friendly maven-enabled packages.
75   *
76   * Revision 1.2  2003/08/19 01:59:01  chochos
77   * Added the wotonomy headers
78   *
79   */