Fields Summary |
---|
private KeyDesc | keyprimary key for the table |
private ArrayList | secondaryTableKeysarray of ReferenceKeyDescs referencing secondary tables |
private ReferenceKeyDesc | primaryTableKeyReferenceKeyDesc referencing the primary table |
private org.netbeans.modules.dbschema.TableElement | tableElementactual TableElement from the dbmodel |
private int | consistencyLevelConsistency level for this table defined in the model |
private boolean | isJoinTableindicates this table is a join table |
private String | nameName of the table |
private LocalFieldDesc | versionFieldVersion field used for version consistency |
Methods Summary |
---|
void | addSecondaryTableKey(ReferenceKeyDesc key)Add a new reference key to the list of secondary table keys.
if (secondaryTableKeys == null)
secondaryTableKeys = new ArrayList();
secondaryTableKeys.add(key);
|
public KeyDesc | getKey()Return the primary key for the table.
return key;
|
public java.lang.String | getName()Return the name of the table.
return name;
|
public ReferenceKeyDesc | getPrimaryTableKey()Return the reference key referencing the primary table.
return primaryTableKey;
|
public java.util.ArrayList | getSecondaryTableKeys()Return all secondary table keys.
return secondaryTableKeys;
|
public org.netbeans.modules.dbschema.TableElement | getTableElement()Return the actual dbmodel TableElement for this table.
return tableElement;
|
public LocalFieldDesc | getVersionField()Returns the field representing the version column for this
table. The version column is used for verification with version
consistency. Each table can have only one version column.
return versionField;
|
public boolean | isJoinTable()Return true if this table is a join table.
return isJoinTable;
|
public boolean | isUpdateLockRequired()Determins if an update lock is required on this table.
return consistencyLevel == MappingClassElement.LOCK_WHEN_LOADED_CONSISTENCY;
|
void | setConsistencyLevel(int value)Set consistencyLevel to value.
consistencyLevel = value;
//TODO :
//if(isUpdateLockRequired() )
//Check for DBVendorType.isUpdateLockSupported()
//Log to trace if !DBVendorType.isUpdateLockSupported()
//If this table is ever used, user would get an exception
|
void | setJoinTable(boolean value)Set isJoinTable to value
isJoinTable = value;
|
void | setKey(KeyDesc key)Set the primary key for the table.
this.key = key;
|
void | setPrimaryTableKey(ReferenceKeyDesc key)Set the reference key referencing the primary table.
this.primaryTableKey = key;
|
void | setVersionField(LocalFieldDesc field)
versionField = field;
|