001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.transaction;
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    }