package com.shin1ogawa.service;

import java.util.Date;

import com.google.appengine.api.users.User;
import com.shin1ogawa.entity.Board;
import com.shin1ogawa.entity.Message;

public class MessageService extends AbstractService<Message>{
	public static Message create(Board board, User user, String body) {
		Message message = new Message();
		message.setUser(user);
		message.setBody(body);
		message.setCreated(new Date(System.currentTimeMillis()));
		board.getMessages().add(message);
		return message;
	}
}
