public void addSecondaryTable(DBIdentifier second) { setSecondaryTableJoinColumns(second, null); }
public void addSecondaryTable(DBIdentifier second) { setSecondaryTableJoinColumns(second, null); }
public void addSecondaryTable(DBIdentifier second) { setSecondaryTableJoinColumns(second, null); }
public void addSecondaryTable(DBIdentifier second) { setSecondaryTableJoinColumns(second, null); }
/** * Adds a Secondary table of given name to this mapping. A secondary table * must be known before unique constraints are added to a Secondary table. * @deprecated */ public void addSecondaryTable(String second) { setSecondaryTableJoinColumns(DBIdentifier.newTable(second), null); }
/** * Declare the given class-level join to the named (secondary) table. * @deprecated */ public void setSecondaryTableJoinColumns(String tableName, List<Column> cols) { if (cols == null) cols = Collections.emptyList(); setSecondaryTableJoinColumns(DBIdentifier.newTable(tableName), cols); }
/** * Adds a Secondary table of given name to this mapping. A secondary table * must be known before unique constraints are added to a Secondary table. * @deprecated */ public void addSecondaryTable(String second) { setSecondaryTableJoinColumns(DBIdentifier.newTable(second), null); }
/** * Adds a Secondary table of given name to this mapping. A secondary table * must be known before unique constraints are added to a Secondary table. * @deprecated */ public void addSecondaryTable(String second) { setSecondaryTableJoinColumns(DBIdentifier.newTable(second), null); }
/** * Adds a Secondary table of given name to this mapping. A secondary table * must be known before unique constraints are added to a Secondary table. * @deprecated */ public void addSecondaryTable(String second) { setSecondaryTableJoinColumns(DBIdentifier.newTable(second), null); }
/** * Declare the given class-level join to the named (secondary) table. * @deprecated */ public void setSecondaryTableJoinColumns(String tableName, List<Column> cols) { if (cols == null) cols = Collections.emptyList(); setSecondaryTableJoinColumns(DBIdentifier.newTable(tableName), cols); }
/** * Declare the given class-level join to the named (secondary) table. * @deprecated */ public void setSecondaryTableJoinColumns(String tableName, List<Column> cols) { if (cols == null) cols = Collections.emptyList(); setSecondaryTableJoinColumns(DBIdentifier.newTable(tableName), cols); }
/** * Declare the given class-level join to the named (secondary) table. * @deprecated */ public void setSecondaryTableJoinColumns(String tableName, List<Column> cols) { if (cols == null) cols = Collections.emptyList(); setSecondaryTableJoinColumns(DBIdentifier.newTable(tableName), cols); }
/** * Set the secondary table information back to the owning class mapping. */ private void endSecondaryTable() { ClassMapping cm = (ClassMapping) currentElement(); ClassMappingInfo info = cm.getMappingInfo(); info.setSecondaryTableJoinColumns(_secondaryTable, _joinCols); clearSecondaryTableInfo(); }
/** * Set the secondary table information back to the owning class mapping. */ private void endSecondaryTable() { ClassMapping cm = (ClassMapping) currentElement(); ClassMappingInfo info = cm.getMappingInfo(); info.setSecondaryTableJoinColumns(DBIdentifier.newTable(_secondaryTable, delimit()), _joinCols); clearSecondaryTableInfo(); }
/** * Set the secondary table information back to the owning class mapping. */ private void endSecondaryTable() { ClassMapping cm = (ClassMapping) currentElement(); ClassMappingInfo info = cm.getMappingInfo(); info.setSecondaryTableJoinColumns(DBIdentifier.newTable(_secondaryTable, delimit()), _joinCols); clearSecondaryTableInfo(); }
/** * Set the secondary table information back to the owning class mapping. */ private void endSecondaryTable() { ClassMapping cm = (ClassMapping) currentElement(); ClassMappingInfo info = cm.getMappingInfo(); info.setSecondaryTableJoinColumns(DBIdentifier.newTable(_secondaryTable, delimit()), _joinCols); clearSecondaryTableInfo(); }
/** * Parse @SecondaryTable(s). */ private void parseSecondaryTables(ClassMapping cm, SecondaryTable... tables) { ClassMappingInfo info = cm.getMappingInfo(); Log log = getLog(); String name; List<Column> joins; boolean warnUnique = false; for (SecondaryTable table : tables) { name = table.name(); if (StringUtils.isEmpty(name)) throw new MetaDataException(_loc.get("second-name", cm)); if (!StringUtils.isEmpty(table.schema())) name = table.schema() + "." + name; if (table.pkJoinColumns().length > 0) { joins = new ArrayList<Column>(table.pkJoinColumns().length); for (PrimaryKeyJoinColumn join : table.pkJoinColumns()) joins.add(newColumn(join)); info.setSecondaryTableJoinColumns(name, joins); } warnUnique |= table.uniqueConstraints().length > 0; } //### EJB3 if (warnUnique && log.isWarnEnabled()) log.warn(_loc.get("unique-constraints", cm)); }
/** * Parse @SecondaryTable(s). */ private void parseSecondaryTables(ClassMapping cm, SecondaryTable... tables) { ClassMappingInfo info = cm.getMappingInfo(); List<Column> joins = null; for (SecondaryTable table : tables) { DBIdentifier sName = DBIdentifier.newTable(table.name(), delimit()); if (DBIdentifier.isEmpty(sName)) throw new MetaDataException(_loc.get("second-name", cm)); if (!StringUtils.isEmpty(table.schema())) { DBIdentifier sSchema = DBIdentifier.newSchema(table.schema(), delimit()); sName = QualifiedDBIdentifier.newPath(sSchema, sName); } if (table.pkJoinColumns().length > 0) { joins = new ArrayList<Column>(table.pkJoinColumns().length); for (PrimaryKeyJoinColumn join : table.pkJoinColumns()) joins.add(newColumn(join)); info.setSecondaryTableJoinColumns(sName, joins); } else { info.addSecondaryTable(sName); } addUniqueConstraints(sName.getName(), cm, info, table.uniqueConstraints()); } }
/** * Parse @SecondaryTable(s). */ private void parseSecondaryTables(ClassMapping cm, SecondaryTable... tables) { ClassMappingInfo info = cm.getMappingInfo(); List<Column> joins = null; for (SecondaryTable table : tables) { DBIdentifier sName = DBIdentifier.newTable(table.name(), delimit()); if (DBIdentifier.isEmpty(sName)) throw new MetaDataException(_loc.get("second-name", cm)); if (!StringUtil.isEmpty(table.schema())) { DBIdentifier sSchema = DBIdentifier.newSchema(table.schema(), delimit()); sName = QualifiedDBIdentifier.newPath(sSchema, sName); } if (table.pkJoinColumns().length > 0) { joins = new ArrayList<Column>(table.pkJoinColumns().length); for (PrimaryKeyJoinColumn join : table.pkJoinColumns()) joins.add(newColumn(join)); info.setSecondaryTableJoinColumns(sName, joins); } else { info.addSecondaryTable(sName); } addUniqueConstraints(sName.getName(), cm, info, table.uniqueConstraints()); } }
/** * Parse @SecondaryTable(s). */ private void parseSecondaryTables(ClassMapping cm, SecondaryTable... tables) { ClassMappingInfo info = cm.getMappingInfo(); List<Column> joins = null; for (SecondaryTable table : tables) { DBIdentifier sName = DBIdentifier.newTable(table.name(), delimit()); if (DBIdentifier.isEmpty(sName)) throw new MetaDataException(_loc.get("second-name", cm)); if (!StringUtil.isEmpty(table.schema())) { DBIdentifier sSchema = DBIdentifier.newSchema(table.schema(), delimit()); sName = QualifiedDBIdentifier.newPath(sSchema, sName); } if (table.pkJoinColumns().length > 0) { joins = new ArrayList<Column>(table.pkJoinColumns().length); for (PrimaryKeyJoinColumn join : table.pkJoinColumns()) joins.add(newColumn(join)); info.setSecondaryTableJoinColumns(sName, joins); } else { info.addSecondaryTable(sName); } addUniqueConstraints(sName.getName(), cm, info, table.uniqueConstraints()); } }