/**
* Returns the identifier type of a mapped class
*/
public Type getIdentifierType(String persistentClass) throws MappingException {
PersistentClass pc = cfg.getClassMapping( persistentClass );
if (pc==null) throw new MappingException("persistent class not known: " + persistentClass);
return pc.getIdentifier().getType();
}
public String getIdentifierPropertyName(String persistentClass) throws MappingException {
final PersistentClass pc = cfg.getClassMapping( persistentClass );
if (pc==null) throw new MappingException("persistent class not known: " + persistentClass);
if ( !pc.hasIdentifierProperty() ) return null;
return pc.getIdentifierProperty().getName();
}
public Type getReferencedPropertyType(String persistentClass, String propertyName) throws MappingException
{
final PersistentClass pc = cfg.getClassMapping( persistentClass );
if (pc==null) throw new MappingException("persistent class not known: " + persistentClass);
Property prop = pc.getProperty(propertyName);
if (prop==null) throw new MappingException("property not known: " + persistentClass + '.' + propertyName);
return prop.getType();
}
public IdentifierGeneratorFactory getIdentifierGeneratorFactory() {
return null;