|
Fido Alpha 3.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fido.db.ClassLinkTypeTable
Holds a list of ClassLinkTypes. The list is a hashtable that maps link names to ClassLinkType objects. The list is stored in a database file. After each add, update, or removal of a ClassLinkType, the list is updated in the database.
ClassLinkType
Field Summary | |
static int |
SYSTEM_LINK
Used for the type of link value. |
static int |
USER_LINK
Used for the type of link value. |
Constructor Summary | |
ClassLinkTypeTable()
Constructs a new ClassLinkTypeList with no entries in the list. |
Method Summary | |
void |
add(java.lang.String name)
Adds or modifies a ClassLinkType. |
boolean |
contains(java.lang.String name)
Tests for the existance of a link type. |
void |
delete(java.lang.String name)
Removes the ClassLinkType referenced by the parameters name. |
boolean |
isSystemLink(java.sql.Statement stmt,
java.lang.String name)
|
java.util.Collection |
list()
Returns the names of all ClassLinkType entries in the list. |
java.util.Collection |
listLinkNames()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SYSTEM_LINK
public static final int USER_LINK
Constructor Detail |
public ClassLinkTypeTable()
FidoIOException
- Input / Output error on creating the ClassLinkTypeList objectMethod Detail |
public void add(java.lang.String name) throws FidoDatabaseException
The Fido system has a constraint that every link field name must be unique. Therefore, the forward and backward fields of the ClassLinkType parameter are searched for in every other link type in the system. If any other enter contains the same field name, a DupulicateClassLinkField exception is thrown.
If there is not duplicate field exception, the list is not updated in the database file.
The forward field cannot be null. If it is, a NullPointerException is thrown.
FidoIOException
- Input / Output error saving ClassLinkTypeList
DuplicateLinkFieldException
- thrown if a field in the linkType
parameter already exists in another ClassLinkType.
java.lang.NullPointerException
- thrown if the forwardField is null.
FidoDatabaseException
public boolean isSystemLink(java.sql.Statement stmt, java.lang.String name) throws java.sql.SQLException, ClassLinkTypeNotFoundException
FidoIOException
- Input / Output error saving ClassLinkTypeList
java.sql.SQLException
ClassLinkTypeNotFoundException
public void delete(java.lang.String name) throws FidoDatabaseException, CannotDeleteSystemLinkException, ClassLinkTypeNotFoundException
name
- Name of the ClassLinkType to remove
FidoIOException
- Input / Output error saving ClassLinkTypeList
CannotDeleteSystemLinkException
- Attempt to delete a link
deemed as a System link. These cannot be modified, but
ususally have another method of modifying the link.
FidoDatabaseException
ClassLinkTypeNotFoundException
public boolean contains(java.lang.String name) throws FidoDatabaseException
name
- Name of the ClassLinkType to test for
FidoDatabaseException
public java.util.Collection list() throws FidoDatabaseException
FidoDatabaseException
public java.util.Collection listLinkNames() throws FidoDatabaseException
FidoDatabaseException
|
Fido Alpha 3.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |