1 23 24 29 30 package com.sun.jdo.api.persistence.model.jdo.impl; 31 32 import com.sun.jdo.api.persistence.model.ModelException; 33 import com.sun.jdo.api.persistence.model.jdo.FieldGroupElement; 34 import com.sun.jdo.api.persistence.model.jdo.PersistenceFieldElement; 35 36 41 public class FieldGroupElementImpl extends PersistenceMemberElementImpl 42 implements FieldGroupElement.Impl 43 { 44 45 private PersistenceElementCollection _fields; 46 47 50 public FieldGroupElementImpl () 51 { 52 this(null); 53 } 54 55 58 public FieldGroupElementImpl (String name) 59 { 60 super(name); 61 _fields = new PersistenceElementCollection(this, PROP_FIELDS, 62 new PersistenceFieldElement[0]); 63 } 64 65 69 public PersistenceFieldElement getField (String name) 70 { 71 return (PersistenceFieldElement)_fields.getElement(name); 72 } 73 74 77 public PersistenceFieldElement[] getFields () 78 { 79 return (PersistenceFieldElement[])_fields.getElements(); 80 } 81 82 83 88 public void changeFields (PersistenceFieldElement[] fields, int action) 89 throws ModelException 90 { 91 _fields.changeElements(fields, action); 92 } 93 94 96 100 public PersistenceElementCollection getCollection () { return _fields; } 101 102 107 public void setCollection (PersistenceElementCollection collection) 108 { 109 _fields = collection; 110 } 111 } 112 | Popular Tags |