/** * PUBLIC: * Indicates whether the mapping has RelationTable. */ public boolean hasRelationTable() { return this.mechanism != null && this.mechanism.hasRelationTable(); }
/** * PUBLIC: * Indicates whether the mapping has RelationTable. */ public boolean hasRelationTable() { return this.mechanism != null && this.mechanism.hasRelationTable(); }
/** * PUBLIC: * Indicates whether the mapping has RelationTable. */ public boolean hasRelationTable() { return this.mechanism != null && this.mechanism.hasRelationTable(); }
/** * INTERNAL: * Set the table qualifier on the relation table if required */ protected void initializeRelationTable(AbstractSession session, ForeignReferenceMapping mapping) throws DescriptorException { Platform platform = session.getDatasourcePlatform(); if (!hasRelationTable()) { throw DescriptorException.noRelationTable(mapping); } if (platform.getTableQualifier().length() > 0) { if (getRelationTable().getTableQualifier().length() == 0) { getRelationTable().setTableQualifier(platform.getTableQualifier()); } } } /**
if(this.mechanism.hasRelationTable()) { if(!this.foreignKeyFields.isEmpty() || !this.sourceToTargetKeyFields.isEmpty() || !this.targetToSourceKeyFields.isEmpty()) { throw DescriptorException.oneToOneMappingConflict(this.getDescriptor(), this);
/** * INTERNAL: * Set the table qualifier on the relation table if required */ protected void initializeRelationTable(AbstractSession session, ForeignReferenceMapping mapping) throws DescriptorException { Platform platform = session.getDatasourcePlatform(); // We need to look up the relation table name from the reference // descriptor if we are the non owning side of a bidirectional mapping // to a table per tenant descriptor. if (mapping.isReadOnly() && mapping.getReferenceDescriptor().hasTablePerMultitenantPolicy()) { setRelationTable(((TablePerMultitenantPolicy) mapping.getReferenceDescriptor().getMultitenantPolicy()).getTable(getRelationTable())); } if (!hasRelationTable()) { throw DescriptorException.noRelationTable(mapping); } if (platform.getTableQualifier().length() > 0) { if (getRelationTable().getTableQualifier().length() == 0) { getRelationTable().setTableQualifier(platform.getTableQualifier()); } } } /**
/** * INTERNAL: * Set the table qualifier on the relation table if required */ protected void initializeRelationTable(AbstractSession session, ForeignReferenceMapping mapping) throws DescriptorException { Platform platform = session.getDatasourcePlatform(); // We need to look up the relation table name from the reference // descriptor if we are the non owning side of a bidirectional mapping // to a table per tenant descriptor. if (mapping.isReadOnly() && mapping.getReferenceDescriptor().hasTablePerMultitenantPolicy()) { setRelationTable(((TablePerMultitenantPolicy) mapping.getReferenceDescriptor().getMultitenantPolicy()).getTable(getRelationTable())); } if (!hasRelationTable()) { throw DescriptorException.noRelationTable(mapping); } if (platform.getTableQualifier().length() > 0) { if (getRelationTable().getTableQualifier().length() == 0) { getRelationTable().setTableQualifier(platform.getTableQualifier()); } } } /**
if (this.mechanism.hasRelationTable()) { if(!this.foreignKeyFields.isEmpty() || !this.sourceToTargetKeyFields.isEmpty() || !this.targetToSourceKeyFields.isEmpty()) { throw DescriptorException.oneToOneMappingConflict(this.getDescriptor(), this);
if (this.mechanism.hasRelationTable()) { if(!this.foreignKeyFields.isEmpty() || !this.sourceToTargetKeyFields.isEmpty() || !this.targetToSourceKeyFields.isEmpty()) { throw DescriptorException.oneToOneMappingConflict(this.getDescriptor(), this);