/j2se/LGame-j2se-0.2.6/org/loon/framework/game/simple/extend/db/MDB.java

http://loon-simple.googlecode.com/ · Java · 68 lines · 25 code · 23 blank · 20 comment · 0 complexity · 64524dc5172b51f33db334e2b09b35b5 MD5 · raw file

  1. package org.loon.framework.game.simple.extend.db;
  2. import java.util.Map;
  3. import java.util.Set;
  4. /**
  5. * Copyright 2008
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  8. * use this file except in compliance with the License. You may obtain a copy of
  9. * the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  15. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  16. * License for the specific language governing permissions and limitations under
  17. * the License.
  18. *
  19. * @project loonframework
  20. * @author chenpeng
  21. * @email??ceponline@yahoo.com.cn
  22. * @version 0.1
  23. */
  24. public interface MDB {
  25. final static public String TAG_SUFFIX = ".tab";
  26. public void openTable(String tableName, int type);
  27. public void openTable(String tableName);
  28. public Object openTableObject(String tableName, String key, int type);
  29. public Object openTableObject(String tableName, String key);
  30. public Set getTables();
  31. public boolean deleteTable();
  32. public boolean isClose();
  33. public Map getTableList();
  34. public Set getTableKey();
  35. public void insert(String key, Object value);
  36. public void update(String key, Object value);
  37. public Object deleteIndex(long keyIndex);
  38. public Object delete(String key);
  39. public Object deleteTableAndReturn(String key);
  40. public Object select(String key);
  41. public long getKB();
  42. public void begin();
  43. public void begin(String password);
  44. public void end();
  45. }