public class ContactData
extends sirius.db.mixing.Composite
Modifier and Type | Field and Description |
---|---|
static sirius.db.mixing.Mapping |
EMAIL
Contains an email address.
|
static sirius.db.mixing.Mapping |
FAX
Contains a fax number.
|
static sirius.db.mixing.Mapping |
MOBILE
Contains a mobile number.
|
static sirius.db.mixing.Mapping |
PHONE
Contains a phone number.
|
static Pattern |
VALID_PHONE_NUMBER
Validates a phone numner.
|
Constructor and Description |
---|
ContactData(boolean validatePhoneNumbers)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
String |
getEmail() |
String |
getFax() |
String |
getMobile() |
String |
getPhone() |
protected void |
onSave() |
void |
setEmail(String email) |
void |
setFax(String fax) |
void |
setMobile(String mobile) |
void |
setPhone(String phone) |
String |
toString() |
public static final Pattern VALID_PHONE_NUMBER
public static final sirius.db.mixing.Mapping EMAIL
If the field is filled, it has to be a valid email address, otherwise an exception will be thrown.
public static final sirius.db.mixing.Mapping PHONE
If the field is filled and validatePhoneNumbers is true, an exception is thrown if the phone number has an illegal format.
public static final sirius.db.mixing.Mapping FAX
If the field is filled and validatePhoneNumbers is true, an exception is thrown if the fax number has an illegal format.
public static final sirius.db.mixing.Mapping MOBILE
If the field is filled and validatePhoneNumbers is true, an exception is thrown if the mobile phone number has an illegal format.
public ContactData(boolean validatePhoneNumbers)
validatePhoneNumbers
- determines if phone numbers should be validated or notpublic String getEmail()
public void setEmail(String email)
public String getPhone()
public void setPhone(String phone)
public String getFax()
public void setFax(String fax)
public String getMobile()
public void setMobile(String mobile)
Copyright © 2018. All rights reserved.