HHH-6825 - Formatting and Javadoc change

This commit is contained in:
Lukasz Antoniak 2012-01-10 20:34:39 +01:00
parent c703d134f2
commit fbfc133af8
3 changed files with 7 additions and 3 deletions

View File

@ -11,7 +11,7 @@ import java.io.Serializable;
import java.util.Map;
/**
* Template class for property mappers that represent one-to-one relation.
* Template class for property mappers that manage one-to-one relation.
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
*/
public abstract class AbstractOneToOneMapper extends AbstractToOneMapper {
@ -24,6 +24,7 @@ public abstract class AbstractOneToOneMapper extends AbstractToOneMapper {
this.referencedEntityName = referencedEntityName;
}
@Override
public void nullSafeMapToEntityFromMap(AuditConfiguration verCfg, Object obj, Map data, Object primaryKey,
AuditReaderImplementor versionsReader, Number revision) {
RelationDescriptor relation = getRelationDescriptor(verCfg, referencedEntityName);

View File

@ -16,7 +16,7 @@ import java.util.List;
import java.util.Map;
/**
* Base class for property mappers that represent to-one relation.
* Base class for property mappers that manage to-one relation.
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
*/
public abstract class AbstractToOneMapper implements PropertyMapper {
@ -26,10 +26,12 @@ public abstract class AbstractToOneMapper implements PropertyMapper {
this.propertyData = propertyData;
}
@Override
public boolean mapToMapFromEntity(SessionImplementor session, Map<String, Object> data, Object newObj, Object oldObj) {
return false;
}
@Override
public void mapToEntityFromMap(AuditConfiguration verCfg, Object obj, Map data, Object primaryKey,
AuditReaderImplementor versionsReader, Number revision) {
if (obj != null) {
@ -37,6 +39,7 @@ public abstract class AbstractToOneMapper implements PropertyMapper {
}
}
@Override
public List<PersistentCollectionChangeData> mapCollectionChanges(String referencingPropertyName,
PersistentCollection newColl,
Serializable oldColl, Serializable id) {

View File

@ -41,7 +41,7 @@ public class OneToOnePrimaryKeyJoinColumnMapper extends AbstractOneToOneMapper {
* of an entity.
*/
private Object createNotAuditedEntityReference(AuditReaderImplementor versionsReader, Class<?> entityClass,
String entityName, Serializable primaryKey) {
String entityName, Serializable primaryKey) {
EntityPersister entityPersister = versionsReader.getSessionImplementor().getFactory().getEntityPersister(entityName);
if (entityPersister.hasProxy()) {
// If possible create a proxy. Returning complete object may affect performance.