getProject().addInterfaceAccessor(interfaceAccessor);
}
interfaceAccessor.addVariableOneToOneAccessor(this);
// Now process our variable one to one mapping.
VariableOneToOneMapping mapping = new VariableOneToOneMapping();
mapping.setIsReadOnly(false);
mapping.setIsPrivateOwned(isPrivateOwned());
mapping.setIsOptional(isOptional());
mapping.setAttributeName(getAttributeName());
mapping.setReferenceClassName(getReferenceClassName());
// Process the indirection.
processIndirection(mapping);
// Set the getter and setter methods if access is PROPERTY.
setAccessorMethods(mapping);
// Process the cascade types.
processCascadeTypes(mapping);
// Process a @ReturnInsert and @ReturnUpdate (to log a warning message)
processReturnInsertAndUpdate();
// Process the discriminator column.
if (m_discriminatorColumn == null) {
mapping.setTypeField(new DiscriminatorColumnMetadata().process(getDescriptor(), getAnnotatedElementName(), MetadataLogger.VARIABLE_ONE_TO_ONE_DISCRIMINATOR_COLUMN));
} else {
mapping.setTypeField(m_discriminatorColumn.process(getDescriptor(), getAnnotatedElementName(), MetadataLogger.VARIABLE_ONE_TO_ONE_DISCRIMINATOR_COLUMN));
}
// Process the discriminator classes.
for (DiscriminatorClassMetadata discriminatorClass : m_discriminatorClasses) {
discriminatorClass.process(mapping);