1 package org.jboss.media.entity.query; 2 3 import java.util.Collection ; 4 import java.util.Collections ; 5 import java.util.Map ; 6 7 import javax.ejb.FinderException ; 8 import javax.emb.IllegalOptionException; 9 import javax.emb.MediaException; 10 11 import org.jboss.media.entity.MetaDataEntityBean; 12 13 public class JBossMediaQueryLanguage implements MediaQueryLanguage 14 { 15 private static final String NAME = "JBossMediaQueryLanguage"; 16 17 private static final Map OPTIONS = 18 Collections.unmodifiableMap(Collections.EMPTY_MAP); 19 20 public JBossMediaQueryLanguage() 21 { 22 } 23 24 public String getName() throws MediaException 25 { 26 return NAME; 27 } 28 29 public Map getOptions() throws MediaException 30 { 31 return Collections.EMPTY_MAP; 32 } 33 34 public void setOptions(Map options) throws MediaException 35 { 36 throw new IllegalOptionException("You can't set options for this query language"); 37 } 38 39 public Collection query(MetaDataEntityBean metaDataEntity, String query) 40 throws FinderException , MediaException 41 { 42 return metaDataEntity.ejbSelectByPartialXML(query); 43 } 44 } | Popular Tags |