All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opencms.db.oracle.query.properties Maven / Gradle / Ivy

Go to download

OpenCms is an enterprise-ready, easy to use website content management system based on Java and XML technology. Offering a complete set of features, OpenCms helps content managers worldwide to create and maintain beautiful websites fast and efficiently.

There is a newer version: 18.0
Show newest version
#
# The pattern _${PROJECT}_ in table names is replaced by the SqlManager with 
# "_ONLINE_" or "_OFFLINE_" to choose the right database tables for
# SQL queries that are project dependent!
#

C_COMMIT=commit
C_ROLLBACK=rollback

#
# statements for CMS_CONTENTS
#

#
# Create a new empty file content record
#
C_ORACLE_OFFLINE_CONTENTS_WRITE=\
INSERT INTO CMS_OFFLINE_CONTENTS \
	(RESOURCE_ID,\
	FILE_CONTENT) \
VALUES \
	(?,empty_blob())

C_ORACLE_ONLINE_CONTENTS_WRITE=\
INSERT INTO CMS_CONTENTS (\
	RESOURCE_ID,\
	FILE_CONTENT,\
	PUBLISH_TAG_FROM,\
	PUBLISH_TAG_TO,\
	ONLINE_FLAG) \
VALUES \
	(?,empty_blob(),?,?,?)

#
# Selects the blob FILE_CONTENT for update.
# If record is already locked, statement will wait for 10 seconds
#
C_ORACLE_OFFLINE_CONTENTS_UPDATECONTENT=\
SELECT \
	FILE_CONTENT \
FROM \
	CMS_OFFLINE_CONTENTS \
WHERE \
	RESOURCE_ID=? \
FOR UPDATE WAIT 10

C_ORACLE_ONLINE_CONTENTS_UPDATECONTENT=\
SELECT \
	FILE_CONTENT \
FROM \
	CMS_CONTENTS \
WHERE \
	RESOURCE_ID=? \
	AND PUBLISH_TAG_FROM = ? \
	AND PUBLISH_TAG_TO = ? \
FOR UPDATE WAIT 10


#
# Statements for CMS_USERS
#

#
# Write data for already existing user.
# USER_INFO is not written, must be updated with C_ORACLE_USERS_UPDATEINFO
#
C_ORACLE_USERDATA_WRITE_3=\
INSERT INTO	CMS_USERDATA \
	(USER_ID, DATA_KEY, DATA_VALUE, DATA_TYPE) \
VALUES \
    (?, ?, empty_blob(), ?)


#
# Statements for CMS_USERS
#

#
# Updates data for already existing user.
# USER_INFO is not written, must be updated with C_ORACLE_USERS_UPDATEINFO
#
C_ORACLE_USERDATA_UPDATE_3=\
UPDATE \
	CMS_USERDATA \
SET \
	DATA_TYPE=? \
WHERE \
	USER_ID =? \
	AND DATA_KEY =?



#
# Selects the blob USER_INFO for update.
# If record is already locked, statement will wait for 10 seconds
#
C_ORACLE_USERDATA_UPDATE_2=\
SELECT \
	DATA_VALUE \
FROM \
	CMS_USERDATA \
WHERE \
	USER_ID=? AND \
	DATA_KEY=? \
FOR UPDATE WAIT 10

	
                           
# statements for history projects
C_ORACLE_PROJECTS_READLAST_HISTORY=\
SELECT \
	* \
FROM \
	(SELECT \
		PUBLISH_TAG,\
		PROJECT_ID,\
		PROJECT_NAME,\
		PROJECT_PUBLISHDATE,\
		PROJECT_PUBLISHED_BY,\
		PROJECT_DESCRIPTION,\
		USER_ID,\
		GROUP_ID,\
		MANAGERGROUP_ID,\
		DATE_CREATED,\
		PROJECT_TYPE,\
		PROJECT_OU \
	FROM \
		CMS_HISTORY_PROJECTS \
	ORDER BY \
		PUBLISH_TAG DESC) \
WHERE \
	ROWNUM<=?

# statements for publish jobs
C_ORACLE_PUBLISHJOB_CREATE=\
INSERT INTO CMS_PUBLISH_JOBS \
	(HISTORY_ID,\
	PROJECT_ID,\
	PROJECT_NAME,\
	USER_ID,\
	PUBLISH_LOCALE,\
	PUBLISH_FLAGS,\
	RESOURCE_COUNT,\
	ENQUEUE_TIME,\
	START_TIME,\
	FINISH_TIME, \
	PUBLISH_LIST, \
	PUBLISH_REPORT) \
VALUES \
	(?,?,?,?,?,?,?,?,?,?,empty_blob(),empty_blob())
	
C_ORACLE_PUBLISHJOB_UPDATE_PUBLISHLIST=\
SELECT \
	PUBLISH_LIST \
FROM \
	CMS_PUBLISH_JOBS \
WHERE \
	HISTORY_ID=? \
FOR UPDATE WAIT 10


C_ORACLE_PUBLISHJOB_UPDATE_PUBLISHREPORT=\
SELECT \
	PUBLISH_REPORT \
FROM \
	CMS_PUBLISH_JOBS \
WHERE \
	HISTORY_ID=? \
FOR UPDATE WAIT 10

C_ORACLE_VISITED_USER_DELETE_3=\
DELETE \
FROM CMS_SUBSCRIPTION_VISIT \
WHERE \
	CMS_SUBSCRIPTION_VISIT.USER_ID=? \
	AND CMS_SUBSCRIPTION_VISIT.VISIT_DATE IN ( \
		SELECT * FROM ( \
			SELECT CMS_SUBSCRIPTION_VISIT.VISIT_DATE FROM CMS_SUBSCRIPTION_VISIT WHERE CMS_SUBSCRIPTION_VISIT.USER_ID=? ORDER BY CMS_SUBSCRIPTION_VISIT.VISIT_DATE ASC \
		) \
	WHERE ROWNUM <= ?)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy