1 4 package com.tc.config.schema.test; 5 6 import com.tc.config.schema.builder.DSOApplicationConfigBuilder; 7 import com.tc.config.schema.builder.SpringConfigBuilder; 8 9 public class ApplicationConfigBuilder extends BaseConfigBuilder { 10 11 public ApplicationConfigBuilder() { 12 super(1, ALL_PROPERTIES); 13 } 14 15 public void setDSO(String value) { 16 setProperty("dso", value); 17 } 18 19 public void setDSO(DSOApplicationConfigBuilder value) { 20 setProperty("dso", value); 21 } 22 23 public DSOApplicationConfigBuilder getDSO() { 24 if (! isSet("dso")) setDSO(DSOApplicationConfigBuilderImpl.newMinimalInstance()); 25 return (DSOApplicationConfigBuilder) getRawProperty("dso"); 26 } 27 28 public void setSpring(String value) { 29 setProperty("spring", value); 30 } 31 32 public void setSpring(SpringConfigBuilder value) { 33 setProperty("spring", value); 34 } 35 36 public SpringConfigBuilder getSpring() { 37 if (! isSet("spring")) setSpring(SpringConfigBuilderImpl.newMinimalInstance()); 38 return (SpringConfigBuilder) getRawProperty("spring"); 39 } 40 41 private static final String [] ALL_PROPERTIES = new String [] { "dso", "spring" }; 42 43 public String toString() { 44 return elements(ALL_PROPERTIES); 45 } 46 47 public static ApplicationConfigBuilder newMinimalInstance() { 48 return new ApplicationConfigBuilder(); 49 } 50 51 } 52 | Popular Tags |