X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=core%2Fsrc%2Fnet%2Fsf%2Fopenrocket%2Fdatabase%2FComponentPresetDao.java;fp=core%2Fsrc%2Fnet%2Fsf%2Fopenrocket%2Fdatabase%2FComponentPresetDao.java;h=a27a7f5d424304295d84c631ea261be95a019b82;hb=9349577cdfdff682b2aabd6daa24fdc3a7449b58;hp=0000000000000000000000000000000000000000;hpb=30ba0a882f0c061176ba14dbf86d3d6fad096c02;p=debian%2Fopenrocket diff --git a/core/src/net/sf/openrocket/database/ComponentPresetDao.java b/core/src/net/sf/openrocket/database/ComponentPresetDao.java new file mode 100644 index 00000000..a27a7f5d --- /dev/null +++ b/core/src/net/sf/openrocket/database/ComponentPresetDao.java @@ -0,0 +1,33 @@ +package net.sf.openrocket.database; + +import java.util.List; + +import net.sf.openrocket.preset.ComponentPreset; + +public interface ComponentPresetDao { + + public List listAll(); + + public void insert( ComponentPreset preset ); + + public List listForType( ComponentPreset.Type type ); + + /** + * Return a list of component presets based on the type. + * All components returned will be of Type type. + * + * @param type + * @param favorite if true, only return the favorites. otherwise return all matching. + * @return + */ + public List listForType( ComponentPreset.Type type, boolean favorite ); + + public List listForTypes( ComponentPreset.Type ... type ); + + public List listForTypes( List types ); + + public void setFavorite( ComponentPreset preset, ComponentPreset.Type type, boolean favorite ); + + public List find( String manufacturer, String partNo ); + +} \ No newline at end of file