001    /**
002     * Copyright (c) 2000-2011 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.dao.orm;
016    
017    /**
018     * @author Brian Wing Shun Chan
019     */
020    public interface LockMode {
021    
022            public static final LockMode FORCE = new LockModeImpl("FORCE");
023    
024            public static final LockMode NONE = new LockModeImpl("NONE");
025    
026            public static final LockMode OPTIMISTIC = new LockModeImpl("OPTIMISTIC");
027    
028            public static final LockMode OPTIMISTIC_FORCE_INCREMENT = new LockModeImpl(
029                    "OPTIMISTIC_FORCE_INCREMENT");
030    
031            public static final LockMode PESSIMISTIC_FORCE_INCREMENT = new LockModeImpl(
032                    "PESSIMISTIC_FORCE_INCREMENT");
033    
034            public static final LockMode PESSIMISTIC_READ = new LockModeImpl(
035                    "PESSIMISTIC_READ");
036    
037            public static final LockMode PESSIMISTIC_WRITE = new LockModeImpl(
038                    "PESSIMISTIC_WRITE");
039    
040            public static final LockMode READ = new LockModeImpl("READ");
041    
042            public static final LockMode UPGRADE = new LockModeImpl("UPGRADE");
043    
044            public static final LockMode UPGRADE_NOWAIT =
045                    new LockModeImpl("UPGRADE_NOWAIT");
046    
047            public static final LockMode WRITE = new LockModeImpl("WRITE");
048    
049            public String getName();
050    
051    }