0,0 → 1,123 |
package ak.webcontrol.core.model; |
|
import java.util.Collection; |
import java.util.Date; |
|
/** |
* |
* @hibernate.class table="mailaliases" |
*/ |
public class MailAlias |
implements ModelObject |
{ |
private Long id; |
private String address; |
private InetDomain domain; |
private User owner; |
private Collection destinations; // Collection(MailAliasDestintion) |
private Date modStamp; |
|
protected MailAlias() |
{ |
} |
|
/** |
* |
* @hibernate.id generator-class="native" |
*/ |
public Long getId() |
{ |
return id; |
} |
|
public void setId(Long id) |
{ |
this.id = id; |
} |
|
/** |
* |
* @hibernate.property |
*/ |
public String getAddress() |
{ |
return address; |
} |
|
public void setAddress(String address) |
{ |
this.address = address; |
} |
|
/** |
* |
* @hibernate.many-to-one |
*/ |
public InetDomain getDomain() |
{ |
return domain; |
} |
|
public void setDomain(InetDomain domain) |
{ |
this.domain = domain; |
} |
|
/** |
* |
* @hibernate.many-to-one |
*/ |
public User getOwner() |
{ |
return owner; |
} |
|
public void setOwner(User owner) |
{ |
this.owner = owner; |
} |
|
/** |
* @return Collection(MailAliasDestination) |
* |
* @hibernate.bag inverse="true" cascade="all-delete-orphan" |
* @hibernate.collection-key column="alias" |
* @hibernate.collection-one-to-many class="ak.webcontrol.core.model.MailAliasDestination" |
*/ |
public Collection getDestinations() |
{ |
return destinations; |
} |
|
/** |
* @param destinations Collection(MailAliasDestination) |
*/ |
protected void setDestinations(Collection destinations) |
{ |
this.destinations = destinations; |
} |
|
/** |
* |
* @hibernate.timestamp column="mod_stamp" |
*/ |
public Date getModStamp() |
{ |
return modStamp; |
} |
|
public void setModStamp(Date modStamp) |
{ |
this.modStamp = modStamp; |
} |
|
public String getTypeKey() |
{ |
return ak.webcontrol.core.CoreResources.TYPE_MAIL_ALIAS; |
} |
|
public String getIdentificationString() |
{ |
return getAddress() + "@" + getDomain().getName(); |
} |
} |