1 64 65 package com.jcorporate.expresso.ext.dbobj; 66 67 import com.jcorporate.expresso.core.db.DBConnection; 68 import com.jcorporate.expresso.core.db.DBException; 69 import com.jcorporate.expresso.core.dbobj.DBObject; 70 import com.jcorporate.expresso.core.dbobj.SecuredDBObject; 71 72 import java.util.Vector ; 73 74 79 public class AuditLogL extends SecuredDBObject { 80 81 86 public AuditLogL() throws DBException { 87 super(); 88 } 89 90 91 99 public AuditLogL(DBConnection theConnection) throws DBException { 100 super(theConnection); 101 } 102 103 104 107 protected synchronized void setupFields() throws DBException { 108 setTargetTable("AUDITLOG_L"); 109 110 setDescription("AuditLog Code Lookup"); 111 112 addField("AUDITLOG_CODE", "char", 5, false, "AuditLog Code"); 113 addField("AUDITLOG_DES", "varchar", 250, false, "AuditLog Code Description"); 115 117 addKey("AUDITLOG_CODE"); 118 } 119 120 123 public Vector getValues() throws DBException { 124 return getValuesDefault("AUDITLOG_CODE", "AUDITLOG_DES"); 125 } 126 127 131 134 public synchronized void populateDefaultValues() throws DBException { 135 this.clear(); 136 this.setField("AUDITLOG_CODE", "ADD"); 137 if (!this.find()) { 138 setField("AUDITLOG_DES", "ADD"); 139 this.add(); 140 } 141 this.clear(); 142 this.setField("AUDITLOG_CODE", "DEL"); 143 if (!this.find()) { 144 setField("AUDITLOG_DES", "DELETE"); 145 this.add(); 146 } 147 this.clear(); 148 this.setField("AUDITLOG_CODE", "UPT"); 149 if (!this.find()) { 150 setField("AUDITLOG_DES", "UPDATE"); 151 this.add(); 152 } 153 } 154 155 156 157 163 public DBObject getThisDBObj() throws DBException { 164 return new AuditLogL(); 165 } 166 } 167 168 172 173 | Popular Tags |