eventbean.java
来自「开源项目CRM之OpenCustomer」· Java 代码 · 共 114 行
JAVA
114 行
/*******************************************************************************
* ***** BEGIN LICENSE BLOCK Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
*
* The Original Code is the OpenCustomer CRM.
*
* The Initial Developer of the Original Code is Thomas Bader (Bader & Jene
* Software-Ingenieurb黵o). Portions created by the Initial Developer are
* Copyright (C) 2005 the Initial Developer. All Rights Reserved.
*
* Contributor(s): Thomas Bader <thomas.bader@bader-jene.de>
*
* ***** END LICENSE BLOCK *****
*/
package org.opencustomer.application.web.module.calendar.view;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.opencustomer.application.db.vo.calendar.EventVO;
public class EventBean
{
private Date startDate;
private Date endDate;
private EventVO event;
private Integer recurrenceNumber;
public EventBean()
{
}
public EventBean(Date startDate, int duration, int recurrenceNumber, EventVO event)
{
this.event = event;
this.recurrenceNumber = recurrenceNumber;
this.startDate = startDate;
Calendar cal = GregorianCalendar.getInstance();
cal.setTime(startDate);
cal.add(Calendar.MILLISECOND, duration);
this.endDate = cal.getTime();
}
public Date getEndDate()
{
return endDate;
}
public void setEndDate(Date endDate)
{
this.endDate = endDate;
}
public Date getStartDate()
{
return startDate;
}
public void setStartDate(Date startDate)
{
this.startDate = startDate;
}
public EventVO getEvent()
{
return event;
}
public void setEvent(EventVO event)
{
this.event = event;
}
public Integer getRecurrenceNumber()
{
return recurrenceNumber;
}
public void setRecurrenceNumber(Integer recurrenceNumber)
{
this.recurrenceNumber = recurrenceNumber;
}
@Override
public String toString()
{
ToStringBuilder builder = new ToStringBuilder(this);
builder.append("startDate", startDate);
builder.append("endDate", endDate);
builder.append("recurrenceNumber", recurrenceNumber);
builder.append("event", event);
return builder.toString();
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?