@Test public void get_unexistingColumn_returnsDefaultVisibilityAndStoresDefaultVisibility() { assertEquals(DEFAULT_COLUMN_VISIBILITY, helper.getColumnVisibility("appId", "ns", "kind", "col")); String key = COLUMN_VISIBILITY_CONFIG + "$appId$ns$kind$col"; String item = storage.getItem(key); assertEquals(DEFAULT_COLUMN_VISIBILITY, Boolean.valueOf(item)); }
public boolean getColumnVisibility(String appId, String namespace, String kind, String columnName) { String kindKey = generateKindKey(appId, namespace, kind, columnName); String item = storage.getItem(kindKey); boolean visibility; if (Strings.isNullOrEmpty(item)) { visibility = DEFAULT_COLUMN_VISIBILITY; setColumnVisible(appId, namespace, kind, columnName, visibility); } else { visibility = Boolean.valueOf(item); } return visibility; }
ColumnVisibilityConfigHelper { public boolean getColumnVisibility(String appId, String namespace, String kind, String columnName) { String kindKey = generateKindKey(appId, namespace, kind, columnName); String item = storage.getItem(kindKey); boolean visibility; if (Strings.isNullOrEmpty(item)) { visibility = DEFAULT_COLUMN_VISIBILITY; setColumnVisible(appId, namespace, kind, columnName, visibility); } else { visibility = Boolean.valueOf(item); } return visibility; } }
ColumnVisibilityConfigHelper { public boolean getColumnVisibility(String appId, String namespace, String kind, String columnName) { String kindKey = generateKindKey(appId, namespace, kind, columnName); String item = storage.getItem(kindKey); boolean visibility; if (Strings.isNullOrEmpty(item)) { visibility = DEFAULT_COLUMN_VISIBILITY; setColumnVisible(appId, namespace, kind, columnName, visibility); } else { visibility = Boolean.valueOf(item); } return visibility; } @Inject  ColumnVisibilityConfigHelper(
            StorageAdapter storage); }
ColumnVisibilityConfigHelper { public boolean getColumnVisibility(String appId, String namespace, String kind, String columnName) { String kindKey = generateKindKey(appId, namespace, kind, columnName); String item = storage.getItem(kindKey); boolean visibility; if (Strings.isNullOrEmpty(item)) { visibility = DEFAULT_COLUMN_VISIBILITY; setColumnVisible(appId, namespace, kind, columnName, visibility); } else { visibility = Boolean.valueOf(item); } return visibility; } @Inject  ColumnVisibilityConfigHelper(
            StorageAdapter storage); void setColumnVisible(String appId, String namespace, String kind, String columnName, boolean visible); boolean getColumnVisibility(String appId, String namespace, String kind, String columnName); }
ColumnVisibilityConfigHelper { public boolean getColumnVisibility(String appId, String namespace, String kind, String columnName) { String kindKey = generateKindKey(appId, namespace, kind, columnName); String item = storage.getItem(kindKey); boolean visibility; if (Strings.isNullOrEmpty(item)) { visibility = DEFAULT_COLUMN_VISIBILITY; setColumnVisible(appId, namespace, kind, columnName, visibility); } else { visibility = Boolean.valueOf(item); } return visibility; } @Inject  ColumnVisibilityConfigHelper(
            StorageAdapter storage); void setColumnVisible(String appId, String namespace, String kind, String columnName, boolean visible); boolean getColumnVisibility(String appId, String namespace, String kind, String columnName);  }