if ( tableGeneratorAnnotation.uniqueConstraints() != null && tableGeneratorAnnotation.uniqueConstraints().length > 0 ) { log.ignoringTableGeneratorConstraints( tableGeneratorAnnotation.name() );
if ( tableGeneratorAnnotation.uniqueConstraints() != null && tableGeneratorAnnotation.uniqueConstraints().length > 0 ) { log.ignoringTableGeneratorConstraints( tableGeneratorAnnotation.name() );
annotation.setValue( "initialValue", tableAnn.initialValue() ); annotation.setValue( "allocationSize", tableAnn.allocationSize() ); annotation.setValue( "uniqueConstraints", tableAnn.uniqueConstraints() ); return AnnotationFactory.create( annotation );
private static JPAUniqueConstraint[] extractConstraints( TableGenerator tableGenerator) { JPAUniqueConstraint[] constraints = new JPAUniqueConstraint[]{}; int i = 0; for (UniqueConstraint uniqueConstraint : tableGenerator.uniqueConstraints()) { constraints[i++] = JPAUniqueConstraint.extract(uniqueConstraint); } return constraints; }
/** * INTERNAL: */ public List<String[]> getUniqueConstraints() { if (m_uniqueConstraints == null) { m_uniqueConstraints = new ArrayList<String[]>(); for (UniqueConstraint uniqueConstraint : m_tableGenerator.uniqueConstraints()) { m_uniqueConstraints.add(uniqueConstraint.columnNames()); } } return m_uniqueConstraints; }
String.valueOf( tabGen.initialValue() + 1 ) ); if ( tabGen.uniqueConstraints() != null && tabGen.uniqueConstraints().length > 0 ) { log.warn( "Ignoring unique constraints specified on table generator [{}]", tabGen.name() ); if ( tabGen.uniqueConstraints() != null && tabGen.uniqueConstraints().length > 0 ) { log.warn( "Ignoring unique constraints specified on table generator [{}]", tabGen.name() );
annotation.setValue( "initialValue", tableAnn.initialValue() ); annotation.setValue( "allocationSize", tableAnn.allocationSize() ); annotation.setValue( "uniqueConstraints", tableAnn.uniqueConstraints() ); return AnnotationFactory.create( annotation );
/** * @param locator * the java locator * @param annotation * the annotation * * @since 2.0.0 */ public TableGeneratorMetadataImpl(AbstractLocator locator, TableGenerator annotation) { this.locator = locator; this.catalog = annotation.catalog(); this.schema = annotation.schema(); this.table = annotation.table(); this.name = annotation.name(); this.pkColumnName = annotation.pkColumnName(); this.pkColumnValue = annotation.pkColumnValue(); this.valueColumnName = annotation.valueColumnName(); this.initialValue = annotation.initialValue(); this.allocationSize = annotation.allocationSize(); for (final UniqueConstraint constraint : annotation.uniqueConstraints()) { this.uniqueConstraints.add(new UniqueConstraintMetadataImpl(locator, constraint)); } }
/** * @param locator * the java locator * @param annotation * the annotation * * @since 2.0.0 */ public TableGeneratorMetadataImpl(AbstractLocator locator, TableGenerator annotation) { this.locator = locator; this.catalog = annotation.catalog(); this.schema = annotation.schema(); this.table = annotation.table(); this.name = annotation.name(); this.pkColumnName = annotation.pkColumnName(); this.pkColumnValue = annotation.pkColumnValue(); this.valueColumnName = annotation.valueColumnName(); this.initialValue = annotation.initialValue(); this.allocationSize = annotation.allocationSize(); for (final UniqueConstraint constraint : annotation.uniqueConstraints()) { this.uniqueConstraints.add(new UniqueConstraintMetadataImpl(locator, constraint)); } }
/** * @param locator * the java locator * @param annotation * the annotation * * @since 2.0.0 */ public TableGeneratorMetadataImpl(AbstractLocator locator, TableGenerator annotation) { this.locator = locator; this.catalog = annotation.catalog(); this.schema = annotation.schema(); this.table = annotation.table(); this.name = annotation.name(); this.pkColumnName = annotation.pkColumnName(); this.pkColumnValue = annotation.pkColumnValue(); this.valueColumnName = annotation.valueColumnName(); this.initialValue = annotation.initialValue(); this.allocationSize = annotation.allocationSize(); for (final UniqueConstraint constraint : annotation.uniqueConstraints()) { this.uniqueConstraints.add(new UniqueConstraintMetadataImpl(locator, constraint)); } }
if ( tableGeneratorAnnotation.uniqueConstraints() != null && tableGeneratorAnnotation.uniqueConstraints().length > 0 ) { log.ignoringTableGeneratorConstraints( tableGeneratorAnnotation.name() );
if ( tableGeneratorAnnotation.uniqueConstraints() != null && tableGeneratorAnnotation.uniqueConstraints().length > 0 ) { log.ignoringTableGeneratorConstraints( tableGeneratorAnnotation.name() );
meta.SRC_ANNOTATIONS); switch (gen.uniqueConstraints().length) { case 0: break; // nothing to do case 1: meta.setUniqueColumnsIdentifier(DBIdentifier.toArray(gen.uniqueConstraints()[0].columnNames(), DBIdentifierType.COLUMN, delimit())); meta.setUniqueConstraintIdentifier(DBIdentifier.newConstraint(gen.uniqueConstraints()[0].name(), delimit())); break;
meta.SRC_ANNOTATIONS); switch (gen.uniqueConstraints().length) { case 0: break; // nothing to do case 1: meta.setUniqueColumnsIdentifier(DBIdentifier.toArray(gen.uniqueConstraints()[0].columnNames(), DBIdentifierType.COLUMN, delimit())); meta.setUniqueConstraintIdentifier(DBIdentifier.newConstraint(gen.uniqueConstraints()[0].name(), delimit())); break;
meta.SRC_ANNOTATIONS); switch (gen.uniqueConstraints().length) { case 0: break; // nothing to do case 1: meta.setUniqueColumnsIdentifier(DBIdentifier.toArray(gen.uniqueConstraints()[0].columnNames(), DBIdentifierType.COLUMN, delimit())); meta.setUniqueConstraintIdentifier(DBIdentifier.newConstraint(gen.uniqueConstraints()[0].name(), delimit())); break;
String.valueOf( tabGen.initialValue() + 1 ) ); if (tabGen.uniqueConstraints() != null && tabGen.uniqueConstraints().length > 0) LOG.warn(tabGen.name()); if (tabGen.uniqueConstraints() != null && tabGen.uniqueConstraints().length > 0) LOG.ignoringTableGeneratorConstraints(tabGen.name());
annotation.setValue( "initialValue", tableAnn.initialValue() ); annotation.setValue( "allocationSize", tableAnn.allocationSize() ); annotation.setValue( "uniqueConstraints", tableAnn.uniqueConstraints() ); return AnnotationFactory.create( annotation );
annotation.setValue( "initialValue", tableAnn.initialValue() ); annotation.setValue( "allocationSize", tableAnn.allocationSize() ); annotation.setValue( "uniqueConstraints", tableAnn.uniqueConstraints() ); return AnnotationFactory.create( annotation );
if (gen.uniqueConstraints().length > 0 && log.isWarnEnabled()) log.warn(_loc.get("unique-constraints", name));
annotation.setValue( "initialValue", tableAnn.initialValue() ); annotation.setValue( "allocationSize", tableAnn.allocationSize() ); annotation.setValue( "uniqueConstraints", tableAnn.uniqueConstraints() ); return AnnotationFactory.create( annotation );