1 64 65 package com.jcorporate.expresso.services.dbobj; 66 67 import com.jcorporate.expresso.core.controller.ControllerRequest; 68 import com.jcorporate.expresso.core.db.DBException; 69 import com.jcorporate.expresso.core.dbobj.SecuredDBObject; 70 import com.jcorporate.expresso.core.dbobj.ValidValue; 71 72 import java.util.Vector ; 73 74 75 84 public class CacheSync 85 extends SecuredDBObject { 86 89 public CacheSync() 90 throws DBException { 91 super(); 92 } 93 94 100 public CacheSync(int uid) 101 throws DBException { 102 super(uid); 103 } 104 105 112 public CacheSync(ControllerRequest request) 113 throws DBException { 114 super(request); 115 } 116 117 125 public synchronized Vector getValidValues(String fieldName) 126 throws DBException { 127 if (fieldName.equals("Protocol")) { 128 Vector myValues = new Vector (4); 129 myValues.addElement(new ValidValue("http", "HTTP")); 130 myValues.addElement(new ValidValue("jobqueue", 131 getString("Via_Job_Queue"))); 132 133 return myValues; 134 } 135 136 return super.getValidValues(fieldName); 137 } 138 139 140 145 public void setupFields() 146 throws DBException { 147 setTargetTable("CACHESYNC"); 148 setDescription("Cache_Synchronization_Entries"); 149 setCharset("ISO-8859-1"); 150 addField("Protocol", "varchar", 30, false, "Synchronize_Protocol"); 151 addField("ServerName", "varchar", 80, false, 152 "Server_Name_to_Sync_With"); 153 addField("ContextPath", "varchar", 80, false, "Context_Path"); 154 addField("PortNumber", "int", 0, false, "Port_Number"); 155 addField("SyncParameter", "varchar", 132, true, 156 "Additional_Parameters"); 157 addKey("Protocol"); 158 addKey("ServerName"); 159 addKey("PortNumber"); 160 addKey("ContextPath"); 161 } 162 163 164 } 165 166 | Popular Tags |