⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 voteitem.java

📁 JEECMS是JavaEE版网站管理系统(Java Enterprise Edition Content Manage System)的简称。 基于java技术开发
💻 JAVA
字号:
package com.jeecms.auxiliary.entity;

import com.jeecms.auxiliary.entity.base.BaseVoteItem;
import com.jeecms.core.util.PriorityInterface;

public class VoteItem extends BaseVoteItem implements PriorityInterface {
	private static final long serialVersionUID = 1L;

	/**
	 * 获得投票项的百分比
	 * 
	 * @return
	 */
	public int getPercent() {
		Long total = getTopic().getTotalCount();
		if (total == 0) {
			return 0;
		} else {
			return (int) (getVoteCount() * 100 / total);
		}
	}

	/* [CONSTRUCTOR MARKER BEGIN] */
	public VoteItem() {
		super();
	}

	/**
	 * Constructor for primary key
	 */
	public VoteItem(java.lang.Long id) {
		super(id);
	}

	/**
	 * Constructor for required fields
	 */
	public VoteItem(java.lang.Long id,
			com.jeecms.auxiliary.entity.VoteTopic topic,
			java.lang.Integer priority) {

		super(id, topic, priority);
	}

	/* [CONSTRUCTOR MARKER END] */

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -