/** Adds a column to the list of columns mapped by this mapping field. * Call this method instead of <code>addColumn</code> when mapping join * tables. This method is used to map between the local column and the * join table, while <code>addAssociatedColumn</code> is used to * map between the join table and the foreign table. * @param column column pair element to be added to the mapping * @exception ModelException if impossible * @see MappingFieldElement#addColumn * @see #addAssociatedColumn */ public void addLocalColumn (ColumnPairElement column) throws ModelException { // can't call addColumn in this class because there will be an // exception since the associated columns will be (legally) populated super.addColumn(column); }
/** Adds a column to the list of columns mapped by this mapping field. * Call this method instead of <code>addColumn</code> when mapping join * tables. This method is used to map between the local column and the * join table, while <code>addAssociatedColumn</code> is used to * map between the join table and the foreign table. * @param column column pair element to be added to the mapping * @exception ModelException if impossible * @see MappingFieldElement#addColumn * @see #addAssociatedColumn */ public void addLocalColumn (ColumnPairElement column) throws ModelException { // can't call addColumn in this class because there will be an // exception since the associated columns will be (legally) populated super.addColumn(column); }
/** Adds a column to the list of columns mapped by this mapping * relationship. This method overrides the one in MappingFieldElement to * check that the argument is a ColumnPairElement. * @param column column element to be added to the mapping * @exception ModelException if impossible */ public void addColumn (DBMemberElement column) throws ModelException { if (column instanceof ColumnPairElement) { if (!getAssociatedColumns().isEmpty()) { throw new ModelException(I18NHelper.getMessage(getMessages(), "mapping.column.associated_columns_defined", // NOI18N NameUtil.getRelativeMemberName( column.getName().getFullName()))); } super.addColumn(column); } else { throw new ModelException(I18NHelper.getMessage(getMessages(), "mapping.column.column_invalid", // NOI18N NameUtil.getRelativeMemberName( column.getName().getFullName()))); } }
/** Adds a column to the list of columns mapped by this mapping * relationship. This method overrides the one in MappingFieldElement to * check that the argument is a ColumnPairElement. * @param column column element to be added to the mapping * @exception ModelException if impossible */ public void addColumn (DBMemberElement column) throws ModelException { if (column instanceof ColumnPairElement) { if (!getAssociatedColumns().isEmpty()) { throw new ModelException(I18NHelper.getMessage(getMessages(), "mapping.column.associated_columns_defined", // NOI18N NameUtil.getRelativeMemberName( column.getName().getFullName()))); } super.addColumn(column); } else { throw new ModelException(I18NHelper.getMessage(getMessages(), "mapping.column.column_invalid", // NOI18N NameUtil.getRelativeMemberName( column.getName().getFullName()))); } }