|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.clients.beans.AssociationsLogic
public class AssociationsLogic
This class contains the task logic for the
AssociationsPanel. It assumes a BinaryLink
between two Persitables.
Supported API: true.
Extendable: true.
| Constructor Summary | |
|---|---|
AssociationsLogic()
No arg constructor for AssociationsLogic Supported API: true. |
|
| Method Summary | |
|---|---|
protected BinaryLink |
createNewLink(Persistable added_object)
This creates a new link between this side object and an added other-side object using the linkClass. |
String |
getAttrValue(Object obj,
Method getter)
This invokes the getter on the object passed in and returns the string value representing that object. |
ClassInfo |
getClassInfo()
This returns the ClassInfo for the current object
whose links are being manipulated. |
String |
getDisplayName(String attribute,
String class_name)
This uses introspection to find the display name for the passed in attribute and the passed in class_name. |
Method |
getGetterMethod(String attribute,
Object object)
This uses introspection to find the getter method for the object passed in and it's attribute. |
Class |
getLinkClass()
This is the public getter for the link class being displayed in the multilist and being created, updated, or viewed. |
String |
getLinkClassName()
This is the public getter for the name of the link class being displayed in the multilist and being created, updated, or viewed. |
wt.clients.beans.AssociationsModel |
getModel()
Get the model used to navigate the association Supported API: true. |
Object |
getObject()
This is the getter for the object for which the links can be created, updated, and viewed. |
Class |
getObjectClass()
This returns the Class for which the links
are being displayed in the multilist. |
String[] |
getOtherSideAttributes()
This returns an array of attributes on the other side object that are displayed in the columns of the multilist. |
Class |
getOtherSideClass()
This returns the class on the other side of the link. |
Object |
getRelations()
This method navigates the links on the object and returns all links that are of the same class as the linkClass. |
String |
getRole()
This is the getter of the role of the other side object. |
Image |
getStandardIcon(WTObject myObject,
WTContext context)
Returns an Image that symbolically represents the object instance or class. |
protected void |
initClassInfo()
This initializes the classInfo variable
with a new instance of ClassInfo for the current
objectClass
Supported API: true. |
boolean |
isPersistent(Persistable persistable)
Tests to see if the Peristable parameter is persistent
in the database. |
void |
save(Enumeration removed_links,
Hashtable links)
This persists any new links that the user created, and any links that the user updated. |
void |
setLinkClassName(String class_name)
This is the public setter for the name of the link class to be displayed in the multilist and created, updated, or viewed. |
void |
setModel(wt.clients.beans.AssociationsModel model)
Set the model used to navigate the association Supported API: true. |
void |
setObject(Object object)
This sets the object for which the links can be created, updated, and viewed. |
void |
setObjectClass(Class object_class)
This is the public setter for the class to be displayed in the multilist and created, updated, or viewed. |
void |
setOtherSideAttributes(String[] attributes)
This sets the attributes on the other side object that will be displayed in the columns of the multilist. |
void |
setOtherSideClass(Class other_side)
This sets the class on the other side of the link. |
void |
setRole(String role)
Call this to set the role of the other side object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AssociationsLogic()
| Method Detail |
|---|
public void setObject(Object object)
public Object getObject()
public void setRole(String role)
public String getRole()
public Class getOtherSideClass()
public void setOtherSideClass(Class other_side)
public void setOtherSideAttributes(String[] attributes)
public String[] getOtherSideAttributes()
public void setLinkClassName(String class_name)
public String getLinkClassName()
throws wt.introspection.WTIntrospectionException,
WTException
wt.introspection.WTIntrospectionException
WTException
public Class getLinkClass()
throws wt.introspection.WTIntrospectionException,
WTException,
ClassNotFoundException
wt.introspection.WTIntrospectionException
WTException
ClassNotFoundExceptionpublic void setModel(wt.clients.beans.AssociationsModel model)
public wt.clients.beans.AssociationsModel getModel()
public void setObjectClass(Class object_class)
public Class getObjectClass()
Class for which the links
are being displayed in the multilist.
public String getAttrValue(Object obj,
Method getter)
throws InvocationTargetException,
IllegalAccessException
InvocationTargetException
IllegalAccessException
public Object getRelations()
throws wt.introspection.WTIntrospectionException,
WTException,
ClassNotFoundException
linkClass.
wt.introspection.WTIntrospectionException
WTException
ClassNotFoundException
public Method getGetterMethod(String attribute,
Object object)
throws WTException
attribute - for which to find the getterobject - that the getter is on
WTException
public void save(Enumeration removed_links,
Hashtable links)
throws WTException
WTException
protected BinaryLink createNewLink(Persistable added_object)
throws wt.introspection.WTIntrospectionException,
IllegalAccessException,
NoSuchMethodException,
InstantiationException,
ClassNotFoundException,
InvocationTargetException,
WTException
wt.introspection.WTIntrospectionException
IllegalAccessException
NoSuchMethodException
InstantiationException
ClassNotFoundException
InvocationTargetException
WTException
public ClassInfo getClassInfo()
throws WTException
ClassInfo for the current object
whose links are being manipulated.
WTException
protected void initClassInfo()
throws WTException
classInfo variable
with a new instance of ClassInfo for the current
objectClass
WTExceptionpublic boolean isPersistent(Persistable persistable)
Peristable parameter is persistent
in the database.
persistable - A Peristable that will be tested to see
if it is persistent.
boolean. The value true
means that the Peristable parameter
is persistent.Persistable
public Image getStandardIcon(WTObject myObject,
WTContext context)
Image to be displayed.Image
public String getDisplayName(String attribute,
String class_name)
throws ClassNotFoundException,
wt.introspection.WTIntrospectionException
ClassNotFoundException
wt.introspection.WTIntrospectionException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||