?? voteitem.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 + -