com.openexchange.api
Class OXAttachment

java.lang.Object
  extended by com.openexchange.api.OXObject
      extended by com.openexchange.api.OXAttachment
All Implemented Interfaces:
java.lang.Cloneable

public class OXAttachment
extends OXObject

OXAttachment

Author:
Sebastian Kauss

Field Summary
static int APPOINTMENT
           
static int CONTACT
           
static java.lang.String FILENAME
           
static java.lang.String LAST_MODIFIED
           
static java.lang.String MIME_TYPE
           
static java.lang.String MODULE
           
static java.lang.String TARGET_FOLDER_ID
           
static java.lang.String TARGET_ID
           
static int TASK
           
 
Fields inherited from class com.openexchange.api.OXObject
CREATION_TIME, OBJECT_ID
 
Method Summary
 OXObject create(java.lang.Object internalobject)
          returns a new instance of the OXObject
static OXAttachment createOXAttachment()
           
 void delete()
          delete the OXObject the OXObject have to contain the name "object_id" with the speciefied ID to delete
 void destroy()
          destroys this OXObject
 java.lang.String getFilename()
           
 java.io.InputStream getInputStream()
           
 java.util.Date getLastModified()
          return the last modified
 java.lang.String getMimeType()
           
 int getModule()
           
 boolean getNext()
          return true if an next object exists
 int getObjectID()
          return object_id
 void load()
          load the OXObject
 void reset()
          set the OXObject to the default values
 void save()
          saves the OXObject with the specified values if the OXObject not contains the name "object_id" this method tries to perform an insert if the OXObject contains the name "object_id" this methods tries to perform an update
 void setFilename(java.lang.String filename)
           
 void setInputStream(java.io.InputStream is)
           
 void setMimeType(java.lang.String mimetype)
           
 void setModule(int module)
           
 void setObjectID(int object_id)
          set the object id
 void setSimpleQuery(int target_id, int module)
           
 void setTargetFolderID(int target_folder_id)
           
 void setTargetID(int target_id)
           
 
Methods inherited from class com.openexchange.api.OXObject
clone, contains, get, getConnection, getCreationTime, getInternalFieldname, getMandatoryFields, getMappedField, getPassword, getReadableFields, getUser, getWriteableFields, isNull, iterator, put, remove, set, setInternalObject, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LAST_MODIFIED

public static final java.lang.String LAST_MODIFIED
See Also:
Constant Field Values

MODULE

public static final java.lang.String MODULE
See Also:
Constant Field Values

FILENAME

public static final java.lang.String FILENAME
See Also:
Constant Field Values

MIME_TYPE

public static final java.lang.String MIME_TYPE
See Also:
Constant Field Values

TARGET_ID

public static final java.lang.String TARGET_ID
See Also:
Constant Field Values

TARGET_FOLDER_ID

public static final java.lang.String TARGET_FOLDER_ID
See Also:
Constant Field Values

APPOINTMENT

public static final int APPOINTMENT
See Also:
Constant Field Values

TASK

public static final int TASK
See Also:
Constant Field Values

CONTACT

public static final int CONTACT
See Also:
Constant Field Values
Method Detail

create

public OXObject create(java.lang.Object internalobject)
Description copied from class: OXObject
returns a new instance of the OXObject


createOXAttachment

public static OXAttachment createOXAttachment()

setSimpleQuery

public void setSimpleQuery(int target_id,
                           int module)
                    throws java.lang.Exception,
                           OXConflictException
Throws:
java.lang.Exception
OXConflictException

getNext

public boolean getNext()
Description copied from class: OXObject
return true if an next object exists

Specified by:
getNext in class OXObject

setInputStream

public void setInputStream(java.io.InputStream is)

getInputStream

public java.io.InputStream getInputStream()

getObjectID

public int getObjectID()
Description copied from class: OXObject
return object_id

Overrides:
getObjectID in class OXObject
Returns:
object_id

getFilename

public java.lang.String getFilename()

getLastModified

public java.util.Date getLastModified()
Description copied from class: OXObject
return the last modified

Overrides:
getLastModified in class OXObject
Returns:
last modified

getMimeType

public java.lang.String getMimeType()

getModule

public int getModule()

setObjectID

public void setObjectID(int object_id)
Description copied from class: OXObject
set the object id

Overrides:
setObjectID in class OXObject

setFilename

public void setFilename(java.lang.String filename)

setMimeType

public void setMimeType(java.lang.String mimetype)

setModule

public void setModule(int module)

setTargetID

public void setTargetID(int target_id)

setTargetFolderID

public void setTargetFolderID(int target_folder_id)

load

public void load()
          throws java.lang.Exception,
                 OXConflictException,
                 OXPermissionException
Description copied from class: OXObject
load the OXObject

Specified by:
load in class OXObject
Throws:
java.lang.Exception
OXConflictException
OXPermissionException

save

public void save()
          throws java.lang.Exception,
                 OXConflictException,
                 OXPermissionException,
                 OXMandatoryFieldException
Description copied from class: OXObject
saves the OXObject with the specified values if the OXObject not contains the name "object_id" this method tries to perform an insert if the OXObject contains the name "object_id" this methods tries to perform an update

Specified by:
save in class OXObject
Throws:
java.lang.Exception
OXConflictException
OXPermissionException
OXMandatoryFieldException

delete

public void delete()
            throws java.lang.Exception,
                   OXConflictException,
                   OXMandatoryFieldException
Description copied from class: OXObject
delete the OXObject the OXObject have to contain the name "object_id" with the speciefied ID to delete

Specified by:
delete in class OXObject
Throws:
java.lang.Exception
OXConflictException
OXMandatoryFieldException

reset

public void reset()
Description copied from class: OXObject
set the OXObject to the default values

Specified by:
reset in class OXObject

destroy

public void destroy()
Description copied from class: OXObject
destroys this OXObject

Specified by:
destroy in class OXObject