1 23 24 package org.infoglue.cms.entities.management; 25 26 import org.infoglue.cms.entities.kernel.BaseEntityVO; 27 import org.infoglue.cms.entities.management.impl.simple.ServerNodeImpl; 28 import org.infoglue.cms.util.ConstraintExceptionBuffer; 29 import org.infoglue.cms.util.validators.ValidatorFactory; 30 31 public class ServerNodeVO implements BaseEntityVO 32 { 33 private java.lang.Integer serverNodeId; 34 private java.lang.String name; 35 private java.lang.String description; 36 private java.lang.String dnsName; 37 38 41 42 public Integer getId() 43 { 44 return getServerNodeId(); 45 } 46 47 public String toString() 48 { 49 return getName(); 50 } 51 52 public java.lang.Integer getServerNodeId() 53 { 54 return this.serverNodeId; 55 } 56 57 public void setServerNodeId(java.lang.Integer serverNodeId) 58 { 59 this.serverNodeId = serverNodeId; 60 } 61 62 public java.lang.String getName() 63 { 64 return this.name; 65 } 66 67 public void setName(java.lang.String name) 68 { 69 this.name = name; 70 } 71 72 public java.lang.String getDescription() 73 { 74 return description; 75 } 76 public void setDescription(java.lang.String description) 77 { 78 this.description = description; 79 } 80 81 public java.lang.String getDnsName() 82 { 83 return this.dnsName; 84 } 85 86 public void setDnsName(java.lang.String dnsName) 87 { 88 this.dnsName = dnsName; 89 } 90 91 94 public ConstraintExceptionBuffer validate() 95 { 96 ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer(); 97 98 ValidatorFactory.createStringValidator("ServerNode.name", true, 6, 20, true, ServerNodeImpl.class, this.getId(), null).validate(this.name, ceb); 99 ValidatorFactory.createStringValidator("ServerNode.description", true, 1, 100).validate(description, ceb); 100 if(dnsName != null) 101 ValidatorFactory.createStringValidator("ServerNode.dnsName", false, 0, 200).validate(dnsName, ceb); 102 103 return ceb; 104 } 105 106 } 107 108 | Popular Tags |