Fields Summary |
---|
public static final String | MAPPING_EXTENSIONConstant representing mapping file extension. |
public static final int | NONE_CONSISTENCYConstant representing Consistency level.
NONE_CONSISTENCY implies that no consistency semantics are enforced. |
public static final int | CHECK_MODIFIED_AT_COMMIT_CONSISTENCYConstant representing Consistency level.
CHECK_MODIFIED_AT_COMMIT_CONSISTENCY implies that at commit,
consistency check is enforced for all fetched fields of modified
objects. |
public static final int | CHECK_ALL_AT_COMMIT_CONSISTENCYConstant representing Consistency level.
CHECK_ALL_AT_COMMIT_CONSISTENCY implies that at commit, consistency
check is enforced for all the fields of objects at this consistency
level.
Please note that this level is not supported in the current release. |
public static final int | LOCK_WHEN_MODIFIED_CONSISTENCYConstant representing Consistency level.
LOCK_WHEN_MODIFIED_CONSISTENCY implies exclusive lock is obtained for
data corresponding to this object when an attempt to modify the object
is made.
Please note that this level is not supported in the current release. |
public static final int | LOCK_WHEN_MODIFIED_CHECK_ALL_AT_COMMIT_CONSISTENCYConstant representing Consistency level.
LOCK_WHEN_MODIFIED_CHECK_ALL_AT_COMMIT_CONSISTENCY implies exclusive
lock is obtained for data corresponding to this object when an attempt
to modify the object is made. Also at commit, consistency check is
enforced for all the fields of objects at this consistency level.
Please note that this level is not supported in the current release. |
public static final int | LOCK_WHEN_LOADED_CONSISTENCYConstant representing Consistency level.
LOCK_WHEN_LOADED_CONSISTENCY implies that exclusive lock is
obtained for data corresponding to this object before accessing it. |
public static final int | VERSION_CONSISTENCYConstant representing Consistency level.
VERSION_CONSISTENCY implies that no lock is obtained for data
corresponding to this object until it will be updated. |
Methods Summary |
---|
public void | addField(MappingFieldElement field)Adds a field to the list of fields in this mapping class.
|
public MappingReferenceKeyElement | addSecondaryTable(MappingTableElement parentTable, org.netbeans.modules.dbschema.TableElement table)Adds a reference to the supplied table as a secondary table for this
mapping class. It creates a MappingReferenceKeyElement for the supplied
primary/secondary table pair.
|
public void | addTable(org.netbeans.modules.dbschema.TableElement table)Convenience method which accepts a table element and attempts to add
it as either a primary or secondary table depending on the existing list
of tables and the foreign keys for the table.
|
public int | getConsistencyLevel()Gets the consistency level of this mapping class.
|
public java.lang.String | getDatabaseRoot()Returns the name of the SchemaElement which represents the
database used by the tables mapped to this mapping class element.
|
public MappingFieldElement | getField(java.lang.String name)Scans through this mapping class looking for a field whose
name matches the name passed in.
|
public java.util.ArrayList | getFields()Returns the list of fields (MappingFieldElements) in this mapping
class. This list includes both local and relationship fields.
|
public MappingTableElement | getTable(java.lang.String name)Scans through this mapping class looking for a table whose
name matches the name passed in.
|
public java.util.ArrayList | getTables()Returns the list of tables (MappingTableElements) used by this mapping
class.
|
public java.util.List | getVersionFields()Returns the list of version fields (MappingFieldElements) in this
mapping class. This list only includes fields if the consistency
level is {@link #VERSION_CONSISTENCY}.
|
public int | getVersionNumber()Returns the version number of this MappingClassElement object.
Please note, the returned version number reflects the version number at
the last save, NOT the version number of the memory representation.
|
public boolean | hasOldVersionNumber()Returns true if the version number of this MappingClassElement object
is older than the current version number of the archiving scheme.
|
public boolean | isModified()Gets the modified flag for this mapping class.
|
public boolean | isNavigable()Gets the navigable flag for this mapping class.
|
public void | postUnarchive()This method is called after a MappingClassElement is unarchived
from a .mapping file. This method provides a hook to do any checking
(version number checking) and conversion after unarchiving.
|
public void | preArchive()This method is called prior to storing a MappingClassElement in a
.mapping file. This method provides a hook to do any conversion
before archiving.
|
public void | removeField(MappingFieldElement field)Removes a field from the list of fields in this mapping class.
|
public void | removeTable(MappingTableElement table)Removes the reference to the supplied table as a mapped table for this
mapping class. This works whether the table is the primary table or a
secondary table.
|
public void | setConsistencyLevel(int level)Set the consistency level of this mapping class.
|
public void | setDatabaseRoot(org.netbeans.modules.dbschema.SchemaElement root)Set the database root for this MappingClassElement.
The root represents the database used by the tables mapped to
this mapping class.
|
public void | setModified(boolean flag)Set the modified flag for this mapping class to flag. This is usually
set to true by property changes and false
after a save.
|
public void | setNavigable(boolean flag)Set the navigable flag for this mapping class to flag.
|
public void | setPrimaryTable(org.netbeans.modules.dbschema.TableElement table)Set the primary table for this mapping class to the supplied table.
|