org.opencms.db.jpa.persistence.CmsDAOResourceLocks Maven / Gradle / Ivy
Show all versions of opencms-test Show documentation
/*
* This library is part of OpenCms -
* the Open Source Content Management System
*
* Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* For further information about Alkacon Software, please see the
* company website: http://www.alkacon.com
*
* For further information about OpenCms, please see the
* project website: http://www.opencms.org
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.opencms.db.jpa.persistence;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
/**
* This data access object represents a resource lock entry inside the table "cms_resource_locks".
*
* @since 8.0.0
*/
@Entity
@Table(name = "CMS_RESOURCE_LOCKS")
public class CmsDAOResourceLocks {
/** The lock type. */
@Basic
@Column(name = "LOCK_TYPE")
private int m_lockType;
/** The project id. */
@Basic
@Column(name = "PROJECT_ID", nullable = false, length = 36)
private String m_projectId;
/** The resource path. */
@Id
@Column(name = "RESOURCE_PATH", length = 1024)
private String m_resourcePath;
/** The user id. */
@Basic
@Column(name = "USER_ID", nullable = false, length = 36)
private String m_userId;
/**
* The default constructor.
*/
public CmsDAOResourceLocks() {
// noop
}
/**
* A public constructor for generating a new resource lock object with an unique id.
*
* @param resourcePath the resource path
*/
public CmsDAOResourceLocks(String resourcePath) {
m_resourcePath = resourcePath;
}
/**
* Returns the lockType.
*
* @return the lockType
*/
public int getLockType() {
return m_lockType;
}
/**
* Returns the projectId.
*
* @return the projectId
*/
public String getProjectId() {
return m_projectId;
}
/**
* Returns the resourcePath.
*
* @return the resourcePath
*/
public String getResourcePath() {
return m_resourcePath;
}
/**
* Returns the userId.
*
* @return the userId
*/
public String getUserId() {
return m_userId;
}
/**
* Sets the lockType.
*
* @param lockType the lockType to set
*/
public void setLockType(int lockType) {
m_lockType = lockType;
}
/**
* Sets the projectId.
*
* @param projectId the projectId to set
*/
public void setProjectId(String projectId) {
m_projectId = projectId;
}
/**
* Sets the resourcePath.
*
* @param resourcePath the resourcePath to set
*/
public void setResourcePath(String resourcePath) {
m_resourcePath = resourcePath;
}
/**
* Sets the userId.
*
* @param userId the userId to set
*/
public void setUserId(String userId) {
m_userId = userId;
}
}