クラス org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema

すべてのメンバ一覧

説明

A CacheDatabaseSchema describes all the tables and columns of a database and its associated cache entries.

作者:
Emmanuel Cecchet
バージョン:
1.0

CacheDatabaseSchema.java41 行で定義されています。

Public メソッド

 CacheDatabaseSchema (DatabaseSchema dbs)
void addTable (CacheDatabaseTable table)
void removeTable (CacheDatabaseTable table)
void mergeSchema (CacheDatabaseSchema databaseSchema) throws SQLException
ArrayList getTables ()
CacheDatabaseTable getTable (String tableName)
boolean hasTable (String tableName)
boolean equals (Object other)
String getInformation (boolean longFormat)

Private 変数

ArrayList tables


コンストラクタとデストラクタ

org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.CacheDatabaseSchema DatabaseSchema  dbs  ) 
 

Creates a new CacheDatabaseSchema instance by cloning an existing DatabaseSchema.

引数:
dbs the DatabaseSchema to clone
CacheDatabaseSchema.java52 行で定義されています。

参照先 org.objectweb.cjdbc.common.sql.schema.DatabaseSchema.getTables(), と org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.tables.

00053 { 00054 if (dbs == null) 00055 { 00056 tables = new ArrayList(); 00057 return; 00058 } 00059 00060 // Clone the tables 00061 ArrayList origTables = dbs.getTables(); 00062 int size = origTables.size(); 00063 tables = new ArrayList(size); 00064 for (int i = 0; i < size; i++) 00065 tables.add(new CacheDatabaseTable((DatabaseTable) origTables.get(i))); 00066 }


メソッド

void org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.addTable CacheDatabaseTable  table  ) 
 

Adds a CacheDatabaseTable describing a table of the database.

引数:
table the table to add
CacheDatabaseSchema.java74 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.tables.

参照元 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.mergeSchema().

00075 { 00076 tables.add(table); 00077 }

boolean org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.equals Object  other  ) 
 

Two CacheDatabaseSchema are equals if they have the same tables.

引数:
other the object to compare with
戻り値:
true if the 2 objects are the same.
CacheDatabaseSchema.java176 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.getTables(), と org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.tables.

00177 { 00178 if (!(other instanceof CacheDatabaseSchema)) 00179 return false; 00180 00181 if (tables == null) 00182 return ((CacheDatabaseSchema) other).getTables() == null; 00183 else 00184 return tables.equals(((CacheDatabaseSchema) other).getTables()); 00185 }

String org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.getInformation boolean  longFormat  ) 
 

Returns information about the database schema.

引数:
longFormat true for a long format, false for a short summary
戻り値:
a String value
CacheDatabaseSchema.java194 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseTable.getInformation(), と org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.tables.

00195 { 00196 String result = ""; 00197 int size = tables.size(); 00198 for (int i = 0; i < size; i++) 00199 { 00200 CacheDatabaseTable t = (CacheDatabaseTable) tables.get(i); 00201 result += t.getInformation(longFormat) + "\n"; 00202 } 00203 return result; 00204 }

CacheDatabaseTable org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.getTable String  tableName  ) 
 

Returns the CacheDatabaseTable object matching the given table name or null if not found.

引数:
tableName the table name to look for
戻り値:
a CacheDatabaseTable value or null
CacheDatabaseSchema.java138 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseTable.getName(), と org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.tables.

参照元 org.objectweb.cjdbc.controller.cache.result.ResultCacheColumnUnique.isUpdateNecessary(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.mergeSchema(), org.objectweb.cjdbc.controller.cache.result.ResultCacheTable.processAddToCache(), org.objectweb.cjdbc.controller.cache.result.ResultCacheColumnUnique.processAddToCache(), org.objectweb.cjdbc.controller.cache.result.ResultCacheColumn.processAddToCache(), org.objectweb.cjdbc.controller.cache.result.ResultCacheTable.processWriteNotify(), org.objectweb.cjdbc.controller.cache.result.ResultCacheColumnUnique.processWriteNotify(), と org.objectweb.cjdbc.controller.cache.result.ResultCacheColumn.processWriteNotify().

00139 { 00140 int size = tables.size(); 00141 for (int i = 0; i < size; i++) 00142 { 00143 CacheDatabaseTable t = (CacheDatabaseTable) tables.get(i); 00144 if (t.getName().compareTo(tableName) == 0) 00145 return t; 00146 } 00147 return null; 00148 }

ArrayList org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.getTables  ) 
 

Returns an ArrayList of CacheDatabaseTable objects describing the database.

戻り値:
an ArrayList of CacheDatabaseTable
CacheDatabaseSchema.java126 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.tables.

参照元 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.equals().

00127 { 00128 return tables; 00129 }

boolean org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.hasTable String  tableName  ) 
 

Returns true if the given TableName is found in this schema.

引数:
tableName the name of the table you are looking for
戻り値:
true if the table has been found
CacheDatabaseSchema.java157 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseTable.getName(), と org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.tables.

00158 { 00159 int size = tables.size(); 00160 for (int i = 0; i < size; i++) 00161 { 00162 CacheDatabaseTable t = (CacheDatabaseTable) tables.get(i); 00163 if (tableName.equals(t.getName())) 00164 return true; 00165 } 00166 return false; 00167 }

void org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.mergeSchema CacheDatabaseSchema  databaseSchema  )  throws SQLException
 

Merge the given schema with the current one. All missing tables or columns are added if no conflict is detected. An exception is thrown if the given schema definition conflicts with the current one.

引数:
databaseSchema the schema to merge
例外:
SQLException if the schemas conflict
CacheDatabaseSchema.java98 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.addTable(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseTable.getName(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.getTable(), と org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseTable.mergeColumns().

00100 { 00101 if (databaseSchema == null) 00102 return; 00103 00104 ArrayList otherTables = databaseSchema.getTables(); 00105 if (otherTables == null) 00106 return; 00107 00108 int size = otherTables.size(); 00109 for (int i = 0; i < size; i++) 00110 { 00111 CacheDatabaseTable t = (CacheDatabaseTable) otherTables.get(i); 00112 CacheDatabaseTable original = getTable(t.getName()); 00113 if (original == null) 00114 addTable(t); 00115 else 00116 original.mergeColumns(t); 00117 } 00118 }

void org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.removeTable CacheDatabaseTable  table  ) 
 

Removes a CacheDatabaseTable describing a table of the database.

引数:
table the table to remove
CacheDatabaseSchema.java85 行で定義されています。

参照先 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.tables.

00086 { 00087 tables.remove(table); 00088 }


変数

ArrayList org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.tables [private]
 

Database tables. CacheDatabaseSchema.java44 行で定義されています。

参照元 org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.addTable(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.CacheDatabaseSchema(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.equals(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.getInformation(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.getTable(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.getTables(), org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.hasTable(), と org.objectweb.cjdbc.controller.cache.result.schema.CacheDatabaseSchema.removeTable().


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0.4に対してTue Oct 12 15:16:39 2004に生成されました。 doxygen 1.3.8