public static DBFactory<StatusCode> getFactory() { if (factory == null) { factory = DBFactory.createDBFactory( StatusCode.TABLE_NAME(), StatusCode.FieldInfo, DBFactory.KeyType.PRIMARY, StatusCode.class, StatusCode.Key.class, true /*editable*/, true /*viewable*/); factory.addParentTable(Account.TABLE_NAME()); factory.addParentTable(Device.TABLE_NAME()); factory.setFieldDefaultValue(FLD_deviceID, ALL_DEVICES); } return factory; }