1 package com.example.lede2;
\r
3 import android.provider.ContactsContract;
\r
5 import java.util.ArrayList;
\r
6 import java.util.Hashtable;
\r
7 import java.util.List;
\r
8 import java.util.Set;
\r
11 * Created by Brian on 2/28/2018.
\r
13 /*hierarchy of this object is dbobject -> dbtypeobject -> dbsubtypeobject
\r
14 dbobject holds a hashtable of typeobject and typeobject holds a hashtable of subtypeobject
\r
15 structure is similar across all levels, subtype obejct also holds the individual instances */
\r
16 public class DatabaseObject {
\r
17 private int numTypes;
\r
18 Hashtable<String, DatabaseTypeObject> types;
\r
20 public DatabaseObject(){
\r
22 types = new Hashtable<String, DatabaseTypeObject>();
\r
26 public void addTypeObject(String name, DatabaseTypeObject typeObject){
\r
27 if(!types.contains(name)){
\r
28 types.put(name, typeObject);
\r
32 public void deleteTypeObject(String name){
\r
33 if(types.contains(name)){
\r
38 public DatabaseTypeObject getTypeObject(String name){
\r
39 return types.get(name);
\r
41 public Set<String> getKeySet(){
\r
42 return types.keySet();
\r