00001 00025 package org.openmobileis.examples.mycrm.data.fodb; 00026 00027 import org.openmobileis.common.util.exception.BadDataFormatException; 00028 import org.openmobileis.database.fastobjectdb.FastObjectDB; 00029 import org.openmobileis.database.fastobjectdb.db.exception.FODBException; 00030 import org.openmobileis.examples.mycrm.data.Account; 00031 import org.openmobileis.examples.mycrm.data.Contact; 00032 import org.openmobileis.examples.mycrm.data.Leads; 00033 import org.openmobileis.modules.common.database.fodb.FODBLabel; 00034 import org.openmobileis.modules.common.database.fodb.FODBLabelFactory; 00035 00036 public final class MyCRMLabelFactory extends FODBLabelFactory { 00037 00038 public MyCRMLabelFactory() { 00039 super(); 00040 } 00041 00042 public String[][] getCategoriesList() { 00043 return new String[][]{ 00044 new String[]{Account.ACCOUNT_ACTIVITY_LABEL_CATEGORY,"Account activity label"}, 00045 new String[]{Contact.CONTACT_FUNCTION_LABEL_CATEGORY, "Contact function label"}, 00046 new String[]{Leads.LEADS_STATE_LABEL_CATEGORY, "Leads state label"} 00047 }; 00048 } 00049 00050 protected int getMaxLabelIdLength() { 00051 return 5; 00052 } 00053 00054 protected int getMaxCategoryIdLength() { 00055 return 2; 00056 } 00057 00058 protected Class getDataType() { 00059 return FODBLabel.class; 00060 } 00061 00062 protected void initDB(FastObjectDB db) throws FODBException, BadDataFormatException { 00063 00064 } 00065 00066 }