refactored all getId()s  to getID()s
				
					
				
			This commit is contained in:
		@@ -15,7 +15,7 @@ public class Contacts implements Serializable {
 | 
			
		||||
 | 
			
		||||
	private final List<User> contacts;
 | 
			
		||||
 | 
			
		||||
	private static final long serialVersionUID = 136970804968152871L;
 | 
			
		||||
	private static final long serialVersionUID = 0L;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Creates an instance of {@link Contacts}.
 | 
			
		||||
 
 | 
			
		||||
@@ -48,7 +48,7 @@ public class Message implements Serializable {
 | 
			
		||||
		READ
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	private final long					id, senderId, recipientId;
 | 
			
		||||
	private final long					id, senderID, recipientID;
 | 
			
		||||
	private final boolean				forwarded;
 | 
			
		||||
	private final Date					creationDate;
 | 
			
		||||
	private final String				text;
 | 
			
		||||
@@ -66,8 +66,8 @@ public class Message implements Serializable {
 | 
			
		||||
	 * properties.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param id           unique ID
 | 
			
		||||
	 * @param senderId     the ID of the user who sends the message
 | 
			
		||||
	 * @param recipientId  the ID of the user who receives the message
 | 
			
		||||
	 * @param senderID     the ID of the user who sends the message
 | 
			
		||||
	 * @param recipientID  the ID of the user who receives the message
 | 
			
		||||
	 * @param creationDate the creation date of the message
 | 
			
		||||
	 * @param text         the text content of the message
 | 
			
		||||
	 * @param attachment   the attachment of the message, if present
 | 
			
		||||
@@ -75,11 +75,11 @@ public class Message implements Serializable {
 | 
			
		||||
	 * @param forwarded    whether this message was forwarded
 | 
			
		||||
	 * @since Envoy Common v0.2-alpha
 | 
			
		||||
	 */
 | 
			
		||||
	Message(long id, long senderId, long recipientId, Date creationDate, String text, MessageAttachment<?> attachment, MessageStatus status,
 | 
			
		||||
	Message(long id, long senderID, long recipientID, Date creationDate, String text, MessageAttachment<?> attachment, MessageStatus status,
 | 
			
		||||
			boolean forwarded) {
 | 
			
		||||
		this.id				= id;
 | 
			
		||||
		this.senderId		= senderId;
 | 
			
		||||
		this.recipientId	= recipientId;
 | 
			
		||||
		this.senderID		= senderID;
 | 
			
		||||
		this.recipientID	= recipientID;
 | 
			
		||||
		this.creationDate	= creationDate;
 | 
			
		||||
		this.text			= text;
 | 
			
		||||
		this.attachment		= attachment;
 | 
			
		||||
@@ -110,8 +110,8 @@ public class Message implements Serializable {
 | 
			
		||||
		return String.format(
 | 
			
		||||
				"TextMessage[id=%d,sender=%s,recipient=%s,date=%s,status=%s,text=%s,forwarded,hasAttachment=%b]",
 | 
			
		||||
				id,
 | 
			
		||||
				senderId,
 | 
			
		||||
				recipientId,
 | 
			
		||||
				senderID,
 | 
			
		||||
				recipientID,
 | 
			
		||||
				new SimpleDateFormat("dd.MM.yyyy HH:mm:ss").format(creationDate),
 | 
			
		||||
				status,
 | 
			
		||||
				text,
 | 
			
		||||
@@ -123,19 +123,19 @@ public class Message implements Serializable {
 | 
			
		||||
	 * @return the ID of this message
 | 
			
		||||
	 * @since Envoy Common v0.2-alpha
 | 
			
		||||
	 */
 | 
			
		||||
	public long getId() { return id; }
 | 
			
		||||
	public long getID() { return id; }
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @return the sender ID of this message
 | 
			
		||||
	 * @since Envoy Common v0.2-alpha
 | 
			
		||||
	 */
 | 
			
		||||
	public long getSenderId() { return senderId; }
 | 
			
		||||
	public long getSenderID() { return senderID; }
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @return the recipient ID of this message
 | 
			
		||||
	 * @since Envoy Common v0.2-alpha
 | 
			
		||||
	 */
 | 
			
		||||
	public long getRecipientId() { return recipientId; }
 | 
			
		||||
	public long getRecipientID() { return recipientID; }
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @return the date at which this message was created
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@ import envoy.data.Message.MessageStatus;
 | 
			
		||||
public class MessageBuilder {
 | 
			
		||||
 | 
			
		||||
	// Mandatory properties without default values
 | 
			
		||||
	private final long senderId, recipientId;
 | 
			
		||||
	private final long senderID, recipientID;
 | 
			
		||||
 | 
			
		||||
	// Properties with default values
 | 
			
		||||
	private long					id;
 | 
			
		||||
@@ -31,26 +31,26 @@ public class MessageBuilder {
 | 
			
		||||
	 * Creates an instance of {@link MessageBuilder} with all mandatory values
 | 
			
		||||
	 * without defaults for the {@link Message} class.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param senderId    the ID of the user who sends the {@link Message}
 | 
			
		||||
	 * @param recipientId the ID of the user who receives the {@link Message}
 | 
			
		||||
	 * @param senderID    the ID of the user who sends the {@link Message}
 | 
			
		||||
	 * @param recipientID the ID of the user who receives the {@link Message}
 | 
			
		||||
	 * @param iDGenerator the ID generator used to generate a unique {@link Message}
 | 
			
		||||
	 *                    id
 | 
			
		||||
	 * @since Envoy Common v0.2-alpha
 | 
			
		||||
	 */
 | 
			
		||||
	public MessageBuilder(long senderId, long recipientId, IDGenerator iDGenerator) { this(senderId, recipientId, iDGenerator.next()); }
 | 
			
		||||
	public MessageBuilder(long senderID, long recipientID, IDGenerator iDGenerator) { this(senderID, recipientID, iDGenerator.next()); }
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Creates an instance of {@link MessageBuilder} with all mandatory values
 | 
			
		||||
	 * without defaults for the {@link Message} class.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param senderId    the ID of the user who sends the {@link Message}
 | 
			
		||||
	 * @param recipientId the ID of the user who receives the {@link Message}
 | 
			
		||||
	 * @param senderID    the ID of the user who sends the {@link Message}
 | 
			
		||||
	 * @param recipientID the ID of the user who receives the {@link Message}
 | 
			
		||||
	 * @param messageId   the ID of the {@link Message}
 | 
			
		||||
	 * @since Envoy Common v0.2-alpha
 | 
			
		||||
	 */
 | 
			
		||||
	public MessageBuilder(long senderId, long recipientId, long messageId) {
 | 
			
		||||
		this.senderId		= senderId;
 | 
			
		||||
		this.recipientId	= recipientId;
 | 
			
		||||
	public MessageBuilder(long senderID, long recipientID, long messageId) {
 | 
			
		||||
		this.senderID		= senderID;
 | 
			
		||||
		this.recipientID	= recipientID;
 | 
			
		||||
		id					= messageId;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -60,13 +60,13 @@ public class MessageBuilder {
 | 
			
		||||
	 * This makes it especially useful in the case of forwarding messages.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @param msg         the message to copy
 | 
			
		||||
	 * @param recipientId the ID of the user who receives the {@link Message}
 | 
			
		||||
	 * @param recipientID the ID of the user who receives the {@link Message}
 | 
			
		||||
	 * @param iDGenerator the ID generator used to generate a unique {@link Message}
 | 
			
		||||
	 *                    id
 | 
			
		||||
	 * @since Envoy v0.1-beta
 | 
			
		||||
	 */
 | 
			
		||||
	public MessageBuilder(Message msg, long recipientId, IDGenerator iDGenerator) {
 | 
			
		||||
		this(msg.getRecipientId(), recipientId, iDGenerator.next());
 | 
			
		||||
	public MessageBuilder(Message msg, long recipientID, IDGenerator iDGenerator) {
 | 
			
		||||
		this(msg.getRecipientID(), recipientID, iDGenerator.next());
 | 
			
		||||
		this.attachment		= msg.getAttachment();
 | 
			
		||||
		this.creationDate	= new Date();
 | 
			
		||||
		this.forwarded		= true;
 | 
			
		||||
@@ -102,7 +102,7 @@ public class MessageBuilder {
 | 
			
		||||
		if (text == null) text = "";
 | 
			
		||||
		if (status == null) status = MessageStatus.WAITING;
 | 
			
		||||
 | 
			
		||||
		return new Message(id, senderId, recipientId, creationDate, text, attachment, status, forwarded);
 | 
			
		||||
		return new Message(id, senderID, recipientID, creationDate, text, attachment, status, forwarded);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,8 @@ import envoy.data.User;
 | 
			
		||||
/**
 | 
			
		||||
 * This event is used to communicate changes in the group size between client
 | 
			
		||||
 * and server.<br>
 | 
			
		||||
 * Possible actions are adding or removing certain {@link User}s to or from a certain {@link Group} 
 | 
			
		||||
 * Possible actions are adding or removing certain {@link User}s to or from a
 | 
			
		||||
 * certain {@link Group}
 | 
			
		||||
 * <br>
 | 
			
		||||
 * Project: <strong>envoy-common</strong><br>
 | 
			
		||||
 * File: <strong>GroupResizeEvent.java</strong><br>
 | 
			
		||||
 
 | 
			
		||||
@@ -40,13 +40,13 @@ public class MessageStatusChangeEvent extends Event<Message.MessageStatus> {
 | 
			
		||||
	 * @param message the message from which to build the event
 | 
			
		||||
	 * @since Envoy Common v0.2-alpha
 | 
			
		||||
	 */
 | 
			
		||||
	public MessageStatusChangeEvent(Message message) { this(message.getId(), message.getStatus(), new Date()); }
 | 
			
		||||
	public MessageStatusChangeEvent(Message message) { this(message.getID(), message.getStatus(), new Date()); }
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @return the ID of the {@link Message} this event is related to
 | 
			
		||||
	 * @since Envoy Common v0.2-alpha
 | 
			
		||||
	 */
 | 
			
		||||
	public long getId() { return id; }
 | 
			
		||||
	public long getID() { return id; }
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * @return the date at which the status change occurred
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,7 @@ public class UserStatusChangeEvent extends Event<UserStatus> {
 | 
			
		||||
	 * @return the ID of the {@link User} this event is related to
 | 
			
		||||
	 * @since Envoy Common v0.2-alpha
 | 
			
		||||
	 */
 | 
			
		||||
	public long getId() { return id; }
 | 
			
		||||
	public long getID() { return id; }
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public String toString() { return String.format("UserStatusChangeEvent[id=%d,status=%s]", id, value); }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user