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

📄 comment.java

📁 用最近的dojo1.2.1制作前端的ajax购书网站
💻 JAVA
字号:
package comment;
import java.util.*;
import java.sql.*;
/**
 * @author Administrator
 *
 * To change this generated comment edit the template variable "typecomment":
 * Window>Preferences>Java>Templates.
 * To enable and disable the creation of type comments go to
 * Window>Preferences>Java>Code Generation.
 */
public class comment {
	ArrayList comments=new ArrayList();
	
	commentData cd=new commentData();
	operateComment oc=new operateComment();
	String bookid;
	String ip;
	String datetime;
	String instanttime;
	String context;int i=0;
	
	public boolean  sendComment(String id,String ip,String datetime,String context)
	{
		
	return	oc.insertData(id,ip,datetime,context);
	
	
	
	}
	
	public ArrayList readComment(String id,int t)
	{
		ResultSet rs=oc.getRS(t,id);
	
	 
	try{
		
	while(rs.previous())
	{
		i++;
		comment cm=new comment();
		//System.out.print(44444);
		cm.setBookid(rs.getString(commentData.propety[0]));
		cm.setIp(rs.getString(commentData.propety[1]));
		cm.setDatetime(rs.getString(commentData.propety[2]));
		cm.setInstanttime(rs.getString(commentData.propety[3]));
		 
		comments.add(cm);
		
			
	}
	rs.close();
	}
	
	 
       catch(SQLException e){} 
       
//       System.out.println(i);
       return comments;
	
}
public int getSize(String id)
{return oc.CalSize(id);
}
	/**
	 * Returns the bookid.
	 * @return String
	 */
	public String getBookid() {
		return bookid;
	}

	/**
	 * Returns the context.
	 * @return String
	 */
	public String getContext() {
		return context;
	}

	/**
	 * Returns the datetime.
	 * @return String
	 */
	public String getDatetime() {
		return datetime;
	}

	/**
	 * Returns the instanttime.
	 * @return String
	 */
	public String getInstanttime() {
		return instanttime;
	}

	/**
	 * Returns the ip.
	 * @return String
	 */
	public String getIp() {
		return ip;
	}

	/**
	 * Sets the bookid.
	 * @param bookid The bookid to set
	 */
	public void setBookid(String bookid) {
		this.bookid = bookid;
	}

	/**
	 * Sets the context.
	 * @param context The context to set
	 */
	public void setContext(String context) {
		this.context = context;
	}

	/**
	 * Sets the datetime.
	 * @param datetime The datetime to set
	 */
	public void setDatetime(String datetime) {
		this.datetime = datetime;
	}

	/**
	 * Sets the instanttime.
	 * @param instanttime The instanttime to set
	 */
	public void setInstanttime(String instanttime) {
		this.instanttime = instanttime;
	}

	/**
	 * Sets the ip.
	 * @param ip The ip to set
	 */
	public void setIp(String ip) {
		this.ip = ip;
	}
}

⌨️ 快捷键说明

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