1 21 22 package org.apache.derby.iapi.sql.dictionary; 23 24 import org.apache.derby.iapi.error.StandardException; 25 import org.apache.derby.iapi.sql.depend.Provider; 26 import org.apache.derby.catalog.UUID; 27 28 import org.apache.derby.iapi.reference.SQLState; 29 import org.apache.derby.iapi.services.sanity.SanityManager; 30 import org.apache.derby.iapi.sql.StatementType; 31 import org.apache.derby.catalog.DependableFinder; 32 import org.apache.derby.catalog.Dependable; 33 import org.apache.derby.iapi.services.io.StoredFormatIds; 34 35 38 public final class FileInfoDescriptor extends TupleDescriptor 39 implements Provider, UniqueSQLObjectDescriptor 40 { 41 42 public static final int JAR_FILE_TYPE = 0; 43 44 49 private final UUID id; 50 private final SchemaDescriptor sd; 51 private final String sqlName; 52 private final long generationId; 53 54 64 65 public FileInfoDescriptor(DataDictionary dataDictionary, 66 UUID id, 67 SchemaDescriptor sd, 68 String sqlName, 69 long generationId) 70 { 71 super( dataDictionary ); 72 73 if (SanityManager.DEBUG) 74 { 75 if (sd.getSchemaName() == null) 76 { 77 SanityManager.THROWASSERT("new FileInfoDescriptor() schema "+ 78 "name is null for FileInfo "+sqlName); 79 } 80 } 81 this.id = id; 82 this.sd = sd; 83 this.sqlName = sqlName; 84 this.generationId = generationId; 85 } 86 87 public SchemaDescriptor getSchemaDescriptor() 88 { 89 return sd; 90 } 91 92 public String getName() 93 { 94 return sqlName; 95 } 96 97 100 public UUID getUUID() 101 { 102 return id; 103 } 104 105 112 public long getGenerationId() 113 { 114 return generationId; 115 } 116 117 121 124 public DependableFinder getDependableFinder() 125 { 126 return getDependableFinder(StoredFormatIds.FILE_INFO_FINDER_V01_ID); 127 } 128 129 132 public String getObjectName() 133 { 134 return sqlName; 135 } 136 137 140 public UUID getObjectID() 141 { 142 return id; 143 } 144 145 148 public String getClassType() 149 { 150 return Dependable.FILE; 151 } 152 153 157 158 159 public String getDescriptorType() { return "Jar file"; } 160 161 162 public String getDescriptorName() { return sqlName; } 163 164 165 166 } 167 | Popular Tags |