/** * Set the given columns as the columns for <code>fm</code>. * * @param unique bitwise combination of TRUE and FALSE for the * unique attribute of each column */ protected void setColumns(FieldMapping fm, MappingInfo info, List<Column> cols, int unique) { info.setColumns(cols); if (unique == TRUE) info.setUnique(new org.apache.openjpa.jdbc.schema.Unique()); //### EJB3 Log log = getLog(); if (log.isWarnEnabled() && unique == (TRUE | FALSE)) log.warn(_loc.get("inconsist-col-attrs", fm)); }
/** * Set the given columns as the columns for <code>fm</code>. * * @param unique bitwise combination of TRUE and FALSE for the * unique attribute of each column */ protected void setColumns(FieldMapping fm, MappingInfo info, List<Column> cols, int unique) { info.setColumns(cols); if (unique == TRUE) info.setUnique(new org.apache.openjpa.jdbc.schema.Unique()); //### EJB3 Log log = getLog(); if (log.isWarnEnabled() && unique == (TRUE | FALSE)) log.warn(_loc.get("inconsist-col-attrs", fm)); }
/** * Set the given columns as the columns for <code>fm</code>. * * @param unique bitwise combination of TRUE and FALSE for the * unique attribute of each column */ protected void setColumns(FieldMapping fm, MappingInfo info, List<Column> cols, int unique) { info.setColumns(cols); if (unique == TRUE) info.setUnique(new org.apache.openjpa.jdbc.schema.Unique()); //### EJB3 Log log = getLog(); if (log.isWarnEnabled() && unique == (TRUE | FALSE)) log.warn(_loc.get("inconsist-col-attrs", fm)); }
/** * Set the given columns as the columns for <code>fm</code>. * * @param unique bitwise combination of TRUE and FALSE for the * unique attribute of each column */ protected void setColumns(FieldMapping fm, MappingInfo info, List<Column> cols, int unique) { info.setColumns(cols); if (unique == TRUE) info.setUnique(new org.apache.openjpa.jdbc.schema.Unique()); //### EJB3 Log log = getLog(); if (log.isWarnEnabled() && unique == (TRUE | FALSE)) log.warn(_loc.get("inconsist-col-attrs", fm)); }
/** * 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)); }
SqlResultSetMapping... annos) { MappingRepository repos = (MappingRepository) getRepository(); Log log = getLog(); for (SqlResultSetMapping anno : annos) { if (log.isTraceEnabled())
throw new MetaDataException(_loc.get("no-gen-name", el)); Log log = getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("parse-gen", name));
SqlResultSetMapping... annos) { MappingRepository repos = (MappingRepository) getRepository(); Log log = getLog(); for (SqlResultSetMapping anno : annos) { if (log.isTraceEnabled())
SqlResultSetMapping... annos) { MappingRepository repos = (MappingRepository) getRepository(); Log log = getLog(); for (SqlResultSetMapping anno : annos) { if (log.isTraceEnabled())
SqlResultSetMapping... annos) { MappingRepository repos = (MappingRepository) getRepository(); Log log = getLog(); for (SqlResultSetMapping anno : annos) { if (log.isTraceEnabled())
throw new MetaDataException(_loc.get("no-gen-name", el)); Log log = getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("parse-gen", name));
throw new MetaDataException(_loc.get("no-gen-name", el)); Log log = getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("parse-gen", name));
throw new MetaDataException(_loc.get("no-gen-name", el)); Log log = getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("parse-gen", name));