@SuppressWarnings("unchecked")
public PartitionDimension get() {
JdbcTemplate t = getJdbcTemplate();
ArrayList<PartitionDimension> results =
(ArrayList<PartitionDimension>) t.query("SELECT * FROM partition_dimension_metadata", new PartitionDimensionRowMapper());
if (results.size() == 0)
throw new HiveRuntimeException("No PartitionDimension found.");
else if (results.size() > 1)
throw new HiveRuntimeException(String.format("Found %s PartitionDImensions, there can be only one.", results.size()));