jrunx.persistence.greylock
Class DBTypeUpdate

java.lang.Object
  |
  +--jrunx.persistence.greylock.DBTypeUpdate
All Implemented Interfaces:
java.io.Serializable

public class DBTypeUpdate
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static int ARRAY_CHANGED
           
static int NAME_CHANGED
           
static int RELATION_CHANGED
           
static int SEARCHABLE_CHANGED
           
 
Constructor Summary
DBTypeUpdate()
           
DBTypeUpdate(DBTypeDef def)
           
DBTypeUpdate(DBTypeDef def, java.lang.String oldName)
           
 
Method Summary
 void addAddedProperty(java.lang.String propName)
          Add a new property
 void addPropertyChanged(java.lang.String propertyName, int attribute)
          Set the specified attribute changed flag for the property
 void addPropertyRenamed(java.lang.String propertyName, java.lang.String oldName)
          Add a property that has been renamed
 void addRemovedProperty(java.lang.String propName)
          Add a removed property
 java.util.Iterator getAddedPropertyNames()
          Get the names of all the new properties
 DBTypeDef getDBTypeDef()
          Get the new type definition
 java.util.Iterator getModifiedPropertyNames()
          Get an iterator of the names of all the properties that have been modified
 java.lang.String getNewPropertyName(java.lang.String propertyName)
          Get the new property name for a renamed property.
 DBTypeDef getOldDBTypeDef()
          Get the old type definition
 java.lang.String getOldName()
          Get the original type name
 java.lang.String getOldPropertyName(java.lang.String propertyName)
          Get the old property name for a renamed property.
 java.util.Iterator getRemovedPropertyNames()
          Get the names of all the removed properties
 boolean isArrayChanged(java.lang.String propertyName)
          Determine if the array attribute of the specified property has been changed
 boolean isNameChanged(java.lang.String propertyName)
          Determine if the name of the specified property has been changed
 boolean isPropertyChanged(java.lang.String propertyName, int attribute)
          Determine if the specified attribute of a property has been changed
 boolean isPropertyChanged(java.lang.String propertyName, int[] attributes)
          Determine if the specified attributes of a property has been changed
 boolean isRelationChanged(java.lang.String propertyName)
          Determine if the relation attribute of the specified property has been changed
 boolean isSearchChanged(java.lang.String propertyName)
          Determine if the searchable attribute of the specified property has been changed
 boolean isTypeRenamed()
          Get the flag to indicate whether or not the type has been renamed
 void setOldName(java.lang.String oldName)
          Set the original type name
 void setOldTypeDef(DBTypeDef def)
          Set the old type definition
 void setTypeDef(DBTypeDef def)
          Set the new type definition
 void setTypeRenamed(boolean isTypeRenamed)
          Set the flag to indicate whether or not the type has been renamed
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_CHANGED

public static final int NAME_CHANGED

SEARCHABLE_CHANGED

public static final int SEARCHABLE_CHANGED

ARRAY_CHANGED

public static final int ARRAY_CHANGED

RELATION_CHANGED

public static final int RELATION_CHANGED
Constructor Detail

DBTypeUpdate

public DBTypeUpdate()

DBTypeUpdate

public DBTypeUpdate(DBTypeDef def)

DBTypeUpdate

public DBTypeUpdate(DBTypeDef def,
                    java.lang.String oldName)
Method Detail

addPropertyRenamed

public void addPropertyRenamed(java.lang.String propertyName,
                               java.lang.String oldName)
Add a property that has been renamed
Parameters:
propertyName - the new property name
oldName - the old property name

addPropertyChanged

public void addPropertyChanged(java.lang.String propertyName,
                               int attribute)
Set the specified attribute changed flag for the property
Parameters:
propertyName - the property name
attribute - the attribute that changed

isNameChanged

public boolean isNameChanged(java.lang.String propertyName)
Determine if the name of the specified property has been changed
Parameters:
propertyName - the property name
Returns:
true if the property's name has been changed, else false

isRelationChanged

public boolean isRelationChanged(java.lang.String propertyName)
Determine if the relation attribute of the specified property has been changed
Parameters:
propertyName - the property name
Returns:
true if the property's relation attribute has been changed, else false

isArrayChanged

public boolean isArrayChanged(java.lang.String propertyName)
Determine if the array attribute of the specified property has been changed
Parameters:
propertyName - the property name
Returns:
true if the property's array attribute has been changed, else false

isSearchChanged

public boolean isSearchChanged(java.lang.String propertyName)
Determine if the searchable attribute of the specified property has been changed
Parameters:
propertyName - the property name
Returns:
true if the property's searchable attribute has been changed, else false

addAddedProperty

public void addAddedProperty(java.lang.String propName)
Add a new property
Parameters:
pdef - the new property definition

getAddedPropertyNames

public java.util.Iterator getAddedPropertyNames()
Get the names of all the new properties
Returns:
an Iterator containing the names of all the new properties

addRemovedProperty

public void addRemovedProperty(java.lang.String propName)
Add a removed property
Parameters:
pdef - the removed property name

getRemovedPropertyNames

public java.util.Iterator getRemovedPropertyNames()
Get the names of all the removed properties
Returns:
an Iterator containing the names of all the removed properties

isPropertyChanged

public boolean isPropertyChanged(java.lang.String propertyName,
                                 int attribute)
Determine if the specified attribute of a property has been changed
Parameters:
propertyName - the new property name
attribute - the attribute
Returns:
true if the property's attribute has been changed, else false

isPropertyChanged

public boolean isPropertyChanged(java.lang.String propertyName,
                                 int[] attributes)
Determine if the specified attributes of a property has been changed
Parameters:
propertyName - the new property name
attributea - the array of attributes
Returns:
true if all of the specified property attributes have been changed, else false

setTypeDef

public void setTypeDef(DBTypeDef def)
Set the new type definition
Parameters:
def - the updated type definition

getDBTypeDef

public DBTypeDef getDBTypeDef()
Get the new type definition
Returns:
the updated type definition

setOldTypeDef

public void setOldTypeDef(DBTypeDef def)
Set the old type definition
Parameters:
def - the old type definition

getOldDBTypeDef

public DBTypeDef getOldDBTypeDef()
Get the old type definition
Returns:
the old type definition

setTypeRenamed

public void setTypeRenamed(boolean isTypeRenamed)
Set the flag to indicate whether or not the type has been renamed
Parameters:
isTypeRenamed - true if the type is renamed, else false

isTypeRenamed

public boolean isTypeRenamed()
Get the flag to indicate whether or not the type has been renamed
Returns:
true if the type is renamed, else false

setOldName

public void setOldName(java.lang.String oldName)
Set the original type name
Parameters:
oldName - the original name of the type

getOldName

public java.lang.String getOldName()
Get the original type name
Parameters:
the - original name of the type

getModifiedPropertyNames

public java.util.Iterator getModifiedPropertyNames()
Get an iterator of the names of all the properties that have been modified
Returns:
an iterator of the modified property names

getOldPropertyName

public java.lang.String getOldPropertyName(java.lang.String propertyName)
Get the old property name for a renamed property.
Parameters:
= - the new property name
Returns:
the old property name

getNewPropertyName

public java.lang.String getNewPropertyName(java.lang.String propertyName)
Get the new property name for a renamed property.
Parameters:
= - the old property name
Returns:
the new property name

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright � 2002 Macromedia Corporation. All Rights Reserved.