/** Returns the list of associated columns (ColumnPairElements) to * which this mapping field is mapped. This is used for join tables. * This method should only be used by the runtime. * @return the columns mapped by this mapping field * @see MappingFieldElement#getColumns */ public ArrayList getAssociatedColumnObjects () { if (_associatedColumnObjects == null) { _associatedColumnObjects = MappingClassElementImpl. toColumnObjects(getDeclaringClass().getDatabaseRoot(), getAssociatedColumns()); } return _associatedColumnObjects; }
/** Returns the list of associated columns (ColumnPairElements) to * which this mapping field is mapped. This is used for join tables. * This method should only be used by the runtime. * @return the columns mapped by this mapping field * @see MappingFieldElement#getColumns */ public ArrayList getAssociatedColumnObjects () { if (_associatedColumnObjects == null) { _associatedColumnObjects = MappingClassElementImpl. toColumnObjects(getDeclaringClass().getDatabaseRoot(), getAssociatedColumns()); } return _associatedColumnObjects; }
if (!getAssociatedColumns().remove(columnName))
if (!getAssociatedColumns().remove(columnName))
println(tabs+1, "associatedColumns = " + mre.getAssociatedColumns()); //NOI18N
println(tabs+1, "associatedColumns = " + mre.getAssociatedColumns()); //NOI18N
ArrayList columns = getAssociatedColumns(); String columnName = NameUtil.getRelativeMemberName( column.getName().getFullName());
ArrayList columns = getAssociatedColumns(); String columnName = 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()))); } }
/** 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()))); } }