private void ProcessUniqueIds(IEntity entity) { ICodeWriterPlSql sql = Model.Lamp.CodeWritersFactory.CreateCodeWriterPlSql(); foreach (IUniqueId uid in entity.Constraints.UniqueIds) { sql.ClearAll(); if (!useUniqueIndexes) { sql.WriteCreateUniqueConstraint(uid, environment); creator.WriteFrom(sql); creator.WriteSeparator(); WriteExecImmediatWhenNotExists( "ALL_CONSTRAINTS", String.Format("OWNER='{0}' AND TABLE_NAME='{1}' AND CONSTRAINT_TYPE='U' AND CONSTRAINT_NAME='{2}'", entity.Persistence.Schema, entity.Persistence.Name, uid.Persistence.Name), sql); uid.Index.Processed = true; genie.Config.NotifyAssistants("Create", uid, sql.ToString(true)); updater.WriteLine(); } } }