001    package org.cumulus4j.store.model;
002    
003    import java.util.Collection;
004    
005    import javax.jdo.PersistenceManager;
006    
007    import org.cumulus4j.store.model.FieldMeta.NamedQueries;
008    
009    public class FieldMetaDAO extends AbstractDAO {
010    
011            public FieldMetaDAO() { }
012    
013            public FieldMetaDAO(PersistenceManager pm) {
014                    super(pm);
015            }
016    
017            public Collection<FieldMeta> getFieldMetasForClassMeta(ClassMeta classMeta) {
018                    javax.jdo.Query query = pm.newNamedQuery(FieldMeta.class, NamedQueries.getFieldMetasForClassMeta);
019                    @SuppressWarnings("unchecked")
020                    Collection<FieldMeta> result = (Collection<FieldMeta>) query.execute(classMeta);
021                    return result;
022            }
023    
024            public Collection<FieldMeta> getSubFieldMetasForFieldMeta(FieldMeta fieldMeta) {
025                    javax.jdo.Query query = pm.newNamedQuery(FieldMeta.class, NamedQueries.getSubFieldMetasForFieldMeta);
026                    @SuppressWarnings("unchecked")
027                    Collection<FieldMeta> result = (Collection<FieldMeta>) query.execute(fieldMeta);
028                    return result;
029            }
030    
031    }