001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.kernel.annotation;
016    
017    import java.sql.Connection;
018    
019    /**
020     * @author Michael Young
021     */
022    public interface TransactionDefinition {
023    
024            public static final int ISOLATION_COUNTER = -3;
025    
026            public static final int ISOLATION_DEFAULT = -1;
027    
028            public static final int ISOLATION_PORTAL = -2;
029    
030            public static final int ISOLATION_READ_COMMITTED =
031                    Connection.TRANSACTION_READ_COMMITTED;
032    
033            public static final int ISOLATION_READ_UNCOMMITTED =
034                    Connection.TRANSACTION_READ_UNCOMMITTED;
035    
036            public static final int ISOLATION_REPEATABLE_READ =
037                    Connection.TRANSACTION_REPEATABLE_READ;
038    
039            public static final int ISOLATION_SERIALIZABLE =
040                    Connection.TRANSACTION_SERIALIZABLE;
041    
042            public static final int PROPAGATION_MANDATORY = 2;
043    
044            public static final int PROPAGATION_NESTED = 6;
045    
046            public static final int PROPAGATION_NEVER = 5;
047    
048            public static final int PROPAGATION_NOT_SUPPORTED = 4;
049    
050            public static final int PROPAGATION_REQUIRED = 0;
051    
052            public static final int PROPAGATION_REQUIRES_NEW = 3;
053    
054            public static final int PROPAGATION_SUPPORTS = 1;
055    
056            public static final int TIMEOUT_DEFAULT = -1;
057    
058    }