* @return Element information relating to the element type
*/
protected ElementInfo[] getElementInformationForClass()
{
ElementInfo[] info = null;
DatastoreClass tbl;
String[] clsNames;
if (!clr.classForName(elementType).isInterface())
{
tbl = storeMgr.getDatastoreClass(elementType, clr);
clsNames = new String[] {elementType};
}
else
{
clsNames = storeMgr.getOMFContext().getMetaDataManager().getClassesImplementingInterface(elementType, clr);
tbl = storeMgr.getDatastoreClass(clsNames[0], clr);
}
if (tbl == null)
{
AbstractClassMetaData[] subclassCmds = storeMgr.getClassesManagingTableForClass(emd, clr);
info = new ElementInfo[subclassCmds.length];
for (int i=0;i<subclassCmds.length;i++)
{
DatastoreClass table = storeMgr.getDatastoreClass(subclassCmds[i].getFullClassName(), clr);
info[i] = new ElementInfo(subclassCmds[i], table);
}
}
else
{
info = new ElementInfo[clsNames.length];
for (int i=0; i<clsNames.length; i++)
{
AbstractClassMetaData cmd = storeMgr.getOMFContext().getMetaDataManager().getMetaDataForClass(clsNames[i], clr);
DatastoreClass table = storeMgr.getDatastoreClass(cmd.getFullClassName(), clr);
info[i] = new ElementInfo(cmd, table);
}
}
return info;
}