private void insertKeys(Hive hive) throws HiveLockableException {
Directory d = getDirectory();
Resource resource = dimension.getResource(createResource().getName());
for (String key : getPrimaryIndexOrResourceKeys()) {
hive.directory().insertPrimaryIndexKey(key);
d.insertResourceId(resource, key, key);
hive.directory().insertSecondaryIndexKey(nameIndex.getResource().getName(), nameIndex.getName(), secondaryKeyString, key);
hive.directory().insertSecondaryIndexKey(numIndex.getResource().getName(), numIndex.getName(), secondaryKeyNum, key);
}
}
}