package de.st_ddt.crazyutil.databases;

import java.util.Collection;

public interface Database<S extends DatabaseEntry>
{

	public DatabaseType getType();

	public Class<S> getEntryClazz();

	public String getTableName();

	public String[] getColumnNames();

	public void checkTable();

	public boolean isStaticDatabase();

	public boolean hasEntry(String key);

	public S getEntry(String key);

	public Collection<S> getAllEntries();

	public S loadEntry(String key);

	public void loadAllEntries();

	public void saveDatabase();

	public void save(S entry);

	public void saveAll(Collection<S> entries);

	public boolean deleteEntry(String key);
	
	public void deleteAllEntries();
}

@@ -293,16 +293,33 @@
 kTable()
+ throws Exception
 ;%0D%0A%0D%0A%09pu
@@ -695,17 +695,16 @@
  key);%0D%0A
-%09
 %0D%0A%09publi

allow databases to throw errors in checkTable (for mysql databases)