- Common ways to obtain Mapping
private void myMethod () {Mapping m =
PersistentClass persistentClass;!persistentClass.hasIdentifierProperty()
- Smart code suggestions by Codota
}
/** * The name of the property on the associated entity to which our FK * refers * * @param factory The mappings... * * @return The appropriate property name. * * @throws MappingException Generally, if unable to resolve the associated entity name */ public final String getIdentifierOrUniqueKeyPropertyName(Mapping factory) throws MappingException { if ( isReferenceToPrimaryKey() || uniqueKeyPropertyName == null ) { return factory.getIdentifierPropertyName( getAssociatedEntityName() ); } else { return uniqueKeyPropertyName; } }
/** * The name of the property on the associated entity to which our FK * refers * * @param factory The mappings... * @return The appropriate property name. * @throws MappingException Generally, if unable to resolve the associated entity name */ public final String getIdentifierOrUniqueKeyPropertyName(Mapping factory) throws MappingException { if ( isReferenceToPrimaryKey() ) { return factory.getIdentifierPropertyName( getAssociatedEntityName() ); } else { return uniqueKeyPropertyName; } }
/** * The name of the property on the associated entity to which our FK * refers * * @param factory The mappings... * @return The appropriate property name. * @throws MappingException Generally, if unable to resolve the associated entity name */ public final String getIdentifierOrUniqueKeyPropertyName(Mapping factory) throws MappingException { if ( isReferenceToPrimaryKey() ) { return factory.getIdentifierPropertyName( getAssociatedEntityName() ); } else { return uniqueKeyPropertyName; } }
String idName; if (_mapping != null) { idName = _mapping.getIdentifierPropertyName(init.getEntityName()); } else { idName = ProxySessionReader.getIdentifierPropertyName(init);
String idName; if (_mapping != null) { idName = _mapping.getIdentifierPropertyName(init.getEntityName()); } else { idName = ProxySessionReader.getIdentifierPropertyName(init);
String idName; if (_mapping != null) { idName = _mapping.getIdentifierPropertyName(init.getEntityName()); } else { final SessionImplementor session = init.getSession();
String idName; if (_mapping != null) { idName = _mapping.getIdentifierPropertyName(init.getEntityName()); } else { final SessionImplementor session = init.getSession();