/** * Return the join from the field table to the owning class table. */ public ForeignKey getJoin(final FieldMapping field, Table table, boolean adapt) { // if we have no join columns defined, check class-level join // if the given field is embedded then consider primary table of owner return getJoin(field, table, adapt, getColumns()); }
join = _info.getJoin(this, table, adapt); if (join == null && joinRequired) throw new MetaDataException(_loc.get("join-required", this));
/** * Map this field to its table, optionally requiring that it be * in another table. Utility method for use by mapping strategies. */ public void mapJoin(boolean adapt, boolean joinRequired) { Table table = _info.getTable(this, joinRequired, adapt); if(table != null && table.equals(getDefiningMapping().getTable())) { // Don't create a join if the field's table is the same as the // class's table. table = null; } ForeignKey join = null; if (table != null) join = _info.getJoin(this, table, adapt); if (join == null && joinRequired) throw new MetaDataException(_loc.get("join-required", this)); if (join == null) { _info.assertNoJoin(this, true); _info.assertNoForeignKey(this, !adapt); _info.assertNoUnique(this, !adapt); _info.assertNoIndex(this, !adapt); } else { _fk = join; _io = _info.getColumnIO(); _outer = _info.isJoinOuter(); _unq = _info.getJoinUnique(this, false, adapt); _idx = _info.getJoinIndex(this, adapt); } }
join = _info.getJoin(this, table, adapt); if (join == null && joinRequired) throw new MetaDataException(_loc.get("join-required", this));
/** * Return the join from the field table to the owning class table. */ public ForeignKey getJoin(final FieldMapping field, Table table, boolean adapt) { // if we have no join columns defined, check class-level join // if the given field is embedded then consider primary table of owner return getJoin(field, table, adapt, getColumns()); }
join = _info.getJoin(this, table, adapt); if (join == null && joinRequired) throw new MetaDataException(_loc.get("join-required", this));
/** * Return the join from the field table to the owning class table. */ public ForeignKey getJoin(final FieldMapping field, Table table, boolean adapt) { // if we have no join columns defined, check class-level join // if the given field is embedded then consider primary table of owner return getJoin(field, table, adapt, getColumns()); }
join = _info.getJoin(this, table, adapt); if (join == null && joinRequired) throw new MetaDataException(_loc.get("join-required", this));
/** * Return the join from the field table to the owning class table. */ public ForeignKey getJoin(final FieldMapping field, Table table, boolean adapt) { // if we have no join columns defined, check class-level join // if the given field is embedded then consider primary table of owner return getJoin(field, table, adapt, getColumns()); }
public ForeignKey getJoinForeignKey (final FieldMapping field, Table table, boolean adapt) { if (field.isUni1ToMFK()) { List<Column> cols = field.getElementMapping().getValueInfo().getColumns(); return getJoin(field, table, adapt, cols); } return null; }
public ForeignKey getJoinForeignKey (final FieldMapping field, Table table, boolean adapt) { if (field.isUni1ToMFK()) { List<Column> cols = field.getElementMapping().getValueInfo().getColumns(); return getJoin(field, table, adapt, cols); } return null; }
public ForeignKey getJoinForeignKey (final FieldMapping field, Table table, boolean adapt) { if (field.isUni1ToMFK()) { List<Column> cols = field.getElementMapping().getValueInfo().getColumns(); return getJoin(field, table, adapt, cols); } return null; }
public ForeignKey getJoinForeignKey (final FieldMapping field, Table table, boolean adapt) { if (field.isUni1ToMFK()) { List<Column> cols = field.getElementMapping().getValueInfo().getColumns(); return getJoin(field, table, adapt, cols); } return null; }