X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=source%2Fmir%2Fstorage%2Fstore%2FStoreContainerType.java;h=b3441fafb5fe281b805fac6197034324e1942a43;hb=aa6c03501a1cca8714ce094d566769540045c1ab;hp=3cb33835ecef8b00ddfa01fad824e5f2b45cfbbc;hpb=c6a2204d8d75293256fd17c07e54971d7672359a;p=mir.git diff --git a/source/mir/storage/store/StoreContainerType.java b/source/mir/storage/store/StoreContainerType.java index 3cb33835..b3441faf 100755 --- a/source/mir/storage/store/StoreContainerType.java +++ b/source/mir/storage/store/StoreContainerType.java @@ -16,7 +16,7 @@ package mir.storage.store; */ import java.util.HashMap; -import mir.misc.Logfile; +import mir.misc.*; public class StoreContainerType { @@ -26,6 +26,7 @@ public class StoreContainerType { public final static int STOC_TYPE_MAX=STOC_TYPE_ENTITYLIST; private static HashMap[] uniqueTypes=new HashMap[STOC_TYPE_MAX+1]; + private static ObjectStore o_store=ObjectStore.getInstance(); private static Logfile storeLog; private Class stocClass=null; private int stocType=STOC_TYPE_UNKNOWN; @@ -33,7 +34,6 @@ public class StoreContainerType { static { uniqueTypes[STOC_TYPE_ENTITY]= new HashMap(); uniqueTypes[STOC_TYPE_ENTITYLIST]=new HashMap(); - } private StoreContainerType() {} @@ -59,6 +59,14 @@ public class StoreContainerType { public int getStocType() { return stocType; } public Class getStocClass() { return stocClass; } + public String getConfPrefix() { + return StoreUtil.getPropNameFor(stocClass)+"."+stringForStoreType(stocType); + } + public int getDefaultSize() { + String confProperty= "StoreContainer."+stringForStoreType(stocType)+".DefaultSize"; + return + StringUtil.parseInt( o_store.getConfProperty(confProperty),10 ); + } public String toString() { StringBuffer sb = new StringBuffer(this.stocClass.toString()); @@ -68,8 +76,8 @@ public class StoreContainerType { private static String stringForStoreType(int stocType) { switch(stocType) { - case STOC_TYPE_ENTITY: return "ENTITY"; - case STOC_TYPE_ENTITYLIST: return "ENTITYLIST"; + case STOC_TYPE_ENTITY: return "Entity"; + case STOC_TYPE_ENTITYLIST: return "EntityList"; default: return "UNKNOWN"; } }