public void validateKeysWithRootClassDescription(EOClassDescription classDescription) {
StringTokenizer keyPathTokenizer = new StringTokenizer(_keyPath, ".");
while (keyPathTokenizer.hasMoreElements()) {
String key = keyPathTokenizer.nextToken();
if (keyPathTokenizer.hasMoreElements()) {
EOClassDescription sourceClassDescription = classDescription;
classDescription = sourceClassDescription.classDescriptionForDestinationKey(key);
if (classDescription == null) {
throw new IllegalStateException("Invalid key '" + key + "' for entity '" + sourceClassDescription.entityName() + "'.");
}
}
else {
if (!classDescription.attributeKeys().containsObject(key)) {
throw new IllegalStateException("Invalid key '" + key + "' for entity '" + classDescription.entityName() + "'.");