public class AddressData
extends sirius.db.mixing.Composite
Modifier and Type | Class and Description |
---|---|
static class |
AddressData.Requirements
As there are many different requirements for what a valid address might be, these can be specified per
AddressData using one of the following requirements.
|
Modifier and Type | Field and Description |
---|---|
static sirius.db.mixing.Mapping |
CITY
Contains the name of the city.
|
protected String |
fieldLabel |
protected AddressData.Requirements |
requirements |
static sirius.db.mixing.Mapping |
STREET
Contains the street and street number.
|
static sirius.db.mixing.Mapping |
ZIP
Contains the ZIP code.
|
Constructor and Description |
---|
AddressData(AddressData.Requirements requirements,
String fieldLabel)
Creates a new instance with the given requirement.
|
Modifier and Type | Method and Description |
---|---|
boolean |
areAllFieldsEmpty()
Determines if all fields are empty.
|
void |
clear()
Sets all fields to null.
|
boolean |
equals(Object obj) |
String |
getCity() |
String |
getStreet() |
String |
getZip() |
int |
hashCode() |
boolean |
isAnyFieldEmpty()
Determines if at least one field in the address is empty.
|
protected void |
onSave() |
void |
setCity(String city) |
void |
setStreet(String street) |
void |
setZip(String zip) |
String |
toString() |
protected final AddressData.Requirements requirements
protected String fieldLabel
public static final sirius.db.mixing.Mapping STREET
public static final sirius.db.mixing.Mapping ZIP
public static final sirius.db.mixing.Mapping CITY
public AddressData(AddressData.Requirements requirements, @Nullable String fieldLabel)
requirements
- determines which fields are required in certain constellationsfieldLabel
- the name of the compund field which represents the addressprotected void onSave()
public boolean isAnyFieldEmpty()
public boolean areAllFieldsEmpty()
public void clear()
public String getStreet()
public void setStreet(String street)
public String getZip()
public void setZip(String zip)
public String getCity()
public void setCity(String city)
Copyright © 2018. All rights reserved.