public class Schema extends AbstractDbObject implements java.lang.Iterable
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
dbPrefix |
protected java.util.List |
objects |
protected int |
version |
comparisonUtils| Constructor and Description |
|---|
Schema(java.lang.String name)
Construct a schema with the given name and no database prefix.
|
Schema(java.lang.String name,
java.lang.String dbPrefix,
int schemaVersion)
Construct a schema with the given name and database prefix.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(DbObjectVisitor visitor)
Allows a visitor to be invoked against this DbObject.
|
void |
add(DbObject dbObject)
Add an object to this schema - this method will set this schema
as the object's parent.
|
boolean |
contains(DbObject object) |
boolean |
containsByName(java.lang.String name) |
protected void |
doDiff(DbObject right,
DiffContext ctx)
Override this method to provide subclass specific diffing logic.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDbPrefix() |
int |
getVersion() |
int |
hashCode() |
java.util.Iterator |
iterator() |
boolean |
sameAs(DbObject other)
Are the two
DbObjects logically the same? For example two Index objects may have
different names, but are the same index as they both index the same columns for the same table. |
diff, getName, getParent, getTypeName, getValidators, hasObjectLevelValidator, hasValidators, setComparisonUtils, setName, setParent, setValidators, toStringprotected final java.util.List objects
protected final java.lang.String dbPrefix
protected final int version
public Schema(java.lang.String name)
name - public Schema(java.lang.String name,
java.lang.String dbPrefix,
int schemaVersion)
name - dbPrefix - public void add(DbObject dbObject)
dbObject - public java.util.Iterator iterator()
iterator in interface java.lang.Iterablepublic boolean contains(DbObject object)
identifier - public java.lang.String getDbPrefix()
public int getVersion()
public int hashCode()
hashCode in class AbstractDbObjectpublic boolean equals(java.lang.Object obj)
equals in class AbstractDbObjectprotected void doDiff(DbObject right, DiffContext ctx)
AbstractDbObjectdoDiff in class AbstractDbObjectpublic void accept(DbObjectVisitor visitor)
DbObjectpublic boolean sameAs(DbObject other)
DbObjectDbObjects logically the same? For example two Index objects may have
different names, but are the same index as they both index the same columns for the same table.
If two objects a and b have the same logical identity, it does not mean that a.equals(b) == true.
The two objects may well have differences and will be flagged as such by the schema comparison tool. When
a.sameAs(b) == true it makes it easier to show the differences as related, i.e. a and b are
different rather than, a is only in the 'left' tree and b is only in the 'right' tree.
sameAs in interface DbObjectsameAs in class AbstractDbObjectpublic boolean containsByName(java.lang.String name)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.