// Allocate any missing columns
for (int i = colmds.length; i < mappingSideB.getNumberOfDatastoreMappings(); i++)
{
// Find next unallocated sideB column
DatastoreIdentifier sideBidentifier = null;
for (int j=0; j < sideBidentifiers.length; j++)
{
if (!sideButilised[j])
{
sideBidentifier = sideBidentifiers[j];
sideButilised[j] = true;
break;
}
}
if (sideBidentifier == null)
{
throw new NucleusUserException(LOCALISER.msg("020005",
columnsName, "" + i)).setFatal();
}
// Create a new ColumnMetaData since user hasn't provided enough
ColumnMetaData colmd = new ColumnMetaData();
if (updateContainer)
{
columnContainer.addColumn(colmd);
}
putColumn(sideBidentifier, colmd);
}
}
else
{
columnsName = null;
for (int i = 0; i < mappingSideB.getNumberOfDatastoreMappings(); i++)
{
final DatastoreIdentifier sideBidentifier;
sideBidentifier = mappingSideB.getDatastoreMapping(i).getDatastoreField().getIdentifier();
// Create a new ColumnMetaData since user hasn't provided enough
ColumnMetaData colmd = new ColumnMetaData();
putColumn(sideBidentifier, colmd);