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

com.clickntap.stripecubeui.webapp.bo.MediaFile.xml Maven / Gradle / Ivy

Go to download

Css / Javascript Merger and Minimizer integrated with Stripecube Web App Development

The newest version!
<bean cache="mediaFile">
	<validation>
		<group name="create,update">
		</group>
	</validation>
	<read name="id">
		select
		id,
		folder_id as "folderId",
		title,
		description,
		file_name as "fileName",
		content_type as "contentType",
		xml_content as
		"docAsString",
		vimeo,
		video_url
		as "videoUrl",
		video_height as
		"videoHeight",
		picture_url as
		"pictureUrl",
		show_in_gallery as
		"showInGallery",
		workflow,
		creation_date as "creationDate",
		last_modified as "lastModified"
		from
		[DB_PREFIX]_mediafile where id = ${this.id}
	</read>
	<read-list name="next-video">
	<![CDATA[
		select id from [DB_PREFIX]_mediafile where workflow < 3 and content_type like 'video%' and (video_url is null or video_url not like '%hd%') and last_modified > (NOW() - INTERVAL 4 HOUR)
	]]>
	</read-list>
	<read-list name="next-image">
	<![CDATA[
		select id from [DB_PREFIX]_mediafile where workflow < 3 and content_type like 'image%' and last_modified > (NOW() - INTERVAL 4 HOUR)
	]]>
	</read-list>
	<read-list name="all">
	<![CDATA[
		select id from [DB_PREFIX]_mediafile
	]]>
	</read-list>
	<create>
		insert into [DB_PREFIX]_mediafile (
		folder_id,
		file_name,
		content_type,
		vimeo,
		video_url,
		picture_url,
		show_in_gallery,
		workflow,
		operator_id,
		creation_date,
		last_modified
		) values (
		${this.folderId},
		${this.fileName},
		${this.contentType},
		${this.vimeo},
		${this.videoUrl},
		${this.pictureUrl},
		0,
		${this.workflow},
		${this.operatorId},
		${this.now()},
		${this.now()}
		)
	</create>
	<update>
		update [DB_PREFIX]_mediafile set
		title = ${this.title},
		file_name =
		${this.fileName},
		description = ${this.description},
		vimeo =
		${this.vimeo},
		show_in_gallery = ${this.showInGallery},
		workflow =
		${this.workflow},
		video_height = ${this.videoHeight},
		video_url =
		${this.videoUrl},
		picture_url = ${this.pictureUrl},
		last_modified =
		${this.now()}
		where id = ${this.id}
	</update>
	<execute name="touch">
		update [DB_PREFIX]_mediafile set
		last_modified =
		${this.now()}
		where id = ${this.id}
	</execute>
	<execute name="move">
		update [DB_PREFIX]_mediafile set
		folder_id =
		${this.folderId},
		last_modified = ${this.now()}
		where id = ${this.id}
	</execute>
	<execute name="xml-update">
		update [DB_PREFIX]_mediafile set
		xml_content =
		${this.docAsString},
		last_modified = ${this.now()}
		where id = ${this.id}
	</execute>
	<execute name="xml-remove">
		update [DB_PREFIX]_mediafile set
		xml_content = null,
		last_modified = ${this.now()}
		where id = ${this.id}
	</execute>
	<delete>
		delete from [DB_PREFIX]_mediafile where id = ${this.id}
	</delete>
	<curr-val>select LAST_INSERT_ID() as id</curr-val>
</bean>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy