Methods Summary |
---|
public void | changeConcurrencyGroups(ConcurrencyGroupElement[] groups, int action)Change the set of concurrency groups.
_groups.changeElements(groups, action);
|
public void | changeFields(PersistenceFieldElement[] fields, int action)Change the set of fields.
_fields.changeElements(fields, action);
|
protected final void | firePropertyChange(java.lang.String name, java.lang.Object o, java.lang.Object n)Fires property change event. This method overrides that of
PersistenceElementImpl to update the persistence class element's
modified status.
// even though o == null and n == null will signify a change, that
// is consistent with PropertyChangeSupport's behavior and is
// necessary for this to work
boolean noChange = ((o != null) && (n != null) && o.equals(n));
super.firePropertyChange(name, o, n);
if (!(PROP_MODIFIED.equals(name)) && !noChange)
setModified(true);
|
protected final void | fireVetoableChange(java.lang.String name, java.lang.Object o, java.lang.Object n)Fires vetoable change event. This method overrides that of
PersistenceElementImpl to give listeners a chance to block
changes on the persistence class element modified status.
// even though o == null and n == null will signify a change, that
// is consistent with PropertyChangeSupport's behavior and is
// necessary for this to work
boolean noChange = ((o != null) && (n != null) && o.equals(n));
super.fireVetoableChange(name, o, n);
if (!(PROP_MODIFIED.equals(name)) && !noChange)
fireVetoableChange(PROP_MODIFIED, Boolean.FALSE, Boolean.TRUE);
|
public ConcurrencyGroupElement | getConcurrencyGroup(java.lang.String name)Find a concurrency group by name.
return (ConcurrencyGroupElement)_groups.getElement(name);
|
public ConcurrencyGroupElement[] | getConcurrencyGroups()Get all concurrency groups.
return (ConcurrencyGroupElement[])_groups.getElements();
|
public PersistenceFieldElement | getField(java.lang.String name)Find a field by name.
return (PersistenceFieldElement)_fields.getElement(name);
|
public PersistenceElementCollection | getFieldCollection()Returns the field collection of this class element. This method
should only be used internally and for cloning and archiving.
return _fields;
|
public PersistenceFieldElement[] | getFields()Get all fields.
return (PersistenceFieldElement[])_fields.getElements();
|
public PersistenceElementCollection | getGroupCollection()Returns the concurrency group collection of this class element.
This method should only be used internally and for cloning and
archiving.
return _groups;
|
public java.lang.String | getKeyClass()Get the fully qualified name of the primary key class for this class
element. This value is only used if getObjectIdentityType
returns APPLICATION_IDENTITY
return ((PersistenceClassElement.APPLICATION_IDENTITY ==
getObjectIdentityType()) ? _keyClass : null);
|
public int | getObjectIdentityType()Get the object identity type of this class element.
return _objectIdentityType;
|
public boolean | isModified()Gets the modified flag for this persistence class. return _isModified;
|
public void | setFieldCollection(PersistenceElementCollection collection)Set the field collection of this class element to the supplied
collection. This method should only be used internally and for
cloning and archiving.
_fields = collection;
|
public void | setGroupCollection(PersistenceElementCollection collection)Set the concurrency group collection of this class element to the
supplied collection. This method should only be used internally
and for cloning and archiving.
_groups = collection;
|
public void | setKeyClass(java.lang.String name)Set the primary key class for this class element.
String old = getKeyClass();
try
{
fireVetoableChange(PROP_KEY_CLASS, old, name);
_keyClass = name;
firePropertyChange(PROP_KEY_CLASS, old, name);
}
catch (PropertyVetoException e)
{
throw new ModelVetoException(e);
}
|
public void | setModified(boolean flag)Set the modified flag for this persistence class to flag. This is
usually set to true by property changes and
false after a save.
boolean oldFlag = isModified();
if (flag != oldFlag)
{
_isModified = flag;
firePropertyChange(PROP_MODIFIED, JavaTypeHelper.valueOf(oldFlag),
JavaTypeHelper.valueOf(flag));
}
|
public void | setObjectIdentityType(int type)Set the object identity type of this class element.
Integer old = new Integer(getObjectIdentityType());
Integer newType = new Integer(type);
try
{
fireVetoableChange(PROP_IDENTITY, old, newType);
_objectIdentityType = type;
firePropertyChange(PROP_IDENTITY, old, newType);
}
catch (PropertyVetoException e)
{
throw new ModelVetoException(e);
}
|