/** * @return column family of the resource. Throws IllegalStateException if it's not a table-level resource. */ public String getTable() { if (!isTableLevel()) throw new IllegalStateException(String.format("%s data resource has no table", level)); return table; }
/** * @return column family of the resource. Throws IllegalStateException if it's not a table-level resource. */ public String getTable() { if (!isTableLevel()) throw new IllegalStateException(String.format("%s data resource has no table", level)); return table; }
/** * @return column family of the resource. Throws IllegalStateException if it's not a table-level resource. */ public String getTable() { if (!isTableLevel()) throw new IllegalStateException(String.format("%s data resource has no table", level)); return table; }
public static IResource maybeCorrectResource(IResource resource, ClientState state) throws InvalidRequestException { if (DataResource.class.isInstance(resource)) { DataResource dataResource = (DataResource) resource; if (dataResource.isTableLevel() && dataResource.getKeyspace() == null) return DataResource.table(state.getKeyspace(), dataResource.getTable()); } return resource; } }
public static IResource maybeCorrectResource(IResource resource, ClientState state) throws InvalidRequestException { if (DataResource.class.isInstance(resource)) { DataResource dataResource = (DataResource) resource; if (dataResource.isTableLevel() && dataResource.getKeyspace() == null) return DataResource.table(state.getKeyspace(), dataResource.getTable()); } return resource; } }
public static IResource maybeCorrectResource(IResource resource, ClientState state) throws InvalidRequestException { if (DataResource.class.isInstance(resource)) { DataResource dataResource = (DataResource) resource; if (dataResource.isTableLevel() && dataResource.getKeyspace() == null) return DataResource.table(state.getKeyspace(), dataResource.getTable()); } return resource; } }