net.obsearch
Class OperationStatus

java.lang.Object
  extended by net.obsearch.OperationStatus

public class OperationStatus
extends Object

This class is used to return the result of operations performed by OBSearch. The result also includes an id field that, depending on the operation returns the last inserted or deleted object.

Since:
0
Author:
Arnoldo Jose Muller Molina

Constructor Summary
OperationStatus()
          Creates a default status with status Status.Error and an id of -1.
OperationStatus(Status status)
          Initializes the object with the given status and an id of -1
OperationStatus(Status status, int id)
          Creates a new status object.
 
Method Summary
 long getId()
          Returns the id of the affected item of the operation -1 if the id does not apply.
 String getMsg()
           
 Status getStatus()
           
 void setId(long id)
          Sets the id returned in the enumeration.
 void setMsg(String msg)
           
 void setStatus(Status status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationStatus

public OperationStatus()
Creates a default status with status Status.Error and an id of -1.


OperationStatus

public OperationStatus(Status status)
Initializes the object with the given status and an id of -1

Parameters:
status - The status that will be used.

OperationStatus

public OperationStatus(Status status,
                       int id)
Creates a new status object.

Parameters:
status - The status the object will hold
id - The id of the affected object.
Method Detail

getMsg

public String getMsg()

setMsg

public void setMsg(String msg)

getStatus

public Status getStatus()

setStatus

public void setStatus(Status status)

setId

public void setId(long id)
Sets the id returned in the enumeration.

Parameters:
id - The new id.

getId

public long getId()
Returns the id of the affected item of the operation -1 if the id does not apply.

Returns:
The id.


Copyright © 2007-2011 Arnoldo Jose Muller Molina. All Rights Reserved.