package org.minimalj.transaction;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.PACKAGE})
public @interface Isolation {

	Level value();

	public static enum Level {
		NONE(0), READ_UNCOMMITTED(1), READ_COMMITTED(2), REPEATABLE_READ(4), SERIALIZABLE(8);
		
		private final int level;
		
		private Level(int level) {
			this.level = level;
		}
		
		public int getLevel() {
			return level;
		}
	}

}

@@ -188,16 +188,44 @@
 .Target;
+%0Aimport java.sql.Connection;
 %0A%0A@Reten
@@ -390,86 +390,259 @@
 ONE(
-0), READ_UNCOMMITTED(1), READ_COMMITTED(2), REPEATABLE_READ(4), SERIALIZABLE(8
+Connection.TRANSACTION_NONE), READ_UNCOMMITTED(Connection.TRANSACTION_READ_UNCOMMITTED),%0A%09%09READ_COMMITTED(Connection.TRANSACTION_READ_COMMITTED), REPEATABLE_READ(Connection.TRANSACTION_REPEATABLE_READ), SERIALIZABLE(Connection.TRANSACTION_SERIALIZABLE
 );%0A%09

use JDK constants