String id = translator.idPath;
if (id != null) {
ClassDescriptor descriptor = context.getEntityDescriptor(id);
if (descriptor == null) {
throw new EJBQLException("Unmapped id variable: " + id);
}
String pathChunk = translator.lastPathComponent;
AttributeProperty property = (AttributeProperty) descriptor
.getProperty(pathChunk);
String atrType = property.getAttribute().getType();