1 package org.apache.ojb.broker; 2 3 import org.apache.ojb.broker.ManageableCollection; 4 5 import java.util.Vector ; 6 7 12 public class ArticleCollection implements ManageableCollection, java.io.Serializable 13 { 14 private Vector elements; 15 16 19 public ArticleCollection() 20 { 21 super(); 22 elements = new Vector (); 23 } 24 25 public void add(InterfaceArticle article) 26 { 27 if (elements == null) 28 elements = new Vector (); 29 elements.add(article); 30 } 31 32 public InterfaceArticle get(int index) 33 { 34 return (InterfaceArticle) elements.get(index); 35 } 36 37 40 public void ojbAdd(java.lang.Object anObject) 41 { 42 elements.add(anObject); 43 } 44 45 48 public void ojbAddAll(org.apache.ojb.broker.ManageableCollection otherCollection) 49 { 50 elements.addAll(((ArticleCollection) otherCollection).elements); 51 } 52 53 56 public java.util.Iterator ojbIterator() 57 { 58 return elements.iterator(); 59 } 60 61 public void afterStore(PersistenceBroker broker) throws PersistenceBrokerException 62 { 63 } 64 65 public int size() 66 { 67 return elements.size(); 68 } 69 70 public String toString() 71 { 72 return elements.toString(); 73 } 74 } 75 | Popular Tags |