Class SearchAddress
java.lang.Object
fr.paris.lutece.plugins.genericattributes.modules.address.business.SearchAddress
SearchAddress. Use for JSON compatibility :
{
"noResult" : "false",
"singleResult" : "false",
"listAddresses" : [{"12345", "217 rue de Bercy"},
{"98765", "216, rue de Bercy"}],
"message" : "",
"error" : "false",
"address" : "",
"html" : "[...]"
}
http://www.json.org/-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfr.paris.lutece.util.ReferenceListReturn matching addressesaddressintEntry idReturns the error messagefloatgetX()XfloatgetY()YbooleanisError()trueif the error message is not blank,falseotherwisebooleantrueif no result,falseotherwisebooleantrueif there is one and only one result ,falseotherwisevoidsetAddresses(fr.paris.lutece.util.ReferenceList refListAddresses) Sets the addressesvoidsetAddressLabel(String strAddressLabel) Sets the addressvoidsetIdAddress(String strIdAddress) voidsetIdEntry(int nIdEntry) Sets the entry idvoidsetMessage(String strMessage) Sets an error messagevoidsetX(float fX) Sets the xvoidsetY(float fY) Sets the ytoJSONString(Locale locale)
-
Constructor Details
-
SearchAddress
public SearchAddress()
-
-
Method Details
-
getAddressLabel
address- Returns:
- address
-
setAddressLabel
Sets the address- Parameters:
strAddressLabel- the new address
-
getIdEntry
public int getIdEntry()Entry id- Returns:
- the entry id
-
setIdEntry
public void setIdEntry(int nIdEntry) Sets the entry id- Parameters:
nIdEntry- the new entry id
-
isNoResult
public boolean isNoResult()trueif no result,falseotherwise- Returns:
trueif no result,falseotherwise
-
isSingleResult
public boolean isSingleResult()trueif there is one and only one result ,falseotherwise- Returns:
trueif there is one and only one result,falseotherwise
-
setAddresses
public void setAddresses(fr.paris.lutece.util.ReferenceList refListAddresses) Sets the addresses- Parameters:
refListAddresses- the addresses
-
getAddresses
public fr.paris.lutece.util.ReferenceList getAddresses()Return matching addresses- Returns:
- the addresses
-
setMessage
Sets an error message- Parameters:
strMessage- an error message
-
getMessage
Returns the error message- Returns:
- the error message,
nullotherwise.
-
isError
public boolean isError()trueif the error message is not blank,falseotherwise- Returns:
trueif the error message is not blank,falseotherwise
-
getX
public float getX()X- Returns:
- x
-
setX
public void setX(float fX) Sets the x- Parameters:
fX- the x
-
setY
public void setY(float fY) Sets the y- Parameters:
fY- the y
-
getY
public float getY()Y- Returns:
- y
-
getIdAddress
- Returns:
- the nIdAddress
-
setIdAddress
- Parameters:
nIdAddress- the IdAddress to set
-
toJSONString
- Parameters:
locale- the locale- Returns:
- json representation
- See Also:
-
JSONObject#toString()
-