org.openwms.core.domain.system
Class Message

java.lang.Object
  extended by org.openwms.core.domain.AbstractEntity
      extended by org.openwms.core.domain.system.Message
All Implemented Interfaces:
Serializable, DomainObject<Long>

public class Message
extends AbstractEntity
implements DomainObject<Long>

A Message can be used to store useful information on other domain objects.

Since:
0.1
Version:
$Revision: 1561 $
Author:
Heiko Scherrer
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.openwms.core.domain.AbstractEntity
AbstractEntity.AbstractEntityListener
 
Field Summary
 
Fields inherited from class org.openwms.core.domain.AbstractEntity
FIND_ALL, FIND_BY_ID
 
Constructor Summary
Message(int messageNo, String messageText)
          Create a new Message with message number and message text.
 
Method Summary
 Date getCreated()
          Return the date when this Message was created.
 Long getId()
          Return the technical key value.
 int getMessageNo()
          Return the message number.
 String getMessageText()
          Return the message text.
 long getVersion()
          Return the value of the optimistic locking field.
 boolean isNew()
          Check whether the instance is a transient or persisted one.
 void setMessageNo(int messageNo)
          Set the message number.
 void setMessageText(String messageText)
          Set the message text.
 
Methods inherited from class org.openwms.core.domain.AbstractEntity
equals, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Message

public Message(int messageNo,
               String messageText)
Create a new Message with message number and message text.

Parameters:
messageNo - The message number
messageText - The message text
Method Detail

getId

public Long getId()
Return the technical key value.

Specified by:
getId in interface DomainObject<Long>
Returns:
The technical, unique key

isNew

public boolean isNew()
Check whether the instance is a transient or persisted one.

Specified by:
isNew in interface DomainObject<Long>
Returns:
true if transient (not persisted before), otherwise false

getMessageNo

public int getMessageNo()
Return the message number.

Returns:
The message number

setMessageNo

public void setMessageNo(int messageNo)
Set the message number.

Parameters:
messageNo - The messageNo to set.

getMessageText

public String getMessageText()
Return the message text.

Returns:
The message text

setMessageText

public void setMessageText(String messageText)
Set the message text.

Parameters:
messageText - The messageText to set.

getCreated

public Date getCreated()
Return the date when this Message was created.

Returns:
The date of creation

getVersion

public long getVersion()
Return the value of the optimistic locking field.

Specified by:
getVersion in interface DomainObject<Long>
Returns:
the version number


Copyright © 2005-2011 openwms.org. All Rights Reserved.