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.SiteNodeTypeDefinitionImpl; 28 import org.infoglue.cms.exception.ConstraintException; 29 import org.infoglue.cms.util.ConstraintExceptionBuffer; 30 import org.infoglue.cms.util.validators.ValidatorFactory; 31 32 public class SiteNodeTypeDefinitionVO implements BaseEntityVO 33 { 34 35 private java.lang.Integer siteNodeTypeDefinitionId; 36 private java.lang.String invokerClassName; 37 private java.lang.String name; 38 private java.lang.String description; 39 40 public String toString() 41 { 42 return getName(); 43 } 44 45 48 public Integer getId() { 49 return getSiteNodeTypeDefinitionId(); 50 } 51 52 public java.lang.Integer getSiteNodeTypeDefinitionId() 53 { 54 return this.siteNodeTypeDefinitionId; 55 } 56 57 public void setSiteNodeTypeDefinitionId(java.lang.Integer siteNodeTypeDefinitionId) 58 { 59 this.siteNodeTypeDefinitionId = siteNodeTypeDefinitionId; 60 } 61 62 public java.lang.String getName() 63 { 64 return this.name; 65 } 66 67 public void setName(java.lang.String name) throws ConstraintException 68 { 69 ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer(); 70 71 ValidatorFactory.createStringValidator("SiteNodeTypeDefinition.name", true, 6, 30).validate(name, ceb); 72 73 ceb.throwIfNotEmpty(); 74 this.name = name; 75 76 } 77 78 public java.lang.String getDescription() 79 { 80 return this.description; 81 } 82 83 public void setDescription(java.lang.String description) throws ConstraintException 84 { 85 ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer(); 86 ValidatorFactory.createStringValidator("SiteNodeTypeDefinition.description", true, 6, 255).validate(description, ceb); 87 88 ceb.throwIfNotEmpty(); 89 this.description = description; 90 91 } 92 93 public java.lang.String getInvokerClassName() 94 { 95 return this.invokerClassName; 96 } 97 98 public void setInvokerClassName(java.lang.String invokerClassName) throws ConstraintException 99 { 100 ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer(); 101 ValidatorFactory.createStringValidator("SiteNodeTypeDefinition.invokerClassName", true, 6, 100).validate(invokerClassName, ceb); 102 103 ceb.throwIfNotEmpty(); 104 this.invokerClassName = invokerClassName; 105 106 } 107 110 public ConstraintExceptionBuffer validate() 111 { 112 ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer(); 113 if (name != null) ValidatorFactory.createStringValidator("SiteNodeTypeDefinition.name", true, 6, 30, true, SiteNodeTypeDefinitionImpl.class, this.getId(), null).validate(name, ceb); 114 115 return ceb; 116 } 117 118 } 119 120 | Popular Tags |