WebObjects 5.4.2

com.webobjects.eoaccess.synchronization
Class EOSchemaSynchronizationTableChanges

java.lang.Object
  extended by com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationChanges
      extended by com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationTableChanges
All Implemented Interfaces:
NSKeyValueCoding, NSKeyValueCodingAdditions

public class EOSchemaSynchronizationTableChanges
extends EOSchemaSynchronizationChanges

Encapsulates the changes between the previous schema including table names, indexes, columns and constraints.

Since:
5.4

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
 
Field Summary
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Constructor Summary
EOSchemaSynchronizationTableChanges(String name)
           
 
Method Summary
 void addToDeletedColumnNames(String value)
          Adds a column name to the list of column to be deleted.
 void addToDeletedForeignKeyConstrainNames(String value)
          Adds a foreign key constraint name to the list of foreign key constraint to be deleted.
 void addToDeletedIndexNames(String value)
          Adds a index name to the list of index to be deleted.
 void addToInsertedColumnNames(String value)
          Adds a column name to the list of column to be inserted.
 void addToInsertedForeignKeyConstrainNames(String value)
          Adds a foreign key constraint name to the list of foreign key constraint to be inserted.
 void addToInsertedIndexNames(String value)
          Adds a index name to the list of index to be inserted.
 void addToUpdatedColumnNames(String value, EOSchemaSynchronizationColumnChanges change)
          Adds a column name to the list of column to be updated.
 EOSchemaSynchronizationColumnChanges changesForColumnNamed(String value)
          Returns the changes for the named column.
 Set deletedColumnNames()
          Returns the list of column to be deleted.
 Iterator deletedColumnNamesIterator()
          Returns an iterator on the list of column names to be deleted.
 Set deletedForeignKeyConstrainNames()
          Returns the list of foreign key constraint to be deleted.
 Iterator deletedForeignKeyConstrainNamesIterator()
          Returns an iterator on the list of foreign key constraint names to be deleted.
 Set deletedIndexNames()
          Returns the list of index to be deleted.
 Iterator deletedIndexNamesIterator()
          Returns an iterator on the list of index names to be deleted.
 void fieldsToString(StringBuilder aLog)
           
 boolean hasColunmDeleted()
          Checks if there are deleted columns.
 boolean hasColunmInserted()
          Checks if there are inserted columns.
 boolean hasColunmUpdated()
          Checks if there are updated columns.
 boolean hasForeignKeyConstrainsDeleted()
          Checks if there are deleted foreign key constraint.
 boolean hasForeignKeyConstrainsInserted()
          Checks if there are foreign key constraint indexes.
 boolean hasIndexesDeleted()
          Checks if there are deleted indexes.
 boolean hasIndexesInserted()
          Checks if there are inserted indexes.
 Set insertedColumnNames()
          Returns the list of column to be inserted.
 Iterator insertedColumnNamesIterator()
          Returns an iterator on the list of column names to be inserted.
 Set insertedForeignKeyConstrainNames()
          Returns the list of foreign key constraint to be inserted.
 Iterator insertedForeignKeyConstrainNamesIterator()
          Returns an iterator on the list of foreign key constraint names to be inserted.
 Set insertedIndexNames()
          Returns the list of index to be inserted.
 Iterator insertedIndexNamesIterator()
          Returns an iterator on the list of index names to be inserted.
 boolean isColumnNamedDeleted(String value)
          Checks if a column is to be deleted.
 boolean isColumnNamedInserted(String value)
          Checks if a column is to be inserted.
 boolean isColumnNamedUpdated(String value)
          Checks if a column is to be updated.
 boolean isEmpty()
          Checks if there is any changes defined by this structrure
 boolean isForeignKeyConstrainNamedDeleted(String value)
          Checks if a foreign key constraint is to be deleted.
 boolean isForeignKeyConstrainNamedInserted(String value)
          Checks if a foreign key constraint is to be inserted.
 boolean isIndexNamedDeleted(String value)
          Checks if a index is to be deleted.
 boolean isIndexNamedInserted(String value)
          Checks if a index is to be inserted.
 boolean isOnlyForeignKeyRelated()
          Checks if there is the changes defined by this structrure are only foreign key related
 boolean isRename()
          Checks if this is a table rename
 String name()
           
 EOSchemaSynchronizationColumnChanges newChangesForColumn(String value)
          Returns the newly initialized change object.
 String oldName()
          Returns the old name of the table
 void removeFromDeletedColumnNames(String value)
          Removes a column name from the list of column to be deleted.
 void removeFromDeletedForeignKeyConstrainNames(String value)
          Removes a foreign key constraint name from the list of foreign key constraint to be deleted.
 void removeFromDeletedIndexNames(String value)
          Removes a index name from the list of index to be deleted.
 void removeFromInsertedColumnNames(String value)
          Removes a column name from the list of column to be inserted.
 void removeFromInsertedForeignKeyConstrainNames(String value)
          Removes a foreign key constraint name from the list of foreign key constraint to be inserted.
 void removeFromInsertedIndexNames(String value)
          Removes a index name from the list of index to be inserted.
 void removeFromUpdatedColumnNames(String value)
          Removes a column name from the list of column to be updated.
 void setDeletedColumnNames(Collection value)
          Set the deleted column names.
 void setDeletedForeignKeyConstrainNames(Collection value)
          Set the deleted foreign key constraint names.
 void setDeletedIndexNames(Collection value)
          Set the deleted index names.
 void setInsertedColumnNames(Collection value)
          Set the inserted column names.
 void setInsertedForeignKeyConstrainNames(Collection value)
          Set the inserted foreign key constraint names.
 void setInsertedIndexNames(Collection value)
          Set the inserted index names.
 void setOldName(String value)
          Sets the old name of the table
 void setUpdatedColumnNames(Map value)
          Set the updated column names and updates descriptions.
 Set updatedColumnNames()
          Returns the list of columns to be updated.
 Iterator updatedColumnNamesIterator()
          Returns an iterator on the list of column names to be updated.
 
Methods inherited from class com.webobjects.eoaccess.synchronization.EOSchemaSynchronizationChanges
takeValueForKey, takeValueForKeyPath, toString, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EOSchemaSynchronizationTableChanges

public EOSchemaSynchronizationTableChanges(String name)
Method Detail

name

public String name()

isEmpty

public boolean isEmpty()
Checks if there is any changes defined by this structrure

Specified by:
isEmpty in class EOSchemaSynchronizationChanges
Returns:
true if there are changes

isOnlyForeignKeyRelated

public boolean isOnlyForeignKeyRelated()
Checks if there is the changes defined by this structrure are only foreign key related

Returns:
true if changes are only foreign key related

oldName

public String oldName()
Returns the old name of the table

Returns:
the oldName

setOldName

public void setOldName(String value)
Sets the old name of the table

Parameters:
value - the oldName to set

isRename

public boolean isRename()
Checks if this is a table rename

Returns:
true is this is a rename

newChangesForColumn

public EOSchemaSynchronizationColumnChanges newChangesForColumn(String value)
Returns the newly initialized change object. This object is not inserted in the update list. This is to facilitate subclassing.

Parameters:
value - column name
Returns:
a new change object

updatedColumnNames

public Set updatedColumnNames()
Returns the list of columns to be updated.

Returns:
column name list

setUpdatedColumnNames

public void setUpdatedColumnNames(Map value)
Set the updated column names and updates descriptions.

Parameters:
value - column name dictionary

addToUpdatedColumnNames

public void addToUpdatedColumnNames(String value,
                                    EOSchemaSynchronizationColumnChanges change)
Adds a column name to the list of column to be updated.

Parameters:
value - column name
change - change description

removeFromUpdatedColumnNames

public void removeFromUpdatedColumnNames(String value)
Removes a column name from the list of column to be updated.

Parameters:
value - column name

changesForColumnNamed

public EOSchemaSynchronizationColumnChanges changesForColumnNamed(String value)
Returns the changes for the named column. If there are no changes returns an empty Object.

Parameters:
value - column name
Returns:
change object

updatedColumnNamesIterator

public Iterator updatedColumnNamesIterator()
Returns an iterator on the list of column names to be updated.

Returns:
column iterator

isColumnNamedUpdated

public boolean isColumnNamedUpdated(String value)
Checks if a column is to be updated.

Parameters:
column - name
Returns:
true if the column is to be updated

hasColunmUpdated

public boolean hasColunmUpdated()
Checks if there are updated columns.

Returns:
true is columns were updated

deletedColumnNames

public Set deletedColumnNames()
Returns the list of column to be deleted.

Returns:
column name list

setDeletedColumnNames

public void setDeletedColumnNames(Collection value)
Set the deleted column names.

Parameters:
value - column name list

addToDeletedColumnNames

public void addToDeletedColumnNames(String value)
Adds a column name to the list of column to be deleted.

Parameters:
column - name

removeFromDeletedColumnNames

public void removeFromDeletedColumnNames(String value)
Removes a column name from the list of column to be deleted.

Parameters:
column - name

deletedColumnNamesIterator

public Iterator deletedColumnNamesIterator()
Returns an iterator on the list of column names to be deleted.

Returns:
column iterator

isColumnNamedDeleted

public boolean isColumnNamedDeleted(String value)
Checks if a column is to be deleted.

Parameters:
column - name
Returns:
true if the column is to be deleted

hasColunmDeleted

public boolean hasColunmDeleted()
Checks if there are deleted columns.

Returns:
true is columns were deleted

insertedColumnNames

public Set insertedColumnNames()
Returns the list of column to be inserted.

Returns:
column name list

setInsertedColumnNames

public void setInsertedColumnNames(Collection value)
Set the inserted column names.

Parameters:
column - name list

addToInsertedColumnNames

public void addToInsertedColumnNames(String value)
Adds a column name to the list of column to be inserted.

Parameters:
column - name

removeFromInsertedColumnNames

public void removeFromInsertedColumnNames(String value)
Removes a column name from the list of column to be inserted.

Parameters:
column - name

insertedColumnNamesIterator

public Iterator insertedColumnNamesIterator()
Returns an iterator on the list of column names to be inserted.

Returns:
column iterator

isColumnNamedInserted

public boolean isColumnNamedInserted(String value)
Checks if a column is to be inserted.

Parameters:
column - name
Returns:
true if the column is to be inserted

hasColunmInserted

public boolean hasColunmInserted()
Checks if there are inserted columns.

Returns:
true is columns were inserted

deletedIndexNames

public Set deletedIndexNames()
Returns the list of index to be deleted.

Returns:
set of deleted index names

setDeletedIndexNames

public void setDeletedIndexNames(Collection value)
Set the deleted index names.

Parameters:
list - of index names to be deleted

addToDeletedIndexNames

public void addToDeletedIndexNames(String value)
Adds a index name to the list of index to be deleted.

Parameters:
value - index name to delete

removeFromDeletedIndexNames

public void removeFromDeletedIndexNames(String value)
Removes a index name from the list of index to be deleted.

Parameters:
value - index name to remove from deletion list

deletedIndexNamesIterator

public Iterator deletedIndexNamesIterator()
Returns an iterator on the list of index names to be deleted.

Returns:
iterator over index names to be deleted

isIndexNamedDeleted

public boolean isIndexNamedDeleted(String value)
Checks if a index is to be deleted.

Parameters:
value - index name
Returns:
true if the index is to be deleted

hasIndexesDeleted

public boolean hasIndexesDeleted()
Checks if there are deleted indexes.

Returns:
true is indexes were deleted

insertedIndexNames

public Set insertedIndexNames()
Returns the list of index to be inserted.

Returns:
list of inserted index names

setInsertedIndexNames

public void setInsertedIndexNames(Collection value)
Set the inserted index names.

Parameters:
list - of inserted index names

addToInsertedIndexNames

public void addToInsertedIndexNames(String value)
Adds a index name to the list of index to be inserted.

Parameters:
name - of index to add to insertion list

removeFromInsertedIndexNames

public void removeFromInsertedIndexNames(String value)
Removes a index name from the list of index to be inserted.

Parameters:
name - of index to remove from list

insertedIndexNamesIterator

public Iterator insertedIndexNamesIterator()
Returns an iterator on the list of index names to be inserted.

Returns:
iterator for inserted index names

isIndexNamedInserted

public boolean isIndexNamedInserted(String value)
Checks if a index is to be inserted.

Parameters:
name - of index
Returns:
true if the index is to be inserted

hasIndexesInserted

public boolean hasIndexesInserted()
Checks if there are inserted indexes.

Returns:
true is indexes were inserted

deletedForeignKeyConstrainNames

public Set deletedForeignKeyConstrainNames()
Returns the list of foreign key constraint to be deleted.

Returns:
foreign key constraint name list

setDeletedForeignKeyConstrainNames

public void setDeletedForeignKeyConstrainNames(Collection value)
Set the deleted foreign key constraint names.

Parameters:
foreign - key constraint name list

addToDeletedForeignKeyConstrainNames

public void addToDeletedForeignKeyConstrainNames(String value)
Adds a foreign key constraint name to the list of foreign key constraint to be deleted.

Parameters:
foreign - key constraint name

removeFromDeletedForeignKeyConstrainNames

public void removeFromDeletedForeignKeyConstrainNames(String value)
Removes a foreign key constraint name from the list of foreign key constraint to be deleted.

Parameters:
foreign - key constraint name

deletedForeignKeyConstrainNamesIterator

public Iterator deletedForeignKeyConstrainNamesIterator()
Returns an iterator on the list of foreign key constraint names to be deleted.

Returns:
foreign key constraint iterator

isForeignKeyConstrainNamedDeleted

public boolean isForeignKeyConstrainNamedDeleted(String value)
Checks if a foreign key constraint is to be deleted.

Parameters:
foreign - key constraint name
Returns:
true if the foreign key constraint is to be deleted

hasForeignKeyConstrainsDeleted

public boolean hasForeignKeyConstrainsDeleted()
Checks if there are deleted foreign key constraint.

Returns:
true is foreign key constraint were deleted

insertedForeignKeyConstrainNames

public Set insertedForeignKeyConstrainNames()
Returns the list of foreign key constraint to be inserted.

Returns:
foreign key constraint name list

setInsertedForeignKeyConstrainNames

public void setInsertedForeignKeyConstrainNames(Collection value)
Set the inserted foreign key constraint names.

Parameters:
value - foreign key constraint name list

addToInsertedForeignKeyConstrainNames

public void addToInsertedForeignKeyConstrainNames(String value)
Adds a foreign key constraint name to the list of foreign key constraint to be inserted.

Parameters:
value - foreign key constraint name

removeFromInsertedForeignKeyConstrainNames

public void removeFromInsertedForeignKeyConstrainNames(String value)
Removes a foreign key constraint name from the list of foreign key constraint to be inserted.

Parameters:
value - foreign key constraint name

insertedForeignKeyConstrainNamesIterator

public Iterator insertedForeignKeyConstrainNamesIterator()
Returns an iterator on the list of foreign key constraint names to be inserted.

Returns:
foreign key constraint iterator

isForeignKeyConstrainNamedInserted

public boolean isForeignKeyConstrainNamedInserted(String value)
Checks if a foreign key constraint is to be inserted.

Parameters:
value - foreign key constraint name
Returns:
true if the foreign key constraint is to be inserted

hasForeignKeyConstrainsInserted

public boolean hasForeignKeyConstrainsInserted()
Checks if there are foreign key constraint indexes.

Returns:
true is foreign key constraint were inserted

fieldsToString

public void fieldsToString(StringBuilder aLog)
Overrides:
fieldsToString in class EOSchemaSynchronizationChanges

Last updated June 2008

Copyright © 2000-2008 Apple Inc.