PacAdministrationVO in ContactVO
This commit is contained in:
parent
8b5994e429
commit
bb44a3233a
@ -105,6 +105,7 @@
|
|||||||
<debug>false</debug>
|
<debug>false</debug>
|
||||||
<debugPort>8000</debugPort>
|
<debugPort>8000</debugPort>
|
||||||
<config>${project.basedir}/src/test/tomee/conf</config>
|
<config>${project.basedir}/src/test/tomee/conf</config>
|
||||||
|
<context>cust-webapp</context>
|
||||||
<libs>
|
<libs>
|
||||||
<lib>org.postgresql:postgresql:9.4.1212.jre7</lib>
|
<lib>org.postgresql:postgresql:9.4.1212.jre7</lib>
|
||||||
</libs>
|
</libs>
|
||||||
|
@ -260,4 +260,12 @@ public class Contact implements Serializable {
|
|||||||
this.roles = roles;
|
this.roles = roles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<PacAdministration> getPacAdminList() {
|
||||||
|
return pacAdminList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPacAdminList(List<PacAdministration> pacAdminList) {
|
||||||
|
this.pacAdminList = pacAdminList;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ public class PacAdministration {
|
|||||||
private Contact contact;
|
private Contact contact;
|
||||||
|
|
||||||
@ManyToOne(fetch=FetchType.EAGER)
|
@ManyToOne(fetch=FetchType.EAGER)
|
||||||
@JoinColumn(name="packet_id")
|
@JoinColumn(name="pac_id")
|
||||||
private Pac pac;
|
private Pac pac;
|
||||||
|
|
||||||
public PacAdministration() {
|
public PacAdministration() {
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
package de.hsadmin.service.customer;
|
package de.hsadmin.service.customer;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import javax.validation.constraints.Pattern;
|
import javax.validation.constraints.Pattern;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
|
|
||||||
import de.hsadmin.common.error.TechnicalException;
|
import de.hsadmin.common.error.TechnicalException;
|
||||||
import de.hsadmin.module.ValueObject;
|
import de.hsadmin.module.ValueObject;
|
||||||
import de.hsadmin.module.impl.AbstractVO;
|
import de.hsadmin.module.impl.AbstractVO;
|
||||||
|
import de.hsadmin.module.property.ElementsType;
|
||||||
import de.hsadmin.module.property.ReadWrite;
|
import de.hsadmin.module.property.ReadWrite;
|
||||||
import de.hsadmin.module.property.ReadWritePolicy;
|
import de.hsadmin.module.property.ReadWritePolicy;
|
||||||
import de.hsadmin.module.property.Required;
|
import de.hsadmin.module.property.Required;
|
||||||
@ -26,6 +29,11 @@ public class ContactVO extends AbstractVO implements ValueObject {
|
|||||||
@Search(SearchPolicy.EQUALS)
|
@Search(SearchPolicy.EQUALS)
|
||||||
private String customer;
|
private String customer;
|
||||||
|
|
||||||
|
@Pattern(regexp="[a-z0-9\\-]*")
|
||||||
|
@Size(min=0,max=40)
|
||||||
|
@ReadWrite(ReadWritePolicy.READWRITE)
|
||||||
|
private String login;
|
||||||
|
|
||||||
@Pattern(regexp="[A-Za-z]*")
|
@Pattern(regexp="[A-Za-z]*")
|
||||||
@Size(min=0,max=16)
|
@Size(min=0,max=16)
|
||||||
@ReadWrite(ReadWritePolicy.READWRITE)
|
@ReadWrite(ReadWritePolicy.READWRITE)
|
||||||
@ -104,6 +112,10 @@ public class ContactVO extends AbstractVO implements ValueObject {
|
|||||||
@ReadWrite(ReadWritePolicy.READWRITE)
|
@ReadWrite(ReadWritePolicy.READWRITE)
|
||||||
private final StringSet roles;
|
private final StringSet roles;
|
||||||
|
|
||||||
|
@ReadWrite(ReadWritePolicy.READWRITE)
|
||||||
|
@ElementsType(PacAdministrationVO.class)
|
||||||
|
private List<PacAdministrationVO> pacAdminList;
|
||||||
|
|
||||||
public ContactVO() throws TechnicalException {
|
public ContactVO() throws TechnicalException {
|
||||||
super();
|
super();
|
||||||
roles = new StringSet();
|
roles = new StringSet();
|
||||||
@ -117,6 +129,14 @@ public class ContactVO extends AbstractVO implements ValueObject {
|
|||||||
this.customer = customer;
|
this.customer = customer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getLogin() {
|
||||||
|
return login;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLogin(String login) {
|
||||||
|
this.login = login;
|
||||||
|
}
|
||||||
|
|
||||||
public String getSalut() {
|
public String getSalut() {
|
||||||
return salut;
|
return salut;
|
||||||
}
|
}
|
||||||
@ -245,4 +265,12 @@ public class ContactVO extends AbstractVO implements ValueObject {
|
|||||||
roles.setStrings(changedRoles);
|
roles.setStrings(changedRoles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<PacAdministrationVO> getPacAdminList() {
|
||||||
|
return pacAdminList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPacAdminList(List<PacAdministrationVO> pacAdminList) {
|
||||||
|
this.pacAdminList = pacAdminList;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,63 @@
|
|||||||
|
package de.hsadmin.service.customer;
|
||||||
|
|
||||||
|
import de.hsadmin.common.error.TechnicalException;
|
||||||
|
import de.hsadmin.module.ValueObject;
|
||||||
|
import de.hsadmin.module.impl.AbstractVO;
|
||||||
|
import de.hsadmin.module.property.ReadWrite;
|
||||||
|
import de.hsadmin.module.property.ReadWritePolicy;
|
||||||
|
import de.hsadmin.module.property.mapping.DefaultStringParameterMapMapper;
|
||||||
|
import de.hsadmin.module.property.mapping.Mapping;
|
||||||
|
import de.hsadmin.module.property.mapping.ReferredStringPersistentObjectMapper;
|
||||||
|
|
||||||
|
public class PacAdministrationVO extends AbstractVO implements ValueObject {
|
||||||
|
|
||||||
|
@Mapping(
|
||||||
|
boMapping=ReferredStringPersistentObjectMapper.class,
|
||||||
|
rpcMapping=DefaultStringParameterMapMapper.class,
|
||||||
|
boMappingPath="contact.customer.name")
|
||||||
|
@ReadWrite(ReadWritePolicy.READ)
|
||||||
|
private String customer;
|
||||||
|
|
||||||
|
@Mapping(
|
||||||
|
boMapping=ReferredStringPersistentObjectMapper.class,
|
||||||
|
rpcMapping=DefaultStringParameterMapMapper.class,
|
||||||
|
boMappingPath="contact.login")
|
||||||
|
@ReadWrite(ReadWritePolicy.READ)
|
||||||
|
private String contactLogin;
|
||||||
|
|
||||||
|
@Mapping(
|
||||||
|
boMapping=ReferredStringPersistentObjectMapper.class,
|
||||||
|
rpcMapping=DefaultStringParameterMapMapper.class,
|
||||||
|
boMappingPath="pac.name")
|
||||||
|
@ReadWrite(ReadWritePolicy.READ)
|
||||||
|
private String packetName;
|
||||||
|
|
||||||
|
public PacAdministrationVO() throws TechnicalException {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCustomer() {
|
||||||
|
return customer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustomer(String customer) {
|
||||||
|
this.customer = customer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContactLogin() {
|
||||||
|
return contactLogin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContactLogin(String contactLogin) {
|
||||||
|
this.contactLogin = contactLogin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPacketName() {
|
||||||
|
return packetName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPacketName(String packetName) {
|
||||||
|
this.packetName = packetName;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user