View Javadoc
1 /* 2 * Created on 2003-6-20 17:16:03 by joel guo 3 * 4 * vTradEx Information Technology Inc. 5 */ 6 package com.cyclops.dbdigger.model.base.metadata; 7 import com.cyclops.dbdigger.model.DBObject1Metadata; 8 import com.cyclops.dbdigger.model.DefaultDatabase; 9 import com.cyclops.dbdigger.schema.Column; 10 import com.cyclops.dbdigger.schema.Database; 11 import com.cyclops.dbdigger.schema.Table; 12 /*** Add description <font color="red">HERE</font>! 13 * 14 * @author <a href="mailto:joeblack.guo@vtradex.com">joel guo</a> 15 * @since 2003-6-20 17:16:03 16 */ 17 public class BaseDBObject1Metadata implements Table { 18 private static Table getTableFromSchema() { 19 return DATABASE.getTable(DBObject1Metadata.NAME); 20 } 21 /*** Database instance*/ 22 public static final Database DATABASE = DefaultDatabase.INSTANCE; 23 /*** Self instance */ 24 public static final DBObject1Metadata INSTANCE = new DBObject1Metadata(); 25 /*** Name of table */ 26 public static final String NAME = "c_foo_object1s"; 27 /*** Description of table */ 28 public static final String DESCRIPTION = ""; 29 /*** Java class name of table */ 30 public static final String JAVA_CLASS_NAME = 31 "com.cyclops.dbdigger.model.DBObject1"; 32 /*** Primary key of table */ 33 public static final Column PRIMARY_KEY = 34 getTableFromSchema().getPrimaryKey(); 35 /*** ID Column */ 36 public static final Column ID = getTableFromSchema().getColumn("id"); 37 /*** OBJECT_NAME Column */ 38 public static final Column OBJECT_NAME = 39 getTableFromSchema().getColumn("object_name"); 40 /*** Override method getColumn() of super class 41 * @see com.cyclops.dbdigger.schema.Table#getColumn(java.lang.String) 42 */ 43 public Column getColumn(String columnName) { 44 return getTableFromSchema().getColumn(columnName); 45 } 46 /*** Override method getColumns() of super class 47 * @see com.cyclops.dbdigger.schema.Table#getColumns() 48 */ 49 public Column[] getColumns() { 50 return getDatabase().getTable(getName()).getColumns(); 51 } 52 /*** Override method getDatabase() of super class 53 * @see com.cyclops.dbdigger.schema.Table#getDatabase() 54 */ 55 public Database getDatabase() { 56 return DATABASE; 57 } 58 /*** Override method getDescription() of super class 59 * @see com.cyclops.dbdigger.schema.Table#getDescription() 60 */ 61 public String getDescription() { 62 return DESCRIPTION; 63 } 64 /*** Override method getJavaClassName() of super class 65 * @see com.cyclops.dbdigger.schema.Table#getJavaClassName() 66 */ 67 public String getJavaClassName() { 68 return JAVA_CLASS_NAME; 69 } 70 /*** Override method getName() of super class 71 * @see com.cyclops.dbdigger.schema.Table#getName() 72 */ 73 public String getName() { 74 return NAME; 75 } 76 /*** Override method getPrimaryKey() of super class 77 * @see com.cyclops.dbdigger.schema.Table#getPrimaryKey() 78 */ 79 public Column getPrimaryKey() { 80 return PRIMARY_KEY; 81 } 82 }

This page was automatically generated by Maven