fr.cnes.sitools.common.model
Class Response

java.lang.Object
  extended by fr.cnes.sitools.common.model.Response
All Implemented Interfaces:
java.io.Serializable

public final class Response
extends java.lang.Object
implements java.io.Serializable

Generic response class for XML/JSON serialization.

Author:
jp.boignard (AKKA Technologies)
See Also:
Serialized Form

Constructor Summary
Response()
          Default constructor.
Response(java.lang.Boolean succ, java.lang.Object[] dat)
          Constructor.
Response(java.lang.Boolean succ, java.lang.Object[] dat, java.lang.Class<?> objectClass)
          Constructor.
Response(java.lang.Boolean succ, java.lang.Object[] dat, java.lang.Class<?> objectClass, java.lang.String objectName)
          Constructor.
Response(java.lang.Boolean succ, java.lang.Object itm, java.lang.Class<?> objectClass)
          Constructor with default itemName.
Response(java.lang.Boolean succ, java.lang.Object itm, java.lang.Class<?> objectClass, java.lang.String objectName)
          Constructor.
Response(java.lang.Boolean succ, java.lang.String mess)
          Constructor
Response(java.lang.Boolean succ, java.lang.String mess, java.lang.Object[] dat, java.lang.Class<?> objectClass)
          Constructor with array data.
Response(java.lang.Boolean succ, java.lang.String mess, java.lang.Object[] dat, java.lang.Class<?> objectClass, java.lang.String objectName)
          Constructor with array data.
 
Method Summary
 java.lang.Integer getCount()
          Gets the count value
 java.util.ArrayList<java.lang.Object> getData()
          Gets the data value.
 java.lang.Object getItem()
          Gets the item value.
 java.lang.Class<?> getItemClass()
          Gets the itemClass value.
 java.lang.String getItemName()
          Gets the itemName value.
 java.lang.String getMessage()
          Gets the message value.
 java.lang.Integer getOffset()
          Gets the offset value
 java.lang.Boolean getSuccess()
          Gets the success value.
 java.lang.Integer getTotal()
          Gets the total value.
 java.lang.String getUrl()
          Gets the URL value.
 boolean isSuccess()
          Gets the success value.
 void setCount(java.lang.Integer count)
          Sets the value of count
 void setData(java.util.ArrayList<java.lang.Object> dat)
          Sets the value of data.
 void setItem(java.lang.Object itm)
          Sets the value of item.
 void setItemClass(java.lang.Class<?> itemCls)
          Sets the value of itemClass.
 void setItemName(java.lang.String itmName)
          Sets the value of itemName.
 void setMessage(java.lang.String mess)
          Sets the value of message.
 void setOffset(java.lang.Integer offset)
          Sets the value of offset
 void setSuccess(java.lang.Boolean succ)
          Sets the value of success.
 void setTotal(java.lang.Integer tot)
          Sets the value of total.
 void setUrl(java.lang.String urlToSet)
          Sets the value of URL.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Response

public Response(java.lang.Boolean succ,
                java.lang.String mess,
                java.lang.Object[] dat,
                java.lang.Class<?> objectClass)
Constructor with array data.

Parameters:
succ - set the response success
mess - response message
dat - the data sent
objectClass - the class of the object sent

Response

public Response(java.lang.Boolean succ,
                java.lang.String mess,
                java.lang.Object[] dat,
                java.lang.Class<?> objectClass,
                java.lang.String objectName)
Constructor with array data.

Parameters:
succ - set the response success
mess - response message
dat - the data sent
objectClass - the class of the object sent
objectName - the name of the object

Response

public Response(java.lang.Boolean succ,
                java.lang.String mess)
Constructor

Parameters:
succ - set the response success
mess - response message

Response

public Response(java.lang.Boolean succ,
                java.lang.Object[] dat)
Constructor.

Parameters:
succ - set the response success
dat - the data sent

Response

public Response(java.lang.Boolean succ,
                java.lang.Object[] dat,
                java.lang.Class<?> objectClass)
Constructor.

Parameters:
succ - set the response success
dat - the data sent
objectClass - the class of the object sent

Response

public Response(java.lang.Boolean succ,
                java.lang.Object[] dat,
                java.lang.Class<?> objectClass,
                java.lang.String objectName)
Constructor.

Parameters:
succ - set the response success
dat - the data sent
objectClass - the class of the object sent
objectName - the name of the object

Response

public Response(java.lang.Boolean succ,
                java.lang.Object itm,
                java.lang.Class<?> objectClass,
                java.lang.String objectName)
Constructor.

Parameters:
succ - set the response success
itm - the item sent
objectClass - the class of the object sent
objectName - the name of the object

Response

public Response()
Default constructor.


Response

public Response(java.lang.Boolean succ,
                java.lang.Object itm,
                java.lang.Class<?> objectClass)
Constructor with default itemName.

Parameters:
succ - set the response success
itm - the item sent
objectClass - the class of the object sent
Method Detail

getSuccess

public java.lang.Boolean getSuccess()
Gets the success value.

Returns:
the success

isSuccess

public boolean isSuccess()
Gets the success value.

Returns:
the success

setSuccess

public void setSuccess(java.lang.Boolean succ)
Sets the value of success.

Parameters:
succ - the success to set

getTotal

public java.lang.Integer getTotal()
Gets the total value.

Returns:
the total

setTotal

public void setTotal(java.lang.Integer tot)
Sets the value of total.

Parameters:
tot - the total to set

getMessage

public java.lang.String getMessage()
Gets the message value.

Returns:
the message

setMessage

public void setMessage(java.lang.String mess)
Sets the value of message.

Parameters:
mess - the message to set

getData

public java.util.ArrayList<java.lang.Object> getData()
Gets the data value.

Returns:
the data

setData

public void setData(java.util.ArrayList<java.lang.Object> dat)
Sets the value of data.

Parameters:
dat - the data to set

getItem

public java.lang.Object getItem()
Gets the item value.

Returns:
the item

setItem

public void setItem(java.lang.Object itm)
Sets the value of item.

Parameters:
itm - the item to set

getItemClass

public java.lang.Class<?> getItemClass()
Gets the itemClass value.

Returns:
the itemClass

setItemClass

public void setItemClass(java.lang.Class<?> itemCls)
Sets the value of itemClass.

Parameters:
itemCls - the itemClass to set

getUrl

public java.lang.String getUrl()
Gets the URL value.

Returns:
the URL

setUrl

public void setUrl(java.lang.String urlToSet)
Sets the value of URL.

Parameters:
urlToSet - the URL to set

getItemName

public java.lang.String getItemName()
Gets the itemName value.

Returns:
the itemName

setItemName

public void setItemName(java.lang.String itmName)
Sets the value of itemName.

Parameters:
itmName - the itemName to set

getCount

public java.lang.Integer getCount()
Gets the count value

Returns:
the count

setCount

public void setCount(java.lang.Integer count)
Sets the value of count

Parameters:
count - the count to set

getOffset

public java.lang.Integer getOffset()
Gets the offset value

Returns:
the offset

setOffset

public void setOffset(java.lang.Integer offset)
Sets the value of offset

Parameters:
offset - the offset to set

toString

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


Copyright © 2010-2013 CNES. All Rights Reserved.