Methods Summary |
---|
public java.util.List | getCascadeTypes()INTERNAL: (Overridden in XMLOneToOneAccessor)
if (m_oneToOne == null) {
return new ArrayList<String>();
} else {
return getCascadeTypes(m_oneToOne.cascade());
}
|
public java.lang.String | getFetchType()INTERNAL: (Overridden in XMLOneToOneAccessor)
return (m_oneToOne == null) ? MetadataConstants.EAGER : m_oneToOne.fetch().name();
|
protected java.lang.String | getLoggingContext()INTERNAL:
Return the logging context for this accessor.
return m_logger.ONE_TO_ONE_MAPPING_REFERENCE_CLASS;
|
public java.lang.String | getMappedBy()INTERNAL: (Overridden in XMLOneToOneAccessor)
return (m_oneToOne == null) ? "" : m_oneToOne.mappedBy();
|
public java.lang.Class | getTargetEntity()INTERNAL: (Overridden in XMLOneToOneAccessor)
return (m_oneToOne == null) ? void.class : m_oneToOne.targetEntity();
|
public boolean | isOneToOne()INTERNAL:
return true;
|
public boolean | isOptional()INTERNAL:
return (m_oneToOne == null) ? true : m_oneToOne.optional();
|
public void | process()INTERNAL:
Process a @OneToOne or one-to-one element into a TopLink OneToOne
mapping.
// Initialize our mapping now with what we found.
OneToOneMapping mapping = initOneToOneMapping();
if (getMappedBy().equals("")) {
// Owning side, look for JoinColumns or PrimaryKeyJoinColumns.
processOwningMappingKeys(mapping);
} else {
// Non-owning side, process the foreign keys from the owner.
OneToOneMapping ownerMapping = null;
if (getOwningMapping().isOneToOneMapping()){
ownerMapping = (OneToOneMapping)getOwningMapping();
} else {
// If improper mapping encountered, throw an exception.
getValidator().throwInvalidMappingEncountered(getJavaClass(), getReferenceClass());
}
mapping.setSourceToTargetKeyFields(ownerMapping.getTargetToSourceKeyFields());
mapping.setTargetToSourceKeyFields(ownerMapping.getSourceToTargetKeyFields());
}
// Add the mapping to the descriptor.
m_descriptor.addMapping(mapping);
|