jACOB 2.7 API Documentation.

de.tif.jacob.core.definition
Interface ITableDefinition

All Superinterfaces:
INamedObjectDefinition

public interface ITableDefinition
extends INamedObjectDefinition

This interface represents the definition of data source table.


Method Summary
 java.lang.String getDataSourceName()
          Returns the name of the data source of this table.
 java.lang.String getDBName()
          Returns the name of this table within the physical database.
 ITableField getHistoryField()
          Returns the history field (Long text field) which is used to keep the change history information.
 IKey getKey(java.lang.String keyName)
          Returns the key specified by name
 java.util.Iterator getKeys()
          Returns the keys defined for this table.
 java.lang.String getName()
          Returns the name of this table.
 IKey getPrimaryKey()
          Returns the primary key of this table.
 ITableField getRepresentativeField()
          Returns the table field which represents a record (row) of this table.
 ITableField getTableField(java.lang.String tableFieldName)
          Returns the definition of the table field specified by name.
 ITableField getTableFieldByDBName(java.lang.String dbTableFieldName)
          Returns the definition of the table field specified by its database name.
 java.util.List getTableFields()
          Returns the definitions of all table fields of this table.
 boolean hasKey(IKey key)
          Checks whether this table contains the given key.
 boolean hasKey(java.lang.String keyName)
          Checks whether this table contains a key of the given name.
 boolean hasTableField(ITableField tableField)
          Checks whether this table contains the given table field.
 boolean hasTableField(java.lang.String tableFieldName)
          Checks whether this table contains a table field of the given name.
 boolean isInternal()
          Checks whether this table is an internal table.
 boolean isOmitLocking()
          Checks whether locking is omitted for entries of this table.
 
Methods inherited from interface de.tif.jacob.core.definition.INamedObjectDefinition
getDescription, getProperty
 

Method Detail

getName

java.lang.String getName()
Returns the name of this table.

Specified by:
getName in interface INamedObjectDefinition
Returns:
the table name

getDBName

java.lang.String getDBName()
Returns the name of this table within the physical database.

Returns:
the database name.

getPrimaryKey

IKey getPrimaryKey()
Returns the primary key of this table.

Returns:
the primary key or null, if the table has not defined a primary key.

getTableField

ITableField getTableField(java.lang.String tableFieldName)
                          throws java.lang.NoSuchFieldException
Returns the definition of the table field specified by name.

Parameters:
tableFieldName - the name of the table field
Returns:
the table field definition
Throws:
java.lang.NoSuchFieldException - if no table field of the specified name exists for this table

getTableFieldByDBName

ITableField getTableFieldByDBName(java.lang.String dbTableFieldName)
                                  throws java.lang.NoSuchFieldException
Returns the definition of the table field specified by its database name.

Note: Database field names are handled case insensitive!

Parameters:
dbTableFieldName - the name of the table field
Returns:
the table field definition
Throws:
java.lang.NoSuchFieldException - if no table field of the specified name exists for this table

hasTableField

boolean hasTableField(java.lang.String tableFieldName)
Checks whether this table contains a table field of the given name.

Parameters:
tableFieldName - the table field name to check
Returns:
true if the table field belongs to this table, otherwise false

hasTableField

boolean hasTableField(ITableField tableField)
Checks whether this table contains the given table field.

Parameters:
tableField - the table field to check
Returns:
true if the table field belongs to this table, otherwise false

getTableFields

java.util.List getTableFields()
Returns the definitions of all table fields of this table.

Returns:
List of ITableField

getKey

IKey getKey(java.lang.String keyName)
Returns the key specified by name

Parameters:
keyName - the name of the key
Returns:
the specified key

hasKey

boolean hasKey(java.lang.String keyName)
Checks whether this table contains a key of the given name.

Parameters:
keyName - the key name to check
Returns:
true if the key belongs to this table, otherwise false

hasKey

boolean hasKey(IKey key)
Checks whether this table contains the given key.

Parameters:
key - the key to check
Returns:
true if the key belongs to this table, otherwise false

getKeys

java.util.Iterator getKeys()
Returns the keys defined for this table.

Returns:
Iterator of IKey

getDataSourceName

java.lang.String getDataSourceName()
Returns the name of the data source of this table.

Returns:
the data source name

isInternal

boolean isInternal()
Checks whether this table is an internal table.

Returns:
true for internal tables, otherwise false

isOmitLocking

boolean isOmitLocking()
Checks whether locking is omitted for entries of this table.

Note: This feature should only be used, if modification performance is really a matter and unsynchronized modification is not a matter.

Returns:
true if locking is omitted, otherwise false
Since:
2.6

getRepresentativeField

ITableField getRepresentativeField()
Returns the table field which represents a record (row) of this table.

A representative field must not necessarily be unique, but should denote a record in a human understandable manner. E.g. the representative field of the table "person" is "fullname" not "personid".

Returns:
the representative field or null, if no such field exists.

getHistoryField

ITableField getHistoryField()
Returns the history field (Long text field) which is used to keep the change history information.

Returns:
the history field or null if no history field exists.

jACOB 2.7 API Documentation.