org.apache.james.mailbox.jpa.mail.model.openjpa
Class AbstractJPAMessage

java.lang.Object
  extended by org.apache.james.mailbox.store.mail.model.AbstractMessage
      extended by org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage
All Implemented Interfaces:
Message
Direct Known Subclasses:
JPAMessage, JPAStreamingMessage

@MappedSuperclass
public abstract class AbstractJPAMessage
extends AbstractMessage

Abstract base class for JPA based implementations of AbstractMessage


Constructor Summary
AbstractJPAMessage()
          Deprecated. 
AbstractJPAMessage(long contentOctets, int bodyStartOctet, java.util.List<JPAHeader> headers, PropertyBuilder propertyBuilder)
           
AbstractJPAMessage(Message message)
          Create a copy of the given message
 
Method Summary
 boolean equals(java.lang.Object obj)
           
protected  int getBodyStartOctet()
           
 long getFullContentOctets()
           
 java.util.List<Header> getHeaders()
           
 java.lang.String getMediaType()
          Gets the top level MIME content media type.
 java.util.List<Property> getProperties()
          Gets a read-only list of meta-data properties.
 java.lang.String getSubType()
          Gets the MIME content subtype.
 java.lang.Long getTextualLineCount()
          Gets the number of CRLF in a textual document.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.james.mailbox.store.mail.model.AbstractMessage
getBodyContent, getBodyOctets, getFullContent, getRawFullContent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractJPAMessage

@Deprecated
public AbstractJPAMessage()
Deprecated. 


AbstractJPAMessage

public AbstractJPAMessage(long contentOctets,
                          int bodyStartOctet,
                          java.util.List<JPAHeader> headers,
                          PropertyBuilder propertyBuilder)

AbstractJPAMessage

public AbstractJPAMessage(Message message)
Create a copy of the given message

Parameters:
message -
Method Detail

getHeaders

public java.util.List<Header> getHeaders()
See Also:
Message.getHeaders()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getMediaType

public java.lang.String getMediaType()
Gets the top level MIME content media type.

Returns:
top level MIME content media type, or null if default

getSubType

public java.lang.String getSubType()
Gets the MIME content subtype.

Returns:
the MIME content subtype, or null if default

getProperties

public java.util.List<Property> getProperties()
Gets a read-only list of meta-data properties. For properties with multiple values, this list will contain several enteries with the same namespace and local name.

Returns:
unmodifiable list of meta-data, not null

getTextualLineCount

public java.lang.Long getTextualLineCount()
Gets the number of CRLF in a textual document.

Returns:
CRLF count when document is textual, null otherwise

getFullContentOctets

public long getFullContentOctets()

getBodyStartOctet

protected int getBodyStartOctet()
Specified by:
getBodyStartOctet in class AbstractMessage


Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.